huntly部署
huntly部署
About
- 自建 huntly
- 建议:
- 启动端口默认监听 0.0.0.0:8080 ,添加参数修改为只监听本地自定义端口:/usr/bin/java -Xms128m -Xmx2048m -jar huntly.jar --server.address=127.0.0.1 --server.port=10001
- 扩展支持Firefox
- 服务端配置:
- 创建运行用户
sudo useradd -r -s /sbin/nologin huntly
- 创建程序目录及部署前后端文件
sudo mkdir -p /opt/huntly/ sudo wget https://github.com/lcomplete/huntly/releases/download/0.1.0/huntly-server-client-0.1.0-SNAPSHOT.jar -O /opt/huntly/huntly.jar sudo chown -R huntly: /opt/huntly
- 添加 systemd 服务配置并启动
- vim /etc/systemd/system/huntly.service
[Unit] Description=huntly reader After=network.target [Service] Type=simple User=huntly WorkingDirectory=/opt/huntly ExecStart=/usr/bin/java -Xms128m -Xmx2048m -jar huntly.jar --server.address=127.0.0.1 --server.port=10001 Restart=on-failure [Install] WantedBy=multi-user.target
- 启动并设置开机启动服务:sudo systemctl enable --now huntly.service
- 实时查看日志:sudo journalctl -fu huntly.service
- Web server
- 我用的caddy
huntly.example.com { reverse_proxy localhost:10001 }
- 如果用nginx
- 后端前端合到一起了,直接一行反向代理就行了
- 客户端配置
- 下载 https://github.com/lcomplete/huntly/releases/download/0.1.0/browser-extension.zip 解压
- chrome 扩展设置 chrome:/extensions 中右上角打开开发者模式,load-unpacked 选择解压的文件夹
- huntly 扩展右键 option,server url中填写web server中配置的域名,如 :https://huntly.example.com