การเข้าถึง
- อาจใช้เวลาสักครู่กว่าระบบจะเริ่มต้นและทำงานได้ตามปกติ
- อินเตอร์เฟซเว็บ:
https://<server-ip> - ยืนยันคำเตือน SSL (self-signed certificate)
- เข้าสู่ระบบด้วยชื่อผู้ใช้และรหัสผ่านของผู้ดูแลระบบที่คุณตั้งค่าระหว่างการติดตั้ง
- ข้อมูลการเข้าสู่ระบบถูกเก็บไว้ที่:
/root/.cloudzy-creds
ไฟล์และไดเรกทอรีสำคัญ
- รากแอปพลิเคชัน:
/root/dashy/ - ไฟล์คอนฟิกของ Dashy:
/root/dashy/config.yml - ไฟล์ Docker Compose:
/root/dashy/docker-compose.yml - ข้อมูลผู้ดูแลระบบที่บันทึกไว้ (อ่านอย่างเดียว):
/root/.cloudzy-creds - คอนฟิกของ Nginx site:
/etc/nginx/sites-available/dashy - Nginx site ที่เปิดใช้งานอยู่:
/etc/nginx/sites-enabled/dashy - ใบรับรอง TLS:
/etc/nginx/ssl/fullchain.pem - Private key ของ TLS:
/etc/nginx/ssl/privkey.pem
การจัดการบริการ
ตรวจสอบสถานะ container:
docker compose -f /root/dashy/docker-compose.yml ps
เริ่มต้นใหม่:
docker compose -f /root/dashy/docker-compose.yml restart
ดูบันทึก:
docker compose -f /root/dashy/docker-compose.yml logs -f
เปิดใช้งาน SSL พร้อมโดเมน
1. ชี้โดเมนของคุณไปที่ IP ของเซิร์ฟเวอร์
2. แก้ไขไฟล์คอนฟิก Nginx และแทนที่ทั้งสองส่วน server_name <IP>; ด้วยโดเมนของคุณ (<your-domain>) สำหรับทั้งบล็อก HTTP (port 80) และ HTTPS (port 443):
vim /etc/nginx/sites-available/dashy
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/apache2/sites-available/dashy
# 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