How to Deploy Immich - An Opensource Alternative to Google Photos

Updated on 15 January, 2026
Deploy Immich photo and video management with Docker Compose and Nginx.
How to Deploy Immich - An Opensource Alternative to Google Photos header image

Immich is an open source, high-performance photo and video management solution that enables you to securely create, back up, and manage media files on a server. Immich is a self-hosted alternative to Google Photos, offering a user-friendly web-based interface for uploading and managing photos and videos. You can extend Immich with external storage solutions, such as Vultr Block Storage, making it a privacy-first solution for storing photos and videos using albums on your server.

This article explains how to install and configure Immich using Docker.

Prerequisites

Before you begin, you need to:

Set Up the Directory Structure, Configuration, and Environment Variables

This section prepares the project directory and environment variables file for deploying Immich.

  1. Create a new project directory in your home directory, such as immich, to store your Immich project files.

    console
    $ mkdir ~/immich
    
  2. Switch to the project directory.

    console
    $ cd ~/immich
    
  3. Download the latest .env file for Immich.

    console
    $ wget -O .env https://github.com/immich-app/immich/releases/latest/download/example.env
    
  4. Edit the .env configuration for Immich using a text editor like nano.

    console
    $ nano .env
    
  5. Uncomment the #TZ directive and specify the timezone to use with Immich. For example, Europe/London.

    ini
    TZ=Europe/London
    

    Save and close the file.

    Within the .env file:

    • UPLOAD_LOCATION: Specifies the default path to store all uploaded images and videos in Immich. The default library value creates a new directory in your Immich project directory to store the uploaded files.
    • DB_DATA_LOCATION: Specifies a storage path for all PostgreSQL database files.
    • TZ: Specifies the timezone to use with Immich. Visit the Wiki list of timezones for a list of the supported formats.
    • IMMICH_VERSION: Specifies the Immich version to run on your server.
    • DB_PASSWORD: The database password to authenticate with a username for the PostgreSQL container.
    • DB_USERNAME: The username to authenticate with the PostgreSQL database.
    • DB_DATABASE_NAME: The database name to store all Immich configurations and metadata.

Deploy with Docker Compose

This section launches Immich and its required services using Docker Compose. Immich offers an official Docker Compose manifest that includes PostgreSQL for metadata storage and Valkey (a Redis-compatible in-memory datastore) for background jobs, caching, and task queues.

  1. Download the latest Immich manifest for Docker Compose.

    console
    $ wget https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
    

    This file defines all required services, including:

    • immich-server - the main Immich application
    • postgres - stores metadata such as users, albums, and file references
    • valkey – handles background jobs, caching, and task queues
  2. Add your user account to the docker user group.

    console
    $ sudo usermod -aG docker $USER
    
  3. Apply new group membership.

    console
    $ newgrp docker
    
  4. Start the Immich container and the Valkey, PostgreSQL dependency containers.

    console
    $ docker compose up -d
    
  5. List all active Docker containers and verify that the Immich, Valkey and PostgreSQL are active.

    console
    $ docker compose ps
    
  6. Send a GET request to the 2283 Immich port and verify that it's active.

    console
    $ curl -X GET 127.0.0.1:2283
    

Configure Nginx as a Reverse Proxy to Expose Immich

Immich runs on the host port 2283 and listens for HTTP connections, which is insecure by default. Follow the steps below to install Nginx and configure it as a reverse proxy to securely expose Immich using your immich.example.com domain.

  1. Update the APT package index.

    console
    $ sudo apt update
    
  2. Install Nginx.

    console
    $ sudo apt install nginx -y
    
  3. Enable the Nginx system service to start at boot.

    console
    $ sudo systemctl enable nginx
    
  4. Remove the default configuration from the /etc/nginx/sites-enabled directory to disable it.

    console
    $ sudo rm /etc/nginx/sites-enabled/default
    
  5. Create a new immich.conf Nginx virtual host configuration in the /etc/nginx/sites-available directory.

    console
    $ sudo nano /etc/nginx/sites-available/immich.conf
    
  6. Add the following configurations to the file. Replace immich.example.com with your actual domain.

    ini
    server {
        listen 80;
        server_name immich.example.com; 
    
        location / {
            client_max_body_size 10M;
            proxy_pass http://127.0.0.1:2283; 
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
        }
    }
    

    The above Nginx configuration:

    • Listens on port 80 and handles requests addressed to immich.example.com, and forwards them to the localhost port 2283 where Immich is active.
    • The client_max_body_size directive limits uploads to 10MB. Increase this value if you plan to upload larger image or video files.

    Save and close the file.

  7. Link the immich.conf file to the /etc/nginx/sites-enabled directory to enable it.

    console
    $ sudo ln -s /etc/nginx/sites-available/immich.conf /etc/nginx/sites-enabled/
    
  8. Test the Nginx configuration for errors.

    console
    $ sudo nginx -t
    

    You should see the output below:

    nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
    nginx: configuration file /etc/nginx/nginx.conf test is successful
  9. Restart Nginx to apply the configuration changes.

    console
    $ sudo systemctl restart nginx
    
  10. Allow incoming HTTP traffic through the firewall.

    console
    $ sudo ufw allow 80/tcp
    
  11. Allow HTTPS traffic through the firewall for secure access.

    console
    $ sudo ufw allow 443/tcp
    
  12. Reload UFW to apply the firewall configuration changes.

    console
    $ sudo ufw reload
    

Secure Immich with Trusted TLS Certificates

Follow the steps below to secure incoming connections to Immich with trusted TLS certificates.

  1. Install the Certbot Let's Encrypt plugin for Nginx.

    console
    $ sudo apt install certbot python3-certbot-nginx -y
    
  2. Generate a new TLS certificate for your Immich virtual host domain. Replace immich.example.com with your actual domain and admin@example.com with your active email address.

    console
    $ sudo certbot --nginx -d immich.example.com -m admin@example.com --non-interactive
    

    Certbot automatically updates the Nginx configuration to enable HTTPS for your Immich domain.

Access and Configure Immich

Immich requires an active administrative user in order to upload and manage media on your server. Follow the steps below to access Immich using your immich.example.com domain, set up an administrative user, and configure Immich on your server.

  1. Access your domain using a web browser such as Firefox.

    https://immich.example.com
  2. Click Getting Started to begin the Immich configuration process.

  3. Enter your administrator email, a strong password, and display name in the respective fields.

  4. Click Sign up to save the administrator user information.

  5. Enter your administrator email and password when prompted to log in to Immich.

    Login to Immich

  6. Navigate through the default Immich setup steps to customize your installation:

    • Click Theme to set up the Immich theme.
    • Choose light or dark to set as the default Immich theme.
    • Click Language and choose the preferred language from the dropdown list of options.
    • Click Server Privacy and toggle the optional features on or off to enable or disable maps and version checks.
    • Click User Privacy and select any optional features to enable or disable.
    • Click Storage Template and toggle Enable storage template engine to enable the auto-organization of files based on your Immich templates.
    • Click Backups, read the 3-2-1 backup strategy recommendations.
    • Click Mobile App to download the client or mobile application for your device.
    • Click Done to save and apply your Immich configuration.
  7. Verify that the Immich web management dashboard loads in your web browser.

  8. Click Upload on the top navigation bar to upload images from your workstation.

    Upload Images Using Immich

  9. Browse any images from your workstation and click Open to upload them to your Immich server.

  10. Verify the uploaded images in your Photos catalogue.

Create Users

  1. Click the user thumbnail in the top-right corner and select Administration from the list of options.

    Click Administration

  2. Click Users on the left navigation menu.

  3. Click Create user within the User Management page.

  4. Enter the new user's email, initial password, and display name. Then, enter the user's maximum storage in Gigabytes within the Quota Size field and click Create to apply the changes.

Upload and Manage Photos Using Immich

You can upload multiple images and videos from multiple devices using Immich. Follow the steps below to download the latest mobile app for your device, configure your server endpoint, and upload images using Immich.

  1. Open your mobile device's official application store. For example, Play Store for Android or Apple Store for iOS.

  2. Enter Immich as the search keyword to browse the list of available apps.

  3. Install the official Immich application.

  4. Open Immich and enter your Immich server domain in the Server Endpoint URL field and click Next.

  5. Enter your user email and password in the respective fields and click Login.

  6. Grant the Immich application access to the photos and videos library on your mobile device.

  7. Click Backup next to your user's thumbnail.

    Select Albums

  8. Click Select to specify the albums on your mobile device that you want to upload to the Immich server.

  9. Click Back and toggle Enable Backup to allow instant uploads to your Immich server.

    Enable Backups

  10. Monitor the upload progress within your Backup statistics.

  11. Access your Immich server from a different workstation, log in with the same user, and verify that all files uploaded from your mobile device are available.

    Verify uploaded files

Conclusion

In this article, you have installed and configured Immich to store images. Immich supports image and video uploads, enabling you to store your images without any storage or resource limits. You can migrate existing Images from Google Photos to Immich and use external storage solutions like Vultr Block Storage to increase the storage size on your server.

Comments