Deploy Immich on RamNode

    Self-hosted photo and video management with AI-powered search, facial recognition, and automatic mobile backup.

    Photo Management
    Docker
    ⏱️ 20 minutes

    Introduction

    Immich is a high-performance, self-hosted photo and video management solution that serves as an excellent alternative to cloud services like Google Photos or iCloud. By deploying Immich on your RamNode VPS, you maintain complete control over your media files while enjoying powerful features.

    Automatic Backup

    Automatic backup from iOS and Android devices

    AI-Powered

    Facial recognition and object detection

    Smart Search

    Search using natural language queries

    Multi-User

    Support with shared albums and permissions

    Prerequisites

    Before beginning this deployment, ensure you have the following:

    VPS PlanMinimum 4GB RAM, 2 CPU cores (6GB/4 cores recommended)
    Operating SystemUbuntu 22.04 LTS or Ubuntu 24.04 LTS
    StorageSufficient disk space (plan 10-20% overhead for thumbnails)
    Domain (Optional)For SSL/HTTPS access
    AccessSSH access with root or sudo privileges
    3

    Initial Server Setup

    Connect to your RamNode VPS via SSH and update the system packages.

    ssh root@your-server-ip
    
    apt update && apt upgrade -y
    
    apt install -y ca-certificates curl gnupg
    4

    Install Docker

    Immich runs as a set of Docker containers. Install Docker Engine and the Compose plugin using Docker's official repository.

    # Add Docker's official GPG key
    install -m 0755 -d /etc/apt/keyrings
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
    chmod a+r /etc/apt/keyrings/docker.asc
    
    # Add the Docker repository
    echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
    
    # Install Docker Engine and Compose
    apt update
    apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
    5

    Create Directory Structure

    Create a dedicated directory for Immich and set up the storage locations.

    mkdir -p /opt/immich
    cd /opt/immich
    
    mkdir -p ./library ./postgres

    💡 Tip: If you have additional block storage attached to your VPS, you may want to store the photo library on the larger volume. Adjust paths accordingly.

    6

    Download Configuration Files

    Download the official Docker Compose file and environment configuration from the Immich repository.

    wget -O docker-compose.yml https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
    
    wget -O .env https://github.com/immich-app/immich/releases/latest/download/example.env
    7

    Configure Environment Variables

    Edit the environment file to customize your Immich installation.

    nano .env

    Configure the following settings:

    # Storage location for uploaded photos/videos
    UPLOAD_LOCATION=/opt/immich/library
    
    # Database storage location
    DB_DATA_LOCATION=/opt/immich/postgres
    
    # Set your timezone
    TZ=America/New_York
    
    # Immich version (leave as v2 for latest stable)
    IMMICH_VERSION=v2
    
    # Generate a secure database password
    DB_PASSWORD=your_secure_password_here

    Generate a secure password for the database:

    openssl rand -base64 32

    Copy the generated string and use it as your DB_PASSWORD value.

    8

    Start Immich

    Launch the Immich containers using Docker Compose.

    # Start Immich in detached mode
    docker compose up -d
    
    # Monitor the startup progress
    docker compose logs -f
    
    # Verify all containers are running
    docker compose ps

    You should see containers for immich_server, immich_machine_learning, immich_postgres, and immich_redis all in a running or healthy state.

    9

    Configure Firewall

    Allow access to Immich through your server's firewall.

    ufw allow 2283/tcp
    ufw reload

    ⚠️ Important: For production use, it's strongly recommended to set up a reverse proxy with SSL rather than exposing port 2283 directly.

    10

    Initial Access and Setup

    Access Immich and create your admin account.

    Access URL:

    http://your-server-ip:2283
    1. Click "Getting Started" to create your admin account
    2. Fill in your name, email address, and a secure password
    3. Complete the initial setup wizard to configure your preferences

    ✅ The first user to register automatically becomes the administrator with full control over server settings.

    11

    Setting Up Nginx Reverse Proxy with SSL

    For secure access to Immich from anywhere, configure Nginx as a reverse proxy with Let's Encrypt SSL certificates.

    apt install -y nginx certbot python3-certbot-nginx

    Create a new server block for your Immich domain:

    nano /etc/nginx/sites-available/immich

    Add the following configuration (replace photos.yourdomain.com with your domain):

    server {
        listen 80;
        server_name photos.yourdomain.com;
    
        # Allow large file uploads
        client_max_body_size 50000M;
    
        location / {
            proxy_pass http://localhost:2283;
            proxy_set_header Host $http_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;
    
            # WebSocket support
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_redirect off;
    
            # Timeouts for large uploads
            proxy_read_timeout 600s;
            proxy_send_timeout 600s;
        }
    }

    Enable the site and obtain SSL certificate:

    ln -s /etc/nginx/sites-available/immich /etc/nginx/sites-enabled/
    nginx -t
    systemctl reload nginx
    certbot --nginx -d photos.yourdomain.com
    12

    Mobile App Configuration

    Install the Immich mobile app to enable automatic photo backup from your devices.

    Android

    Download from Google Play Store or F-Droid

    iOS

    Download from the Apple App Store

    When configuring the app, enter your server URL (e.g., https://photos.yourdomain.com) and log in with your Immich credentials. Navigate to the backup settings (cloud icon) to configure automatic backup options.

    13

    Maintenance and Updates

    Updating Immich

    cd /opt/immich
    docker compose pull
    docker compose up -d

    Backup Strategy

    • Database: Immich includes built-in database backups. Access Administration → Server Settings to configure.
    • Media Files: Set up regular backups of your UPLOAD_LOCATION directory.
    • Configuration: Back up your .env and docker-compose.yml files.
    rsync -avz /opt/immich/library/ /path/to/backup/location/

    Viewing Logs

    # View all container logs
    docker compose logs -f
    
    # View specific container logs
    docker compose logs -f immich-server
    14

    Security Best Practices

    Use HTTPS

    Never expose Immich directly to the internet without SSL/TLS encryption.

    Strong Passwords

    Use a password manager to generate and store complex passwords for both Immich and the database.

    Regular Updates

    Keep Immich, Docker, and your operating system updated with security patches.

    Firewall & Fail2ban

    Only expose necessary ports and consider using fail2ban to prevent brute force attacks.

    15

    Troubleshooting

    Container Won't Start

    Check logs with docker compose logs and ensure sufficient disk space and memory.

    Database Errors

    Ensure DB_DATA_LOCATION is on a native Linux filesystem (ext4, ZFS, etc.), not NTFS or exFAT.

    Upload Failures

    Check Nginx client_max_body_size and proxy timeout settings. Ensure sufficient storage.

    Mobile App Connection Issues

    Verify the server URL includes the correct protocol (https://) and that SSL is properly configured.

    Slow Performance

    Initial processing of a large library is resource-intensive. Performance normalizes after initial indexing.