How to Install Immich on Ubuntu 24.04
Introduction
Immich is a modern self-hosted photo and video management platform that provides automatic mobile backups, facial recognition, AI-powered search, albums, sharing, timeline browsing, and a clean web interface.
In this guide, we will deploy Immich on a fresh Ubuntu 24.04 server using Docker Engine and Docker Compose from Docker’s official repository. Instead of using a domain name and SSL certificate, this deployment will use the server’s public IP address directly, making it ideal for testing environments, home labs, and private servers.
After completing this tutorial, Immich will be accessible at:
http://YOUR_SERVER_IP:2283
Prerequisites
Before starting, make sure you have:
- A fresh Ubuntu 24.04 server
- Root or sudo access
- A public IPv4 address
- At least 2 vCPU
- At least 4 GB RAM
- At least 50 GB of available storage
1. Verify the Operating System
Before installing any software, verify that the server is running Ubuntu 24.04.
cat /etc/os-release
Expected output:
PRETTY_NAME="Ubuntu 24.04 LTS"
If the server is running a different operating system version, upgrade or reinstall the operating system before continuing.
2. Install Docker Engine and Docker Compose
Immich is deployed using Docker Compose. The recommended installation method is to install Docker directly from Docker’s official Ubuntu repository rather than using Ubuntu’s packaged Docker version.
Start by updating the package index and installing the required dependencies:
apt-get update apt-get -y install ca-certificates curl gnupg lsb-release
Remove any existing Docker packages to avoid conflicts:
apt-get remove -y docker.io docker-compose docker-compose-v2 docker-doc podman-docker containerd runc || true
Create the Docker keyring directory:
install -m 0755 -d /etc/apt/keyrings
Download Docker’s official GPG key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
Allow all users to read the key:
chmod a+r /etc/apt/keyrings/docker.asc
Add Docker’s official repository:
cat >/etc/apt/sources.list.d/docker.sources <<'EOF' Types: deb URIs: https://download.docker.com/linux/ubuntu Suites: noble Components: stable Signed-By: /etc/apt/keyrings/docker.asc EOF
Refresh package information:
apt-get update
Install Docker Engine and Docker Compose:
apt-get -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Enable Docker so it starts automatically after every reboot:
systemctl enable --now docker
Verify that Docker is working correctly:
docker run --rm hello-world
Display the installed Docker version:
docker --version
Display the installed Docker Compose version:
docker compose version
If all commands complete successfully, Docker is ready for use.
3. Download the Immich Compose Bundle and Prepare the Environment
Next, create the Immich working directory and download the official deployment files.
Generate a secure database password:
DB_PASSWORD=$(python3 -c "import secrets, string; alphabet = string.ascii_letters + string.digits; print(''.join(secrets.choice(alphabet) for _ in range(24)))")
Create the Immich directory:
mkdir -p /opt/immich cd /opt/immich
Download the official Compose file:
wget -O docker-compose.yml https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
Download the example environment file:
wget -O .env https://github.com/immich-app/immich/releases/latest/download/example.env
Create storage directories for media uploads and PostgreSQL data:
mkdir -p /opt/immich/library /opt/immich/postgres
Configure the environment file:
sed -i 's|^UPLOAD_LOCATION=.*|UPLOAD_LOCATION=/opt/immich/library|' .env
sed -i 's|^DB_DATA_LOCATION=.*|DB_DATA_LOCATION=/opt/immich/postgres|' .env
sed -i 's|^# TZ=.*|TZ=Etc/UTC|' .env
sed -i 's|^IMMICH_VERSION=.*|IMMICH_VERSION=v2.5.6|' .env
sed -i "s|^DB_PASSWORD=.*|DB_PASSWORD=${DB_PASSWORD}|" .env
This configuration stores uploaded media in /opt/immich/library and PostgreSQL data in /opt/immich/postgres.
Pinning the Immich version ensures a predictable deployment and prevents unexpected changes from future releases.
4. Start the Immich Stack
Pull the required container images:
cd /opt/immich docker compose pull
Depending on your network speed, the download may take several minutes.
Once the images have been downloaded, start the stack:
docker compose up -d
Verify the container status:
docker compose ps
You should see the following services running:
- immich_server
- immich_machine_learning
- database
- redis
All containers should display an Up or Healthy status.
5. Validate the Installation
Confirm that Docker, Compose, and Immich are running correctly.
Check the installed versions:
docker --version docker compose version
Verify the environment configuration:
cd /opt/immich grep -E '^(IMMICH_VERSION|UPLOAD_LOCATION|DB_DATA_LOCATION|TZ)=' .env
Check running containers:
docker compose ps
Display downloaded images:
docker compose images
Test the local Immich endpoint:
curl -I http://127.0.0.1:2283/
Test the public endpoint:
curl -I http://YOUR_SERVER_IP:2283/
Expected output:
HTTP/1.1 200 OK
A successful HTTP response confirms that Immich is operational and accessible.
6. Open Immich and Create the First Administrator Account
Open your browser and navigate to:
http://YOUR_SERVER_IP:2283
Immich will display the first-user setup page.
Create your administrator account by entering:
- Email address
- Password
- First name
- Last name
The first account automatically receives administrator privileges.
7. Install the Mobile Application
Immich provides official applications for Android and iOS devices.
After installing the application:
- Open Immich.
- Enter:
http://YOUR_SERVER_IP:2283
Log in using the administrator account.
- Enable automatic backups.
Your photos and videos will begin uploading to the server automatically.
Useful Commands
View logs:
docker compose logs -f
Restart Immich:
docker compose restart
Stop Immich:
docker compose down
Start Immich:
docker compose up -d
Update Immich:
cd /opt/immich docker compose pull docker compose up -d
Conclusion
Immich provides a powerful self-hosted alternative to cloud photo storage services while keeping your media entirely under your control.
In this guide, we installed Docker Engine from Docker’s official repository, deployed Immich using the official Compose bundle, configured persistent storage, and validated the deployment using a public IP address.
Your Immich server is now ready to back up, organize, and manage your photo and video collection.
Log in using the administrator account.