Back to Article List

How to install Immich on a VPS with Docker Compose

How to install Immich on a VPS with Docker Compose

Updated and tested 23 October 2026

Immich is the self-hosted answer to Google Photos that finally feels like one: mobile auto-backup, face recognition, search that understands "beach sunset" and a development pace that shipped it from beta to stable to a v3 major in about a year. That pace is also the thing to respect when you install it. This guide sets up Immich with Docker Compose on a VPS the official way, with the decisions that save you pain at upgrade time made correctly on day one.

Sizing the server for a photo library

Immich runs four containers (server, machine learning, Postgres, a Redis-compatible cache) and the machine-learning part is the hungry one, doing face detection and smart search indexing. Practical floor for a comfortable experience: 6 GB of RAM and 2 vCPU, with 8 GB and 4 vCPU recommended; the extra cores make the initial library indexing dramatically less tedious. The official requirements say as much (a 4 GB server runs Immich only with machine learning switched off), and I'd treat anything below that as a demo, not a home for your photos.

Storage is the real planning question. Photos accumulate in one direction only, and phone cameras now produce 5 MB HEICs and 100 MB videos without asking. Count your current library, double it and pick the plan from there. Postgres, on the other hand, wants fast disk, so on split setups keep the database on NVMe and point only the media at bulk storage.

Never delete a memory again

Keep every photo and video of the people you love, on reliable storage with unmetered bandwidth and a cost that stays predictable as the years add up.
Számlázási ciklus

VPS.H1

71.35 kr Save  14 %
61.14 kr havonta
  • 1 vCPU AMD EPYC
  • 2 GB RAM memória
  • ✔HDD tárhely
  • ✔Korlátlan sávszélesség
  • ✔ IPv4 és IPv6 benne van Az IPv6 támogatás jelenleg nem érhető el Franciaországban vagy Hollandiában.
  • ✔Tűzfal kezelése
  • ✔Szerver megfigyelés
  • ✔KVM virtualizáció

VPS.H3

255.08 kr Save  20 %
204.04 kr havonta
  • 4 vCPU AMD EPYC
  • 8 GB RAM memória
  • ✔HDD tárhely
  • ✔Korlátlan sávszélesség
  • ✔ IPv4 és IPv6 benne van Az IPv6 támogatás jelenleg nem érhető el Franciaországban vagy Hollandiában.
  • ✔Tűzfal kezelése
  • ✔Szerver megfigyelés
  • ✔KVM virtualizáció

VPS.H4

372.46 kr Save  18 %
306.12 kr havonta
  • 6 vCPU AMD EPYC
  • 12 GB RAM memória
  • ✔HDD tárhely
  • ✔Korlátlan sávszélesség
  • ✔ IPv4 és IPv6 benne van Az IPv6 támogatás jelenleg nem érhető el Franciaországban vagy Hollandiában.
  • ✔Tűzfal kezelése
  • ✔Szerver megfigyelés
  • ✔KVM virtualizáció

Step 1: get Docker and the official files

You need Docker Engine v25 or newer with the compose plugin (docker compose version to check; note the space, the old hyphenated docker-compose binary is deprecated). On a fresh Ubuntu VPS, install Docker Engine from Docker's own apt repository, as the Ubuntu page of Docker's install docs describes.

Make a home for Immich and pull the two release files:

mkdir -p /opt/immich && cd /opt/immich
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

Resist the urge to hand-roll the compose file from a blog post (including this one). Immich's own release attaches the compose file matching that version, and the project changes internals often enough that third-hand compose files are the top source of broken installs.

Step 2: edit the .env file

Open .env and set three things:

UPLOAD_LOCATION=/opt/immich/library
DB_PASSWORD=pick_something_alphanumeric
TZ=Europe/London

In the downloaded file the time zone line ships commented out as # TZ=Etc/UTC, so replace that line with your zone.

Two footnotes with teeth. UPLOAD_LOCATION is where every photo you ever upload will live, so put it on the volume with the space (this is the line you'd point at mounted bulk storage). And the database password only accepts plain A-Z, a-z and 0-9; special characters break the connection string, a documented quirk that costs new installs an hour of confused log reading. The password never leaves the machine (Postgres isn't exposed publicly), so a long boring alphanumeric string is exactly right. openssl rand -hex 16 prints one. The downloaded .env is readable by every user on the server (mode 644) and holds that password, so run chmod 600 .env once you've saved it.

The edited .env shows UPLOAD_LOCATION, TZ=Europe/London and IMMICH_VERSION=v3, and ls -l shows the file as -rw-r--r--

After my edits the .env held the three values, and the downloaded file was readable by every user on the box.

The IMMICH_VERSION variable defaults to the current major, v3. Pinning it to an exact release instead is the conservative move; more on that trade-off in our Immich update guide, because it's really an upgrade-strategy decision.

Step 3: start the containers

docker compose up -d

First run pulls a few gigabytes of images (the machine-learning container carries models), so give it a few minutes, then check all four containers report healthy:

docker compose ps

docker compose ps lists immich_machine_learning, immich_postgres, immich_redis and immich_server, all Up (healthy)

About half a minute after up -d all four containers on my server were healthy, with only 2283 published.

The web interface answers at http://YOUR_SERVER_IP:2283. The first visit asks you to create the admin account (this first account owns server administration, treat the password accordingly), then runs a short onboarding (theme, language, privacy settings, the storage template, backup advice and the mobile app) and you land in an empty library. Port 2283 and what to put in front of it get their own article in the Immich ports guide; short version, for anything beyond a quick test you want a reverse proxy with HTTPS in front, since your phone will be shipping your entire camera roll to this address.

Immich onboarding Storage Template step: No template, YYYY/MM/DD or Custom {{y}}/{{y}}-{{MM}}-{{dd}}/{{filename}}

The onboarding on my v3.3.5 server includes a storage template step, so this is the moment to decide on it.

Do the welcome screen right after up -d. Until the first admin exists, anyone who reaches port 2283 can create it; on my server the sign-up stayed open until the first account existed and refused a second one after that. Docker publishes 2283 on every address and ufw rules don't reach it, so to keep it private change the line - '2283:2283' under immich-server in docker-compose.yml to - '127.0.0.1:2283:2283' and put the reverse proxy in front.

Step 4: connect the mobile app

Install Immich from the App Store or Play Store, point it at your server URL (the full address with scheme and port, or your proxied HTTPS domain), sign in and enable backup for the albums you want synced. The first backup of a full camera roll is measured in hours and entirely network-bound; leave the phone on wifi and charging overnight and it's done by morning. Photos land in UPLOAD_LOCATION, thumbnails generate, faces start clustering after the ML jobs chew through the library.

Web uploads, album sharing and partner accounts all work out of the box from here. The one setup piece I'd do in week one rather than someday: backups. Immich dumps its database nightly on its own, but the photo files themselves are your responsibility, and a photo library is the least replaceable data most people own.

Verify the install

Four checks and you're done. All containers healthy in docker compose ps. A test photo uploaded through the web UI appears with a thumbnail (proves storage writes and the thumbnail pipeline). The same photo turns up in a smart search for its content a few minutes later (proves the ML container is doing its job). And Administration » Job Queues shows queues ticking along rather than piling up errors. Anything failing there usually traces to permissions on UPLOAD_LOCATION or too little RAM for the ML container, in that order.

From here Immich mostly runs itself, with one standing obligation: read the release notes before you update, because the project ships fast and breaking changes are routine housekeeping rather than rare events. That habit, plus the backup, is the entire maintenance story. You can also start Immich from a one-click template on the Immich VPS plans.

Questions?

How do I reset the Immich admin password?

Run docker exec -it immich_server immich-admin reset-admin-password on the server. It's one of Immich's server commands: it asks for a new password, which is optional, and then offers to invalidate the sessions that are logged in. Other accounts need no command, because the admin opens the menu next to the user in Administration » Users and picks Reset Password, which sets a random password the user changes at the next sign-in.

Never run out of space again

Keep backups, archives and media on reliable storage with unmetered bandwidth and a cost per gigabyte that stays low as the years add up. Your first VPS comes with a 30-day money-back guarantee.