All articles
TutorialsJan 27, 2026 · 10 min read

How to Set Up Immich on Your VPS - A Self-Hosted Google Photos Alternative

How to Set Up Immich on Your VPS - A Self-Hosted Google Photos Alternative

Google Photos used to be the obvious choice for backing up your phone's camera roll. Unlimited storage, decent search, automatic organization. Then they capped the free tier, and suddenly that convenience came with a price tag.

Immich is an open-source alternative that runs on your own server. You get the same automatic backup from your phone, facial recognition, location-based albums, and a clean web interface. The difference: your photos stay on hardware you control.

Why self-host your photos?

The practical reasons are straightforward:

  • No monthly fees eating into your budget (just server costs)
  • No compression or quality reduction on uploads
  • Your photos aren't training someone else's AI models
  • No surprise policy changes deleting your content
  • Works even when the company behind it doesn't

The storage requirements are the main consideration. Phone photos add up fast—expect 50-100GB per year if you take a lot of pictures. Video is worse. A Storage VPS with 1-4TB of HDD space handles this well without breaking the bank.

What you'll need

  • A Linux VPS with at least 4GB RAM (6GB+ recommended for machine learning features)
  • Docker and Docker Compose installed
  • A domain name (optional but recommended for HTTPS)
  • Your phone's photo library, ready to migrate

For this guide, we're using Ubuntu 24.04 on a storage-focused VPS. The large HDD space matters more than raw CPU power here—Immich does its heavy lifting during initial import and then mostly just serves files.

Step 1: Install Docker

If Docker isn't already on your server:

# Update packages sudo apt update && sudo apt upgrade -y # Install Docker curl -fsSL https://get.docker.com | sh # Add your user to the docker group sudo usermod -aG docker $USER # Log out and back in, then verify docker --version

Step 2: Set up the Immich directory structure

Create a dedicated folder for Immich and its data:

mkdir -p ~/immich cd ~/immich

Step 3: Download the Immich configuration files

Immich provides official Docker Compose files. Grab them:

wget -O docker-compose.yml https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml wget -O .env https://github.com/immich-app/immich/releases/latest/download/example.env

Step 4: Configure the environment file

Open .env and set your upload location and other settings:

nano .env

The key variables:

# Where your photos will be stored - point this to your large storage drive UPLOAD_LOCATION=/mnt/storage/immich # Generate a random string for this DB_PASSWORD=your-secure-database-password # Optional: Set your timezone TZ=Europe/Berlin

If your VPS has a separate HDD mounted (common with storage VPS plans), make sure UPLOAD_LOCATION points there. Check available disks with lsblk and mount points with df -h.

Step 5: Create the upload directory

sudo mkdir -p /mnt/storage/immich sudo chown -R $USER:$USER /mnt/storage/immich

Step 6: Start Immich

docker compose up -d

First startup takes a few minutes while it pulls images and initializes the database. Watch the progress:

docker compose logs -f

Once you see the server listening messages, Immich is ready.

Step 7: Access the web interface

Open your browser and go to http://your-server-ip:2283. You'll see the setup wizard:

  1. Create your admin account
  2. Configure storage settings
  3. Set up any additional users (family members, etc.)

Step 8: Install the mobile app

Immich has apps for both iOS and Android:

In the app:

  1. Enter your server URL (http://your-server-ip:2283 or your domain)
  2. Log in with your admin credentials
  3. Enable background backup in settings
  4. Select which albums to sync

Step 9: Set up HTTPS (recommended)

Running Immich over plain HTTP works for testing, but you'll want HTTPS for actual use. The easiest approach is a reverse proxy with automatic certificates.

Install Caddy:

sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list sudo apt update sudo apt install caddy

Create /etc/caddy/Caddyfile:

photos.yourdomain.com { reverse_proxy localhost:2283 }

Start Caddy:

sudo systemctl enable caddy sudo systemctl start caddy

Caddy automatically obtains and renews Let's Encrypt certificates. Update your mobile app's server URL to use the new HTTPS domain.

Step 10: Import existing photos

If you have photos stored elsewhere, you can import them through the web interface or use the CLI tool:

docker exec -it immich_server immich upload --recursive /path/to/photos

For large imports, consider using the external library feature instead—it lets Immich read photos from a directory without copying them.

Machine learning features

Immich includes facial recognition, object detection, and smart search. These features require more RAM and CPU during initial processing, but the results are worth it.

The ML container processes your library in the background. For a library of 10,000 photos, expect initial processing to take several hours. After that, new uploads are processed individually and finish quickly.

Storage planning

Some rough numbers to help with capacity planning:

  • 10,000 photos: 50-80 GB
  • 25,000 photos: 125-200 GB
  • 50,000 photos: 250-400 GB
  • 100,000 photos: 500-800 GB

These assume a mix of phone photos and some video. RAW files from cameras will use significantly more space.

A 1TB storage VPS handles most personal libraries comfortably. If you're archiving years of family photos or shoot a lot of video, consider the 2TB or 4TB options from the start—migrating later is possible but annoying.

Maintenance

Immich is actively developed with frequent updates. Update your installation with:

cd ~/immich docker compose pull docker compose up -d

Check the release notes before major updates—occasionally there are breaking changes that need attention.

Backups

Your photos deserve backup protection. Options include:

  • Restic to a separate storage location
  • Rclone to cloud storage (encrypted)
  • Simple rsync to another server

The database also needs backing up. Immich stores metadata, face data, and user information in PostgreSQL:

docker exec -t immich_postgres pg_dumpall -c -U postgres > immich_db_backup.sql

Wrapping up

Immich gives you a Google Photos-like experience without the subscription fees or privacy concerns. The setup takes about 30 minutes, and once it's running, the mobile apps handle everything automatically.

The main ongoing cost is server storage. A Storage VPS in France starting at €25/month gives you 1TB of space—enough for most personal photo libraries with room to grow.

For questions or issues, the Immich Discord and GitHub Discussions are active and helpful.