Run Immich Locally with Docker

Run Immich Locally with Docker

Looking for a self-hosted alternative to Google Photos, Apple iCloud Photos, or Amazon Photos? Immich is a fast, open-source all-in-one photo and video management solution that you can run on your own hardware. It supports automatic backups from your phone, facial recognition, geotagging, and a full web app. The officially recommended way to run it in production is with Docker Compose.

In this guide I’ll show you how to install Immich on a home server with Docker in a few minutes.

What is Immich?

Immich is a self-hosted web and mobile application for managing your photos and videos. Think of it as your own Google Photos: your phone automatically backs up your camera roll to your server, and you get a polished interface to browse, search and organise everything. Key features include:

  • Automatic, resumable backups from the official Android / iOS apps
  • Facial recognition, object detection and geotagging
  • Web, mobile and desktop clients
  • Shared albums and multi-user support
  • Free and open source (AGPL v3)

Prerequisites

Before you start, make sure your server has:

  • Docker and Docker Compose installed
  • Enough free disk space for your photo/video library
  • The port 2283 free (this is where the web app will be served)

Step 1 – Download the required files

Create a directory to hold the configuration files and move into it:

mkdir ./immich-app
cd ./immich-app

Download the latest docker-compose.yml and .env files from the official Immich releases:

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

You can also grab these two files from your browser and move them into the directory – just make sure to rename example.env to .env.

Step 2 – Edit the .env file

Open .env in a text editor. There are a few values worth changing before you start:

  • UPLOAD_LOCATION – where your uploaded files are stored. Point this at a fresh directory with plenty of free space (default ./library).
  • DB_DATA_LOCATION – where the Postgres database files live (default ./postgres). Network shares are not supported for the database, so keep it on local storage.
  • DB_PASSWORD – change this to a random value. Postgres is not exposed to the internet, so this is only used for local authentication. Use only A-Za-z0-9 characters – pwgen is handy for generating one.
  • TZ – uncomment the line and set your timezone, e.g. TZ=Europe/Rome (see the IANA time zone list).
  • IMMICH_VERSION – leave as v3 for the latest, or pin a specific version such as v2.1.0.

Everything below the marker line in the file (database username, database name) can stay as-is.

Step 3 – Start the containers

From the immich-app directory, start Immich as a background service:

docker compose up -d

Docker will pull the images and start the server, database, and ML containers. The first run can take a few minutes while the images download.

Post-installation

Once the containers are up, open the web app at http://<server-ip>:2283 and click Getting Started. The first user you register automatically becomes the admin account. From there you can:

  • Create additional user accounts (Administration → Users → Create user)
  • Configure the storage template for how files are organised on disk (Administration → Settings → Storage Template)
  • Set up automatic backups from the mobile app

Install the official mobile app from the App Store or Google Play, sign in with the server endpoint http://<server-ip>:2283, and enable backup on the albums you want to sync.

Next steps

  • Read the official post-installation guide for backup strategies, external libraries and hardware acceleration.
  • Follow the upgrade instructions when a new version is released.
  • Set up server backups – a 3-2-1 strategy (multiple local copies plus one offsite) is strongly recommended so a single drive failure never costs you your memories.

That’s it – you now have a fully self-hosted photo and video manager running on your own hardware, with no cloud in the middle.

Official docs: docs.immich.app/install/docker-compose