---
title: How to Deploy Immich – An Opensource Alternative to Google Photos
url: https://docs.vultr.com/how-to-deploy-immich-an-opensource-alternative-to-google-photos
description: Deploy Immich photo and video management with Docker Compose and Nginx.
publish_date: 2026-01-14T15:42:56.512782Z
last_updated: 2026-09-11T16:42:32.381974Z
author: Ivan Adams Chezkov
header_image: https://assets.vultrdevrel.com/docs-main-doc-assets-1/2464/284f186c-d108-4bb7-8462-b2a6f80cf377.png
---

> Index of every Vultr Docs page in markdown: https://docs.vultr.com/llms.txt

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:

* Have access to an [Ubuntu 24.04 server](https://www.vultr.com/servers/ubuntu/) as a [non-root user with sudo privileges](https://docs.vultr.com/how-to-create-a-sudo-user-in-linux).
* [Install Docker and Docker Compose](https://docs.vultr.com/how-to-install-docker-on-ubuntu-24-04#install-docker).
* Configure a domain name, such as `immich.example.com`, to point to your server’s public IP address.

## 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
    ```

1. Switch to the project directory.

    ```console
    $ cd ~/immich
    ```

1. Download the latest `.env` file for Immich.

    ```console
    $ wget -O .env https://github.com/immich-app/immich/releases/latest/download/example.env
    ```

1. Edit the `.env` configuration for Immich using a text editor like nano.

    ```console
    $ nano .env
    ```

1. 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. See the [list of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) for 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

1. Add your user account to the docker user group.

    ```console
    $ sudo usermod -aG docker $USER
    ```

1. Apply new group membership.

    ```console
    $ newgrp docker
    ```

1. Start the Immich container and the Valkey, PostgreSQL dependency containers.

    ```console
    $ docker compose up -d
    ```

1. List all active Docker containers and verify that the Immich, Valkey, and PostgreSQL containers are active.

    ```console
    $ docker compose ps
    ```

    The output displays three running containers with a status of `Up`: the Immich server, the PostgreSQL database, and Valkey.

1. Send a `GET` request to the Immich port `2283` and verify that it's active.

    ```console
    $ curl -X GET 127.0.0.1:2283
    ```

    The command returns an HTTP response from the Immich server, confirming that the application is running and reachable on the port.

## 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
    ```

1. Install Nginx.

    ```console
    $ sudo apt install nginx -y
    ```

1. Enable the Nginx system service to start at boot.

    ```console
    $ sudo systemctl enable nginx
    ```

1. Remove the default configuration from the `/etc/nginx/sites-enabled` directory to disable it.

    ```console
    $ sudo rm /etc/nginx/sites-enabled/default
    ```

1. 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
    ```

1. 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 `10 MB`. Increase this value if you plan to upload larger image or video files.

    Save and close the file.

1. 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/
    ```

1. Test the Nginx configuration for errors.

    ```console
    $ sudo nginx -t
    ```

    The output confirms that the configuration syntax is valid and the test is successful.

1. Restart Nginx to apply the configuration changes.

    ```console
    $ sudo systemctl restart nginx
    ```

1. Allow incoming HTTP traffic through the firewall.

    ```console
    $ sudo ufw allow 80/tcp
    ```

1. Allow HTTPS traffic through the firewall for secure access.

    ```console
    $ sudo ufw allow 443/tcp
    ```

1. 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
    ```

1. 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
    ```

1. Click **Getting Started** to begin the Immich configuration process.
1. Enter your administrator email, a strong password, and display name in the respective fields.
1. Click **Sign up** to save the administrator user information.
1. Enter your administrator email and password when prompted to log in to Immich.

    ![Login to Immich](https://i.postimg.cc/jdNR1rnp/Screenshot-18.png)

1. 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** and review 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.

1. Verify that the Immich web management dashboard loads in your web browser.
1. Click **Upload** on the top navigation bar to upload images from your workstation.

    ![Upload Images Using Immich](https://i.postimg.cc/dtdJfKZB/Screenshot-27.png)

1. Browse any images from your workstation and click **Open** to upload them to your Immich server.
1. Verify the uploaded images in your **Photos** catalog.

### Create Users

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

    ![Click Administration](https://i.postimg.cc/tR8XDgJz/Screenshot-31.png)

1. Click **Users** on the left navigation menu.
1. Click **Create user** within the **User Management** page.
1. 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 App Store for iOS.
1. Enter **Immich** as the search keyword to browse the list of available apps.
1. Install the official Immich application.
1. Open Immich and enter your Immich server domain in the **Server Endpoint URL** field and click **Next**.
1. Enter your user email and password in the respective fields and click **Login**.
1. Grant the Immich application access to the photos and videos library on your mobile device.
1. Click **Backup** next to your user's thumbnail.

    ![Select Albums](https://i.postimg.cc/WzZDYSy0/Screenshot-20251203-032105.jpg)

1. Click **Select** to specify the albums on your mobile device that you want to upload to the Immich server.
1. Click **Back** and toggle **Enable Backup** to allow instant uploads to your Immich server.

    ![Enable Backups](https://i.postimg.cc/sxWBHKLP/Screenshot-20251203-032321.jpg)

1. Monitor the upload progress within your **Backup** statistics.
1. 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](https://i.postimg.cc/SNCfxVvH/Screenshot-34.png)

??? note "Optional: Configure Vultr Block Storage to Store Photos Using Immich"

    You can integrate Immich with Vultr Block Storage to store bulk images and videos with extended storage to keep your server storage well optimized. Follow the steps below to configure the Vultr Block Storage volume as the main storage path for Immich.

    1. Provision a [Vultr Block Storage](https://docs.vultr.com/products/cloud-storage/block-storage/provisioning) volume using the Vultr Console.

    1. Attach the volume to your Immich instance and [mount it](https://docs.vultr.com/products/cloud-storage/block-storage/mount/linux) to `/mnt/blockstorage`. See the [attach a Block Storage volume](https://docs.vultr.com/products/cloud-storage/block-storage/management/attach-instances) documentation for details.

    1. List all storage devices attached to your Immich instance and verify that your Vultr Block Storage volume is available and mounted.

        ```console
        $ lsblk
        ```

    1. Navigate to your Immich project directory.

        ```console
        $ cd ~/immich
        ```

    1. Stop the currently running Immich containers. This is critical to ensure the new storage configuration is loaded correctly.

        ```console
        $ docker compose down
        ```

    1. Manually create the required Immich folder structure on your Block Storage. This ensures all necessary subdirectories exist before the container starts.

        ```console
        $ sudo mkdir -p /mnt/blockstorage/immich/{library,upload,thumbs,profile,encoded-video,backups}
        ```

    1. Create the hidden `.immich` system marker files in each directory. This prevents "System Integrity" errors during startup.

        ```console
        $ sudo touch /mnt/blockstorage/immich/{library,upload,thumbs,profile,encoded-video,backups}/.immich
        ```

    1. Sync existing Immich media files to the Block Storage volume.

        ```console
        $ sudo rsync -avzh ./library/* /mnt/blockstorage/immich/
        ```

    1. Change the directory ownership to the Immich container user (UID 1000). This grants the container full read and write permissions.

        ```console
        $ sudo chown -R 1000:1000 /mnt/blockstorage/immich
        ```

    1. Open the `.env` configuration.

        ```console
        $ nano .env
        ```

    1. Change the `UPLOAD_LOCATION=` value to the `/mnt/blockstorage/immich` path.

        ```ini
        UPLOAD_LOCATION=/mnt/blockstorage/immich
        ```

        Save and close the `.env` file.

    1. Start the Immich container with the new storage configuration.

        ```console
        $ docker compose up -d
        ```

    1. List all active Docker containers and verify that Immich is running.

        ```console
        $ docker compose ps
        ```

    1. Print the active Immich environment configuration and verify that the upload location points to your `/mnt/blockstorage/immich` directory.

        ```console
        $ docker exec -it immich_server env | grep UPLOAD_LOCATION
        ```

    1. Access the Immich web management dashboard using your domain or mobile application.

        ```
        https://immich.example.com
        ```

    1. Upload new images to your server using Immich.

    1. List files in the `/mnt/blockstorage/immich` directory and verify that Immich stores all uploads to your Vultr Block Storage volume.

        ```console
        $ ls /mnt/blockstorage/immich/upload/
        ```

## Conclusion

You have installed and configured Immich to store images. Immich supports image and video uploads from multiple devices and users, limited only by the storage and resources available on your server. 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.
