使用FreshRSS和Fluent Reader搭建自己的资讯系统
原理
在一台linux服务器上部署FreshRSS服务,然后使用网页管理查看RSS订阅,或者使用Fluent客户端。
部署FreshRSS服务
采用docker方式部署,由于dockerhub无法访问,先设置daemon.json。
# cat /etc/docker/daemon.json
{
"registry-mirrors" :
[
"https://docker.m.daocloud.io",
"https://docker.udayun.com",
"https://noohub.ru",
"https://huecker.io",
"https://dockerhub.timeweb.cloud"
]
}
然后执行:
systemctl daemon-reload && systemctl restart docker
就可以拉取镜像:
docker pull freshrss/freshrss
运行容器:
docker run -d --restart unless-stopped --log-opt max-size=100m -p 8080:80 -e TZ=Asia/Shanghai --name freshrss freshrss/freshrss
配置:
浏览器访问http://ip:8080
然后根据提示选择中文,连接数据库、设置账号等步骤,支持pg、mysql、sqlite三种数据库。
安装Fluent Reader
网址:https://hyliu.me/fluent-reader/
最底部有下载连接
配置fluent接入
FreshRSS部分
在FreshRSS网页设置,流程如下。
然后再按如下流程操作
其中密码需要自己设置
然后点击如下位置
弹出如下界面,其中的url后续需要填入客户端FreshRSS API endpoints Google Reader compatible API Your API address: http://127.0.0.1:8080/api/greader.php Google Reader API configuration test: ✔️ PASS Fever compatible API Your API address: http://127.0.0.1:8080/api/fever.php Fever API configuration test: ✔️ PASS
Fluent部分
打开该客户端,点击设置-点击服务-填入相关信息并确认。即可开启电脑客户端访问
配置手机端接入
ios
app名称 netnewswire
app中打开设置,点击如下位置即可添加,数据同上客户端。
安卓
略
配置代理和SSL证书
申请ssl证书
略
配置nginx文件
server {
listen 443 ssl;
ssl_certificate /etc/nginx/conf.d/x.com.pem;
ssl_certificate_key /etc/nginx/conf.d/x.com.key;
server_name x.com;
#client_max_body_size 10m;
#client_body_buffer_size 1024k;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_redirect off;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_connect_timeout 300;
proxy_send_timeout 300;
proxy_read_timeout 300;
send_timeout 300;
proxy_pass http://127.0.0.1:8080;
}
}
server {
listen xx:80;
server_name xx.com.show;
return 301 https://$host$request_uri;
}
开启SSL后,对应的登录地址改成https://域名 即可
遇到的问题
1 自动更新不生效
网页设置了更新时间、容器内查看cron服务正常,即使执行php /var/www/FreshRSS/app/actualize_script.php也不更新。
可参考https://blog.csdn.net/weixin_43328837/article/details/136951413,提到的https://freshrss.github.io/FreshRSS/en/users/09_refreshing_feeds.html#automatic-update-with-cron 官方解决办法。
点击网页刷新按钮手动刷新,或在宿主机创建cron任务访问刷新url。