Independent testing Updated August 2026 387 self-hosting guides 5 VPS providers tested

guide

How to Self-Host Immich on a VPS (Complete Guide)

A complete step-by-step guide to self-hosting Immich on a VPS in 2026, covering installation, configuration, securing Immich, and the specs you need.

Self-hosting an application can provide you with greater control over your data and enhance your privacy. Immich, a self-hosted photo and video backup solution, can be easily set up on a Virtual Private Server (VPS). In this guide, we will walk you through the steps to install Immich on a VPS, using Docker for containerization.

We host our own photo library this way, and the thing worth knowing before you begin is that the install is the easy part. Getting the first few thousand photos uploaded, and having a backup you actually trust afterwards, is the work.

What You Need

  1. VPS Provider: Choose a VPS provider that fits your needs. Here are some options:

    ProviderPrice (EUR/USD)FeaturesLink
    Contabo VPS5.99 EUR/moSSD Storage, Backup OptionsContabo
    Hetzner Cloud5.49 EUR/moHigh Performance, ScalabilityHetzner
    DigitalOcean6 USD/moUser-Friendly, Developer EcosystemDigitalOcean
    Vultr6 USD/moGlobal Data Centers, Fast SetupVultr
    Linode5 USD/moReliable Support, Advanced NetworkingLinode

    For a full VPS comparison, visit this page.

  2. Domain Name: A domain name is recommended for accessing your Immich installation.

  3. Basic Knowledge: Familiarity with Linux commands and Docker.

Step-by-Step Installation Guide

Step 1: Set Up Your VPS

  1. Choose Your OS: For this installation, weโ€™ll be using Ubuntu 22.04. Other distributions can be used but may require adjustments in commands.

  2. Access Your VPS: Connect to your VPS using SSH. Replace user and ip_address with your credentials:

    ssh user@ip_address
  3. Update the Package Repository:

    sudo apt update
    sudo apt upgrade -y

Step 2: Install Docker

  1. Install Required Packages:

    sudo apt install apt-transport-https ca-certificates curl software-properties-common -y
  2. Add Dockerโ€™s Official GPG Key:

    sudo install -m 0755 -d /etc/apt/keyrings
    sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
    sudo chmod a+r /etc/apt/keyrings/docker.asc
  3. Set Up the Stable Repository:

    echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  4. Install Docker:

    sudo apt update
    sudo apt install docker-ce -y
  5. Enable Docker to Start on Boot:

    sudo systemctl enable docker
    sudo systemctl start docker

Step 3: Install Docker Compose

  1. Download Docker Compose:

    sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
  2. Set Permissions:

    sudo chmod +x /usr/local/bin/docker-compose
  3. Verify Installation:

    docker-compose --version

Step 4: Deploy Immich

  1. Create a Directory for Immich:

    mkdir ~/immich
    cd ~/immich
  2. Create a Docker Compose File:

    nano docker-compose.yml

    Add the following configuration:

    services:
      immich-server:
        image: ghcr.io/immich-app/immich-server:release
        restart: always
        ports:
          - "2283:2283"
        environment:
          DB_HOSTNAME: database
          DB_USERNAME: immich
          DB_PASSWORD: your-secure-password
          DB_DATABASE_NAME: immich
          REDIS_HOSTNAME: redis
          UPLOAD_LOCATION: ./library
        volumes:
          - ./library:/data
        depends_on:
          - database
          - redis
    
      immich-machine-learning:
        image: ghcr.io/immich-app/immich-machine-learning:release
        restart: always
        volumes:
          - model-cache:/cache
    
      redis:
        image: docker.io/valkey/valkey:9
        restart: always
    
      database:
        image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0
        restart: always
        environment:
          POSTGRES_USER: immich
          POSTGRES_PASSWORD: your-secure-password
          POSTGRES_DB: immich
        volumes:
          - db-data:/var/lib/postgresql/data
    
    volumes:
      db-data:
      model-cache:
  3. Start the Immich Service:

    docker-compose up -d
  4. Access Immich: Open your browser and navigate to http://your-domain-or-ip:2283.

A note on the compose file above: take the current one from the Immich release you are installing rather than copying any example, including this one. Immich moves quickly and the project ships a compose file per release. We have broken our own instance by carrying an old file across an upgrade.

Step 5: Configure Domains and SSL (Optional)

For a production-level application, it is advisable to secure your installation with SSL using tools like Certbot.

  1. Install Certbot and the Nginx service:

    sudo apt install certbot python3-certbot-nginx -y
  2. Then, you can follow the Certbot instructions for your server setup to obtain an SSL certificate.

Do not treat this step as optional for a photo library. We put TLS in front of Immich before the first upload rather than after, because the mobile app will happily talk to a plain HTTP endpoint and you do not want it doing that over someone elseโ€™s wifi.

FAQs

1. How does Immich compare to other self-hosted solutions?

Immich is designed specifically for photo and video storage, making it ideal for users who need a dedicated space for their multimedia content. Unlike Nextcloud or OwnCloud which offer broader functionalities, Immich focuses on providing a simple, fast, and efficient platform for your media files. It also boasts a sleek interface and easy setup via Docker, appealing to users looking for quick deployment without sacrificing performance.

2. Why should I use a VPS instead of shared hosting for Immich?

Using a VPS offers several advantages for self-hosting Immich, including better performance, dedicated resources, and complete control over the environment. Unlike shared hosting, a VPS allows you to install the necessary software and configure the server according to your needs. This is especially beneficial for resource-intensive applications like Immich, which require optimal storage and processing capabilities.

3. What are some common issues I might face when self-hosting Immich?

Common issues can include network configuration problems, database connection errors, or issues with file permissions. When deploying Immich, ensure that your VPS has adequate firewall rules to permit traffic on the required ports. Additionally, confirming that all dependencies are met and that Docker is configured correctly will help minimize potential issues. For troubleshooting, the Immich documentation and r/selfhosted community are great resources.

By following this guide, you can confidently self-host Immich on a VPS, giving you full control over your media files while enhancing your understanding of containerization with Docker.