How to Run Immich for Self-Hosted Photo Storage

How to Run Immich for Self-Hosted Photo Storage: Your Ultimate Guide

\n

Tired of subscription fees and privacy concerns with cloud-based photo storage? Ready to take back control of your precious memories? If you’re a self-hosting enthusiast or just dipping your toes into the homelab world, Immich is a name you absolutely need to know. It’s a powerful, open-source, self-hosted photo and video backup solution that offers a remarkable alternative to giants like Google Photos or Apple Photos. At OpenClaw Resource, we believe in empowering you with the knowledge to build your own digital fortress, and Immich is a cornerstone of a robust self-hosted media strategy.

Looking to get a VPS for your project? Vultr offers reliable VPS hosting starting at $5/month with global data centers. Many OpenClaw users self-host on Vultr for consistent uptime and affordable pricing.

\n

This comprehensive guide will walk you through everything you need to know to get Immich up and running, ensuring your photos are safe, private, and entirely under your command.

\n

Why Choose Immich for Self-Hosted Photo Storage?

\n

Before we dive into the “how,” let’s quickly discuss the “why.” Immich isn’t just another photo gallery. It’s designed to be a full-featured replacement for commercial cloud services, offering:

\n

    \n

  • Complete Control: Your data stays on your hardware, in your home. No third-party access, no data mining.
  • \n

  • Feature Parity (and Beyond): Immich boasts AI-powered object and facial recognition, automatic backup from mobile devices, shared albums, timeline view, map view, and even a robust API for integrations.
  • \n

  • Open Source: The community-driven nature means constant development, transparency, and a vibrant support network.
  • \n

  • Cost-Effective: Beyond your initial hardware investment, there are no recurring fees for storage.
  • \n

\n

Prerequisites: What You’ll Need

\n

To successfully run Immich, you’ll need a few essential components. Don’t worry, most homelabbers will already have these or similar setups.

\n

    \n

  • A Server: This can be anything from a Raspberry Pi 4 (for smaller libraries and lighter usage) to a more robust mini-PC like an Intel NUC, or a dedicated server running Proxmox or ESXi. The key is sufficient CPU power for AI tasks and enough RAM. We recommend at least 8GB RAM for a smooth experience.
  • \n

  • Operating System: A Linux-based OS is preferred. Ubuntu Server, Debian, or your favorite distribution will work perfectly.
  • \n

  • Docker and Docker Compose: Immich is containerized, making deployment incredibly straightforward. Ensure you have Docker and Docker Compose installed on your server.
  • \n

  • Ample Storage: Photos and videos consume significant space. Plan for plenty of HDD or SSD storage. Consider a RAID setup (e.g., RAID 1 or RAID 5/6) for data redundancy using tools like TrueNAS SCALE or a software RAID solution.
  • \n

  • Networking Basics: A basic understanding of networking, including port forwarding if you plan to access Immich from outside your home network (though we recommend a VPN for security).
  • \n

\n

Step-by-Step Immich Deployment with Docker Compose

\n

This guide focuses on the most common and recommended deployment method: Docker Compose.

\n

1. Prepare Your Server Environment

\n

First, ensure your server is up to date and has Docker and Docker Compose installed. If you’re new to Docker, here’s a quick way to install it on Ubuntu:

\n

sudo apt update\nsudo apt upgrade -y\nsudo apt install ca-certificates curl gnupg lsb-release -y\nsudo mkdir -p /etc/apt/keyrings\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg\necho "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null\nsudo apt update\nsudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin -y\nsudo usermod -aG docker $USER # Add your user to the docker group\nnewgrp docker # Apply group changes immediately\n

\n

Verify installations:

\n

docker --version\ndocker compose version\n

\n

2. Create Your Immich Directory and Docker Compose File

\n

Choose a location on your server for your Immich configuration and data. We recommend creating a dedicated directory:

\n

mkdir ~/immich\ncd ~/immich\n

\n

Now, create a docker-compose.yml file. You can find the latest official docker-compose.yml on the Immich GitHub repository. For simplicity, here’s a basic structure you can adapt. Use nano docker-compose.yml to create and edit the file:

\n

version: "3.8"\n\nservices:\n  immich-server:\n    container_name: immich_server\n    image: ghcr.io/immich-app/immich-server:release\n    command: ["start-server.sh"]\n    volumes:\n      - immich_data:/usr/src/app/upload\n      - /path/to/your/photos:/mnt/photos # Mount an external drive for existing photos\n    env_file:\n      - .env\n    ports:\n      - 2283:3001 # Immich web UI\n    depends_on:\n      - immich-redis\n      - immich-database\n      - immich-microservices\n    restart: always\n\n  immich-microservices:\n    container_name: immich_microservices\n    image: ghcr.io/immich-app/immich-microservices:release\n    command: ["start-microservices.sh"]\n    volumes:\n      - immich_data:/usr/src/app/upload\n      - /path/to/your/photos:/mnt/photos # Mount an external drive for existing photos\n    env_file:\n      - .env\n    depends_on:\n      - immich-redis\n      - immich-database\n    restart: always\n\n  immich-web:\n    container_name: immich_web\n    image: ghcr.io/immich-app/immich-web:release\n    environment:\n      - VITE_SERVER_URL=http://localhost:2283 # Adjust if using a reverse proxy\n    ports:\n      - 3000:3000 # Immich web client\n    restart: always\n\n  immich-redis:\n    container_name: immich_redis\n    image: redis/redis-stack-server:latest\n    command: redis-server --requirepass ${REDIS_PASSWORD}\n    volumes:\n      - immich_redis:/data\n    restart: always\n\n  immich-database:\n    container_name: immich_database\n    image: postgres:15-alpine\n    env_file:\n      - .env\n    volumes:\n      - immich_database:/var/lib/postgresql/data\n    restart: always\n\nvolumes:\n  immich_data:\n  immich_redis:\n  immich_database:\n

\n

Important Customizations:

\n

    \n

  • /path/to/your/photos: Change this to the actual path on your server where your existing photos are stored, or where you want to store new uploads. This is crucial for Immich to access your media.
  • \n

  • Ports: If port 2283 or 3000 are in use, change them to available ports.
  • \n

\n

3. Create Your .env File

\n

Next, create a .env file in the same directory (nano .env) to store environment variables, especially sensitive ones like passwords. Replace the bracketed values with strong, unique passwords.

\n

DB_HOSTNAME=immich-database\nDB_USERNAME=postgres\nDB_PASSWORD=[YOUR_POSTGRES_PASSWORD]\nDB_DATABASE_NAME=immich\nDB_PORT=5432\n\nREDIS_HOSTNAME=immich-redis\nREDIS_PASSWORD=[YOUR_REDIS_PASSWORD]\nREDIS_PORT=6379\n\nJWT_SECRET=[YOUR_JWT_SECRET]\n

\n

Save both files.

\n

4. Deploy Immich

\n

With your docker-compose.yml and .env files ready, navigate to your ~/immich directory and run:

\n

docker compose up -d\n

\n

This command will download all necessary Docker images and start the Imm

\n\n

Frequently Asked Questions

\n

\n

What is Immich and why should I consider it for photo storage?

Immich is an open-source, self-hosted photo and video backup solution. It serves as an alternative to cloud services like Google Photos, letting you store and manage your media on your own hardware for full data control and privacy.

\n

What are the main features Immich offers compared to other solutions?

Immich provides a modern interface, smart search, facial recognition, and mobile apps for easy access. It combines the convenience of cloud services with the security and ownership benefits of self-hosting your media library.

\n

What are the basic requirements to self-host Immich?

To run Immich, you’ll generally need a server (like a mini PC, NAS, or Raspberry Pi) with Docker installed. You’ll also need sufficient storage for your media and basic networking knowledge to configure access.

\n

\n

\n

Written by: Alex Torres, Editor at OpenClaw Resource

\n

Last Updated: May 2026

\n

Our Editorial Standards | How We Review Skills | Affiliate Disclosure

\n

Building a homelab? See our roundup of the best mini PCs for homelab use →

Related: Docker Compose Homelab Stack: 10 Essential Self-Hosted Apps

Related: Self-Hosted Password Manager: Vaultwarden vs Bitwarden Comparison

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *