Immich is an open-source photo and video management platform — a self-hosted alternative to Google Photos — with native mobile apps, machine-learning search, and automatic backup. This guide deploys Immich using Docker Compose, fronts it with Nginx, and secures it with a Let's Encrypt TLS certificate. By the end, you'll have Immich syncing photos and videos securely at your domain.
Set Up the Directory Structure
1. Create the project directory:
$ mkdir ~/immich
$ cd ~/immich
2. Download the official .env template:
$ wget -O .env https://github.com/immich-app/immich/releases/latest/download/example.env
3. Edit the environment file:
$ nano .env
Uncomment and set the timezone, plus customize secrets:
TZ=Europe/London
Key variables in the file:
-
UPLOAD_LOCATION— where uploaded media is stored -
DB_DATA_LOCATION— PostgreSQL data path -
IMMICH_VERSION— Immich release tag -
DB_PASSWORD,DB_USERNAME,DB_DATABASE_NAME— database credentials
Deploy with Docker Compose
1. Download the official Compose manifest:
$ wget https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
This brings up three services: immich-server, postgres, and valkey for cache/queues.
2. Add your user to the Docker group:
$ sudo usermod -aG docker $USER
$ newgrp docker
3. Start the stack:
$ docker compose up -d
4. Verify the services are running and the API responds:
$ docker compose ps
$ curl -X GET 127.0.0.1:2283
Front Immich with Nginx
1. Install and enable Nginx:
$ sudo apt update
$ sudo apt install nginx -y
$ sudo systemctl enable nginx
2. Remove the default site:
$ sudo rm /etc/nginx/sites-enabled/default
3. Create the Immich virtual host:
$ sudo nano /etc/nginx/sites-available/immich.conf
server {
listen 80;
server_name immich.example.com;
location / {
client_max_body_size 10M;
proxy_pass http://127.0.0.1:2283;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
4. Enable the site and reload:
$ sudo ln -s /etc/nginx/sites-available/immich.conf /etc/nginx/sites-enabled/
$ sudo nginx -t
$ sudo systemctl restart nginx
5. Open the firewall:
$ sudo ufw allow 80/tcp
$ sudo ufw allow 443/tcp
$ sudo ufw reload
Issue a Let's Encrypt Certificate
$ sudo apt install certbot python3-certbot-nginx -y
$ sudo certbot --nginx -d immich.example.com -m admin@example.com --non-interactive
Certbot edits the Nginx config in place and enables auto-renewal.
Access and Configure Immich
- Open
https://immich.example.comand click Getting Started. - Create the admin account with email, password, and display name.
- Sign in and walk through the initial settings: theme, language, privacy, storage template, backup strategy.
- Click Upload to add a batch of photos. They appear under Photos once processed.
Add team members from Administration → Users with per-user storage quotas.
Next Steps
Immich is running and served securely over HTTPS. From here you can:
- Install the iOS / Android app and point it at your domain for automatic phone backup
- Enable machine-learning search and face recognition for richer organisation
- Move
UPLOAD_LOCATIONto Vultr Block Storage to scale beyond the host disk
For the full guide with additional tips, visit the original article on Vultr Docs.
Top comments (0)