8.2.23 Installation and configuration Immich
Immich is a modern self-hosted application for storing and automatically organizing photos and videos, an alternative to Google Photos. It supports uploads from mobile devices, face recognition, automatic sorting, and cloud backups under your full control.
In this guide, we will walk through installing Immich on an Ubuntu 24.04 server using Docker Compose.
Server Preparation
Requirements
- A virtual or dedicated server with Ubuntu 24.04 LTS installed.
- At least 4 GB RAM (8 GB recommended).
- At least 40 GB of free disk space (depending on the number of photos/videos).
- Installed Docker and Docker Compose.
Variables
SERVER_IP_ADDRESS
— server IP address.YOUR_DOMAIN
— domain for accessing Immich (e.g., photos.example.com).YOUR_USER
— user on the server (if not root).IMMICH_PATH
— directory for installing Immich (e.g.,/opt/immich
).DB_PASSWORD
— PostgreSQL password.JWT_SECRET
— secret for authorization tokens.IMMICH_PORT
— access port (2283 by default).
Installing and Configuring Immich
Go to the working directory and download the official repository:
git clone https://github.com/immich-app/immich.git IMMICH_PATH
cd IMMICH_PATH/docker
Configuring Environment Variables
Copy the example environment file and edit it:
cp example.env .env
nano .env
Specify your parameters:
DB_PASSWORD=YOUR_STRONG_DB_PASSWORD
JWT_SECRET=YOUR_RANDOM_JWT_SECRET
IMMICH_PORT=2283
Starting the Containers
Start the service:
docker compose up -d
Check the status:
docker compose ps
If all containers show the Up
status, the application is running.
Accessing Immich
By default, Immich is available at:
http://`SERVER_IP_ADDRESS`:2283
We recommend configuring a domain and an SSL certificate for secure access.
Tip: Immich can be configured to use Let’s Encrypt SSL certificates. You can learn how to set this up in this article.
Configuring Additional Features
SMTP Mail
Immich supports sending email notifications (e.g., password reset).
Edit .env
:
EMAIL_HOST=smtp.example.com
EMAIL_PORT=587
EMAIL_USER=your_user@example.com
EMAIL_PASSWORD=your_password
EMAIL_FROM=immich@example.com
Backups
It is recommended to regularly back up:
- The PostgreSQL database (
pg_dump
). - The directory with uploaded photos/videos (
upload/
).
Example database backup:
docker exec -t immich_postgres pg_dump -U postgres immich > backup.sql
Common errors
Error / Symptom | Cause | Solution | Diagnostics (logs / commands) | |
---|---|---|---|---|
container exited (1) |
Incorrect environment variables | Check .env and fix the values |
docker compose logs |
|
No access to web interface | Port is closed or used by another proc | Make sure port 2283 is open, or change IMMICH_PORT |
ss -tulpn / grep 2283 |
|
Database connection error | Wrong PostgreSQL password | Check DB_PASSWORD in .env |
docker compose logs postgres |
Useful Links
Official documentation