访问 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