访问 Huginn
打开浏览器,访问: https://<SERVER_IP>
接受自签名 SSL 证书警告。
默认管理员凭据:
- 用户名:
admin - 密码:
password立即更改
重要文件与路径
- Huginn 安装:
/root/huginn - Docker Compose:
/root/huginn/docker-compose.yml - 环境变量:
/root/huginn/.env - SSL 证书:
/etc/nginx/ssl - Nginx 配置:
/etc/nginx/sites-available/huginn
常用命令
查看日志
docker logs huginn -f
docker logs huginn_mysql -f
重启容器:
cd /root/huginn
docker compose restart huginn
docker compose restart huginn_mysql
docker compose restart # restart all
查看正在运行的容器:
docker ps
Nginx 管理
systemctl restart nginx
systemctl status nginx
通过域名启用 SSL
1. 将你的域名指向服务器 IP。
2. 编辑 Nginx 配置,替换以下两处 server_name <IP>; 使用您的域名(<your-domain>) 适用于 HTTP(端口 80)和 HTTPS(端口 443)的规则块:
vim /etc/nginx/sites-available/huginn
3. 安装 Certbot:
apt install -y certbot python3-certbot-nginx
4. 运行以下命令,生成有效的 Let's Encrypt 证书:
certbot certonly --nginx --non-interactive --agree-tos --email [email protected] -d yourdomain.com
5. 在 Nginx 配置中替换 SSL 路径:
vim /etc/nginx/sites-available/huginn
# Before:
# ssl_certificate /etc/nginx/ssl/fullchain.pem;
# ssl_certificate_key /etc/nginx/ssl/privkey.pem;
# After:
# ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
# ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;
6. 重启 Nginx 以应用更改:
systemctl restart nginx
7. 打开浏览器,访问: https://yourdomain.com