How to Install Immich with Docker Compose

Immich is one of the easiest ways to turn a plain Linux box into a photo and video server that actually feels modern. If you want automatic mobile uploads, albums, search, facial recognition, and a cleaner replacement for scattering memories across random cloud accounts, it is a very strong self-hosting option.

In this guide, you will install Immich on a Linux server with Docker Compose, use the project’s current release files, choose safer storage locations, start the containers, and complete the first browser-based setup.

Why Immich is worth hosting yourself

Immich is built for personal photo and video management.

That makes it appealing for self-hosters because it gives you:

  • a private library under your control

  • mobile backup support

  • web access for browsing and sharing

  • machine-learning features for better search and organization

  • a cleaner long-term home for family photos than a pile of unsorted folders

It is also one of the stronger flagship topics for a self-hosting site because the use case is immediately understandable even for beginners.

What you need before you start

Before you begin, make sure you have:

  • a 64-bit Linux server or VPS

  • Docker Engine installed from Docker’s official repository

  • the Docker Compose plugin available as docker compose

  • at least 6 GB of RAM, with 8 GB recommended by Immich for a smoother experience

  • enough disk space for your library, generated thumbnails, and transcoded video

If Docker is not installed yet, do that first:

Immich’s requirements docs also recommend local Linux storage for the database and warn that non-Linux setups often create a worse Docker experience.

Two important storage warnings before you deploy

These are easy to skip and annoying to fix later.

Keep the database on local storage

Immich’s requirements docs say the Postgres data directory should ideally live on local SSD-backed storage and never on a network share.

That matters because database latency and filesystem behavior are a big part of whether Immich feels stable.

Plan for extra storage beyond the original photos

Immich notes that thumbnails and transcoded video can increase storage usage by roughly 10 to 20 percent on average.

So if you already have a large library, do not size the server as if it only needs the exact space used by your original uploads.

What Immich installs with Docker Compose

The current Compose stack includes several services working together:

  • immich-server for the main web app and API

  • immich-machine-learning for AI-assisted features

  • redis for caching and queue work

  • database for PostgreSQL storage

This is one reason Immich is much nicer to deploy from the official Compose files than from a hand-written stack on day one.

Step 1: Create a folder for the Immich stack

Create a dedicated directory for the project.

mkdir -p ~/immich-app

Move into it.

cd ~/immich-app

Step 2: Download the current Immich Compose file

Immich’s own install docs say to use the files from the current release rather than copying a random compose file from somewhere else.

Download docker-compose.yml.

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

Step 3: Download the example environment file as .env

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

At this point, your folder should contain the two files Immich expects.

Step 4: Review the settings you actually need to change

Open .env in your editor.

nano .env

The most important values to review are:

  • UPLOAD_LOCATION — where Immich stores uploaded media

  • DB_DATA_LOCATION — where PostgreSQL stores its database files

  • TZ — your server timezone

  • DB_PASSWORD — the local database password used by the stack

  • IMMICH_VERSION — normally safe to leave as provided by the current release file unless you are intentionally pinning versions

A good beginner-friendly example looks like this:

UPLOAD_LOCATION=./library
DB_DATA_LOCATION=./postgres
TZ=Etc/UTC
IMMICH_VERSION=<leave the downloaded default unless you are pinning a version>
DB_PASSWORD=replacewithyourownrandomstring
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

A few practical notes matter here:

  • UPLOAD_LOCATION should point to storage with enough room for your actual photo library

  • DB_DATA_LOCATION should stay on local Linux-compatible storage

  • DB_PASSWORD should not stay at the placeholder value

  • Immich recommends using only A-Za-z0-9 characters for DB_PASSWORD

If you want a quick random password made of only letters and numbers, generate one like this:

python3 -c "import secrets,string; a=string.ascii_letters+string.digits; print(''.join(secrets.choice(a) for _ in range(24)))"

Copy the result into the DB_PASSWORD= line in .env, save the file, and exit the editor.

Step 5: Double-check your storage plan

Before you start the stack, confirm that your two important paths make sense:

  • media storage can grow over time

  • database storage is local, not on a network share

  • the filesystem supports normal Linux ownership and permissions

This step sounds boring, but it is much easier than migrating a large photo library later.

Step 6: Start Immich in the background

From the ~/immich-app directory, start the containers.

docker compose up -d

Immich’s docs note that if you hit weird Compose or Docker version errors here, it usually points back to an outdated or distro-packaged Docker install rather than an Immich-specific problem.

Step 7: Check that the containers came up cleanly

docker compose ps

You should see the Immich services listed and moving toward a healthy running state.

If one of them exits immediately, inspect the logs before continuing.

docker compose logs --tail=100 immich-server

Step 8: Open the web interface

By default, the official Compose file publishes Immich on port 2283.

Open this in your browser, replacing YOUR_SERVER_IP with your real server address:

http://YOUR_SERVER_IP:2283

If you already use a reverse proxy stack, you can later put Immich behind a domain with HTTPS instead of leaving it on a raw port.

Step 9: Create the first admin account

Immich’s post-install flow starts by registering the admin user in the web interface.

Use a strong password and an email address you control, then finish the initial setup in the browser.

Once you are signed in, you can create additional users later if needed. Complete the initial setup wizard and you'll land on the Immich dashboard at the end.

What to do after the install

A working install is only the beginning. The most useful next steps are:

  1. connect the mobile app and test photo backup

  2. review storage templates and library organization

  3. plan backups for both uploaded media and the database

  4. decide whether you want a domain name and HTTPS in front of Immich

If you want cleaner public access later, pair this with one of your reverse proxy guides once it is published or use your preferred existing proxy stack.

Common beginner mistakes to avoid

Using the wrong Docker package

Immich’s docs explicitly warn that older distro-packaged Docker versions can cause confusing errors. If docker compose behaves oddly, fix Docker first instead of guessing.

Leaving the database on unsuitable storage

The database path is not a place for a network share or a random compatibility filesystem.

Assuming the server only needs space for original uploads

Thumbnails, previews, and transcoded video add overhead, so leave room to grow.

Final check

A healthy first install usually means:

  • docker compose ps shows the stack running

  • the web app opens on port 2283

  • you can create the first admin account

  • the dashboard loads without container errors

At that point, Immich is ready for post-install tasks like mobile backup, domain setup, and backup planning.

Sources

Frequently Asked Questions

Does Immich need Docker Compose or will docker-compose work?
Immich's current documentation expects the modern `docker compose` command from Compose v2. The old `docker-compose` command is deprecated and Immich no longer treats it as the supported default.
Can I store Immich's Postgres data on a network share?
No. Immich recommends keeping `DB_DATA_LOCATION` on local storage, ideally SSD-backed storage, because database performance and filesystem compatibility are important for stability.
How much RAM does Immich need?
Immich recommends at least 6 GB of RAM for a smooth experience, with 8 GB recommended. Systems with only 4 GB can work only if machine learning features are disabled.

Related articles

📊
Monitoring
How to Install Uptime Kuma with Docker Compose
Install Uptime Kuma with Docker Compose on a Linux server, create your first admin account, and start monitoring websites or services from a simple web dashboard.
🐳
Docker & Containers
Docker Compose for Self-Hosted Apps: A Beginner-Friendly Guide
Learn how to use Docker Compose for self-hosted apps, including folder layout, compose files, environment variables, volumes, safe restarts, and basic update habits.
☁️
File & Cloud Storage
How to Install Nextcloud with Docker Compose
Install Nextcloud with Docker Compose using MariaDB and Redis, keep the data persistent, and finish the first web setup without turning the stack into a science project.
🔁
Reverse Proxies
How to Use Caddy as a Reverse Proxy for Self-Hosted Apps
Use Caddy with Docker Compose to put a self-hosted app behind one clean domain name, add automatic HTTPS, and keep the setup simple enough to maintain.