How to Install Immich on Ubuntu 24.04 VPS with Docker Compose

Introduction

At ByteHosting, we understand the importance of having a reliable and easy-to-manage photo management solution. If you're looking to deploy Immich, an open-source photo management app, on your Ubuntu 24.04 VPS, you're in the right place. In this beginner-friendly guide, we will walk you through the entire process of installing Immich using Docker Compose. This approach simplifies deployment and makes it easy to manage updates and configurations.

Prerequisites: Setting Up Your Ubuntu 24.04 VPS and Installing Docker Compose

1. Choose and Set Up Your VPS

First, you need a fresh Ubuntu 24.04 VPS. At ByteHosting, we offer cost-effective VPS solutions in Frankfurt am Main, Germany, with options suitable for hosting applications like Immich. Once your VPS is ready, connect to it via SSH:

ssh username@your-vps-ip

2. Update Your System

Before installing new software, ensure your system packages are up to date:

sudo apt update && sudo apt upgrade -y

3. Install Docker and Docker Compose

Docker is essential for containerized deployment, and Docker Compose simplifies managing multi-container applications. Install Docker with the following commands:

sudo apt install docker.io -y

Enable Docker to start on boot:

sudo systemctl enable --now docker

Next, install Docker Compose:

sudo apt install docker-compose -y

Verify the installation:

docker --version
docker-compose --version

Installing Immich with Docker Compose: Step-by-Step Instructions

1. Create a Directory for Immich

Organize your deployment by creating a dedicated directory:

mkdir ~/immich && cd ~/immich

2. Create a Docker Compose File

In this directory, create a file named docker-compose.yml. This file defines the services needed for Immich:

nano docker-compose.yml

Paste the following configuration into the file:

version: '3.8'

services:
  immich:
    image: ghcr.io/immich-app/immich:latest
    container_name: immich
    restart: unless-stopped
    ports:
      - "3000:3000"
    environment:
      - IMMICH_HOSTNAME=your-domain-or-ip
      - IMMICH_ADMIN_EMAIL=admin@example.com
      - IMMICH_ADMIN_PASSWORD=your-secure-password
    volumes:
      - ./data:/app/data

Replace your-domain-or-ip and other environment variables as needed. This setup exposes Immich on port 3000.

3. Deploy Immich

Start the container with Docker Compose:

docker-compose up -d

This command downloads the Immich image and runs it in detached mode. You can check the status with:

docker ps

Configuring Immich for Optimal Performance and Security

  • SSL/TLS: For secure access, set up a reverse proxy with Nginx and obtain an SSL certificate via Let's Encrypt.
  • Firewall: Configure your firewall to allow only necessary ports (e.g., 443 for HTTPS).
  • Data Storage: Map persistent volumes to ensure your photos are stored safely outside the container.
  • Admin Credentials: Use strong, unique passwords for your admin account.

Testing Your Immich Deployment: Accessing the Web Interface

Once everything is running, open your browser and navigate to http://your-vps-ip:3000 or your domain if configured with SSL. Log in with the admin credentials you set earlier. You should see the Immich interface ready for uploading and managing your photos.

Troubleshooting Common Issues During Installation and Setup

  • Container Not Starting: Check logs with docker logs immich for errors.
  • Port Conflicts: Ensure no other service is using port 3000 or your configured port.
  • SSL Issues: Verify your reverse proxy configuration and SSL certificates.
  • Data Persistence: Confirm your volume mappings are correct to prevent data loss.

Conclusion

Deploying Immich on your Ubuntu 24.04 VPS with Docker Compose is a straightforward process that offers a powerful, open-source photo management solution. At ByteHosting, we provide reliable VPS hosting in Frankfurt am Main, making it easy for you to run applications like Immich without hassle. Follow our step-by-step guide, and you'll have your own Immich server up and running in no time. If you encounter any issues or need a suitable VPS plan, our team is here to help. Happy hosting!

Read more