部署RSSHUB

按照官网手动部署文档
https://docs.rsshub.app/install/#shou-dong-bu-shu

启用redis缓存,并使用yarn启动和管理,使用systemd设置环境变量

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
git clone https://github.com/DIYgod/RSSHub.git
cd RSSHub

yay -S yarn npm nodejs redis

yarn


systemctl start redis
systemctl enable redis






nano /etc/systemd/system/RSSHub.service




[Unit]
Description=RSSHub Server Service
Requires=network.target
After=network.target

[Service]
Type=simple
User=jeremie
Restart=always
AmbientCapabilities=CAP_NET_BIND_SERVICE
Environment=CACHE_TYPE=redis
Environment=CACHE_EXPIRE=600
Environment=HTTP_BASIC_AUTH_NAME=username
Environment=HTTP_BASIC_AUTH_PASS=passwd
Environment=PORT=11200
Environment=LISTEN_INADDR_ANY=0
WorkingDirectory=/home/jeremie/RSSHub
Restart=always
ExecStart=/bin/yarn run start -o --watch

[Install]
WantedBy=multi-user.target




systemctl start RSSHub
systemctl status RSSHub
systemctl enable RSSHub


nginx 反向代理配置
ref: https://blog.csdn.net/physicsdandan/article/details/45667357

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

server {
listen 127.0.0.1:11080;
server_name rsshub.jeremie.moe;


location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://localhost:11200;
}

}