การเข้าถึง Immich
- ผู้ใช้คนแรกที่ลงทะเบียนจะได้รับสิทธิ์เป็น admin
- admin สามารถเพิ่มผู้ใช้คนอื่นเข้าสู่แอปพลิเคชันได้
- เพื่อลงทะเบียนในฐานะ admin ให้เข้าใช้งานเว็บแอปพลิเคชันที่
https://<IP>แล้วคลิกปุ่ม Getting Started - หากปรากฏคำเตือนเกี่ยวกับใบรับรองที่ลงนามเอง ให้ยืนยันเพื่อดำเนินการต่อ
ไฟล์และไดเรกทอรีที่สำคัญ
- ไดเรกทอรีติดตั้ง:
/root/immich - Environment variables ที่สร้างโดย installer:
/root/immich/.env - การกำหนดค่า Docker Compose:
/root/activepieces/docker-compose.yml - ใบรับรอง SSL และคีย์ส่วนตัวในเครื่อง:
/etc/nginx/ssl/fullchain.crt&/etc/nginx/ssl/privkey.key - การตั้งค่า Nginx reverse proxy:
/etc/nginx/sites-available/immich.conf - Nginx activation symlink:
Nginx symlink การเปิดใช้งาน:
/etc/nginx/sites-enabled/immich.conf
เปิดใช้งาน SSL กับโดเมน
1. ชี้โดเมนของคุณไปยัง IP ของ server
2. แก้ไข config ของ Nginx และเปลี่ยนทั้งคู่ server_name <IP>; กับโดเมนของคุณ (<your-domain>) สำหรับทั้ง HTTP (port 80) และ HTTPS (port 443) blocks:
vim /etc/nginx/sites-available/immich.conf
3. ติดตั้ง Certbot:
apt install -y certbot python3-certbot-nginx
4. รันคำสั่งต่อไปนี้เพื่อสร้างใบรับรอง Lets Encrypt ที่ใช้งานได้:
certbot certonly --nginx --non-interactive --agree-tos --email [email protected] -d yourdomain.com
5. แทนที่พาธ SSL ในการตั้งค่า Nginx (ส่วน TLS):
vim /etc/apache2/sites-available/immich.conf
# Before:
# ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
# ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/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. เปิด browser และไปที่: https://yourdomain.com