
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.
The practical reasons are straightforward:
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.
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.
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
Create a dedicated folder for Immich and its data:
mkdir -p ~/immich
cd ~/immich
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
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.
sudo mkdir -p /mnt/storage/immich
sudo chown -R $USER:$USER /mnt/storage/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.
Open your browser and go to http://your-server-ip:2283. You'll see the setup wizard:
Immich has apps for both iOS and Android:
In the app:
http://your-server-ip:2283 or your domain)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.
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.
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.
Some rough numbers to help with capacity planning:
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.
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.
Your photos deserve backup protection. Options include:
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
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.