การเข้าถึง 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 ของเซิร์ฟเวอร์
2. แก้ไขไฟล์คอนฟิก Nginx และแทนที่ทั้งสองส่วน server_name <IP>; ด้วยโดเมนของคุณ (<your-domain>) สำหรับทั้งบล็อก HTTP (port 80) และ HTTPS (port 443):
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. เปิดเบราว์เซอร์และไปที่: https://yourdomain.com