Skip to main content

On This Page

Self Hosting Immich: Deploying an Open Source Photo Management Stack on Ubuntu 24.04

2 min read
Share

These articles are AI-generated summaries. Please check the original sources for full details.

Deploying Immich, an Open-Source Alternative to Google Photos, on Ubuntu 24.04

Immich is an open-source photo and video management platform designed as a self-hosted alternative to Google Photos. It integrates machine learning search, native mobile apps, and automatic backup capabilities into a single deployment.

Why This Matters

While cloud providers offer seamless photo management, they create vendor lockin and privacy concerns regarding user data ownership. Implementing a self-hosted stack allows engineers to control the underlying storage layer—such as moving UPLOAD_LOCATION to block storage—and manage database credentials independently of third party providers.

Key Insights

  • (2026) Deployment on Ubuntu 24.04 utilizes a three-service architecture consisting of immich-server, postgres, and valkey.
  • Reverse proxying via Nginx enables secure external access by mapping port 80/443 to internal port 2283.
  • Let’s Encrypt certificates are automated via Certbot to ensure encrypted HTTPS traffic for media uploads.

Working Examples

Initialize project directory and configure environment variables.

mkdir ~/immich
cd ~/immich
wget -O .env https://github.com/immich-app/immich/releases/latest/download/example.env
nano .env

Deploy Immich stack using Docker Compose.

wget https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
sudo usermod -aG docker $USER
newgrp docker
docker compose up -d

Nginx reverse proxy configuration for Immich.

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;
}
}

Provisioning TLS certificates via Let’s Encrypt.

sudo apt install certbot python3-certbot-nginx -y
sudo certbot --nginx -d immich.example.com -m [email protected] --non-interactive

Practical Applications

  • ! Use case: Mobile users syncing photos to a private domain for automatic backup.
  • ! Pitfall: Using local host disks for UPLOAD_LOCATION may limit scalability; migrating to Block Storage is the recommended solution.

References:

Continue reading

Next article

Deploying Jina Serve: Neural Search and AI Serving on Ubuntu 24.04

Related Content