เข้าถึง Huginn
เปิดเบราว์เซอร์แล้วไปที่: https://<SERVER_IP>
ยืนยันคำเตือนใบรับรอง SSL แบบ self-signed
ข้อมูล admin เริ่มต้น:
- ชื่อผู้ใช้:
admin - รหัสผ่าน:
passwordเปลี่ยนแปลงทันที
ไฟล์และตำแหน่งสำคัญ
- Huginn ติดตั้ง:
/root/huginn - Docker Compose:
/root/huginn/docker-compose.yml - ตัวแปร Env:
/root/huginn/.env - ใบรับรอง SSL:
/etc/nginx/ssl - Nginx config
/etc/nginx/sites-available/huginn
คำสั่งทั่วไป
ตรวจสอบบันทึก:
docker logs huginn -f
docker logs huginn_mysql -f
รีสตาร์ท containers:
cd /root/huginn
docker compose restart huginn
docker compose restart huginn_mysql
docker compose restart # restart all
ดู container ที่กำลังทำงาน:
docker ps
การจัดการ Nginx:
systemctl restart nginx
systemctl status nginx
เปิดใช้งาน SSL พร้อมโดเมน
1. ชี้โดเมนของคุณไปที่ IP ของเซิร์ฟเวอร์
2. แก้ไขไฟล์คอนฟิก Nginx และแทนที่ทั้งสองส่วน server_name <IP>; ด้วยโดเมนของคุณ (<your-domain>) สำหรับทั้งบล็อก HTTP (port 80) และ HTTPS (port 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. แทนที่พาธ SSL ในไฟล์คอนฟิก Nginx:
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