Skip to main content
  1. Building Your Own Server/

Immich - Self-Hosted Photo Backup

·1025 words·5 mins

Immich is a powerful, self-hosted photo and video backup solution that gives you complete control over your memories. When you upload your pictures to the defaul Google and Apple services, they search, review, and keep copies of all your pictures.

I do mean All of them. 👀

And they use your pictures to train their AI models.

Immich

Why Immich:

  • Your Photos, Your Control: No corporate surveillance, no data mining, no one looking at your family picutres. Your memories belong to you, not a corporation
  • Automatic Backup: Photos backup automatically from your phone. No one else can access your photos without your permission
  • Smart Organization: Face recognition, automatic albums, and smart search all done locally on your computer.
  • Offline Access: Your photos are always available, even without internet

Resources
#

Installation Prep
#

Before installing Immich, ensure you have the following ready:

Setting up your services to be available externally is an advanced feature. It means anyone can see your Immich server. This is possible to do and lots of people do it, but you need to make sure you know what you are doing.

Time to Complete
#

  • Total Time: ~30 minutes
    • 5 min: File system prep
    • 10 min: Docker setup
    • 10 min: Download Immich image
    • 5 min: Initial setup and configuration
  • Difficulty: Intermediate. There are extra components to the docker compose. This is also a service that’s very handy to have exposed to the internet.

Understanding Your Photo Storage
#

Before we begin, it’s important to understand how Immich stores your photos:

/home/USER/docker/immich/
├── config/              # Immich configuration files
├── library/             # Your actual photos and videos
│   ├── uploaded/        # New photos uploaded from your phone
│   ├── library/         # Existing photos imported into Immich
│   └── thumbnails/      # Generated thumbnails for fast viewing
└── machine-learning/    # AI models for face recognition

Key Points:

  • Your photos are stored in /home/USER/docker/immich/library/
  • This is a regular folder on your Linux Mint system
  • You can access it directly via file manager
  • Immich is just a interface to view and manage your photos
  • If Immich crashes, your photos are still safe in the library folder

Installation
#

Step 1: File System Prep
#

We need to create the directories to keep the docker-compose file and your photos.

Create the Immich directory

mkdir -p ~/docker/immich/

Create the folders where your data will live:

mkdir -p ~/docker/immich/{config,library/{uploaded,library,thumbnails},machine-learning}

This creates the following structure:

/home/USER/docker/immich/config
/home/USER/docker/immich/library/uploaded
/home/USER/docker/immich/library/library
/home/USER/docker/immich/library/thumbnails
/home/USER/docker/immich/machine-learning

Step 2: Docker Setup
#

Make sure you are in your Immich directory:

cd ~/docker/immich

To double check you are in the right place, type pwd to see your current directory.

Create the docker-compose.yaml file:

sudo touch docker-compose.yaml

Use the nano program to edit the file:

sudo nano docker-compose.yaml

Step 3: docker-compose file
#

Copy the following text into the docker-compose file:

version: "3.8"
services:
  immich-server:
    image: ghcr.io/immich-app/immich-server:release
    container_name: immich-server
    volumes:
      - ./library:/usr/src/app/upload
      - ./machine-learning:/usr/src/app/machine-learning
    environment:
      - DB_HOSTNAME=immich-db
      - DB_USERNAME=immich
      - DB_PASSWORD=immich
      - DB_DATABASE_NAME=immich
      - REDIS_HOSTNAME=immich-redis
      - IMMICH_MACHINE_LEARNING_URL=http://immich-machine-learning:3003
    ports:
      - "2283:2283"
    depends_on:
      - immich-db
      - immich-redis
    restart: unless-stopped

  immich-db:
    image: postgres:15
    container_name: immich-db
    volumes:
      - ./postgres-data:/var/lib/postgresql/data
    environment:
      - POSTGRES_USER=immich
      - POSTGRES_PASSWORD=immich
      - POSTGRES_DB=immich
    restart: unless-stopped

  immich-redis:
    image: redis:7
    container_name: immich-redis
    restart: unless-stopped

  immich-machine-learning:
    image: ghcr.io/immich-app/immich-machine-learning:release
    container_name: immich-machine-learning
    volumes:
      - ./machine-learning:/usr/src/app/machine-learning
    restart: unless-stopped

Save and exit the file by pressing Ctrl+X and saying Y to save.

Now you can download the Docker images:

sudo docker-compose pull
sudo docker-compose up -d

Once the pull is complete, verify the containers are running:

docker ps

You should see immich-server, immich-db, immich-redis, and immich-machine-learning all running.

Initial Setup and Configuration
#

Step 1: Access Immich
#

Open your browser and navigate to the IP of your server. I’m using 192.168.99.1 in this example. This is the IP address of your home server.

http://192.168.99.1:2283

Step 2: Create Admin Account
#

  1. Create Admin Account
    • Set a strong username and password for your admin account
    • Click Next to proceed

Step 3: Import Your Photos
#

You have two options for getting your photos into Immich:

Option A: Upload from Computer

  1. Click Upload in the Immich web interface
  2. Select photos from your computer
  3. Wait for upload to complete

Option B: Import from Existing Folder If you have photos on your Linux Mint system:

# Copy existing photos to Immich library
cp -r /path/to/your/photos ~/docker/immich/library/library/

Then refresh Immich to see the new photos.

Phone Setup (Android/iOS)
#

Immich becomes truly useful when your phone automatically backs up your photos.

Android Setup
#

  1. Install Immich App

  2. Connect to Your Server

    • Open the Immich app
    • Tap Add Server
    • Enter your server URL: http://192.168.99.1:2283
    • Log in with your admin credentials
  3. Configure Auto-Backup

    • Go to Settings > Auto Backup
    • Toggle Auto Backup to ON
    • Choose backup options:
      • Upload Photos: Yes
      • Upload Videos: Yes
      • Upload to Server: Yes
      • Delete After Upload: Optional (keep on phone after backup)
    • Select which albums/folders to backup
  4. Start Backup

    • Tap Start Auto Backup
    • Your photos will begin uploading automatically

iOS Setup
#

  1. Install Immich App

  2. Connect to Your Server

    • Open the Immich app
    • Tap Add Server
    • Enter your server URL: http://192.168.99.1:2283
    • Log in with your admin credentials
  3. Configure Auto-Backup

    • Go to Settings > Auto Backup
    • Toggle Auto Backup to ON
    • Choose backup options
  4. Start Backup

    • Tap Start Auto Backup

Usage
#

Web Interface
#

  • Browse: Navigate through your photos by date, album, or person
  • Search: Find photos by location, object, or person
  • Albums: Create albums to organize your memories
  • Share: Share photos with family and friends (with or without expiration)

Mobile App
#

  • Auto Backup: Your photos backup automatically when connected to Wi-Fi
  • Offline Access: View recently accessed photos without internet
  • Quick Upload: Manually upload photos when needed

Backup
#

Your photos are stored in /home/USER/docker/immich/library/. You can:

  1. Backup the entire folder:

    tar -czf immich-backup.tar.gz ~/docker/immich/library/
  2. Copy to external drive:

    cp -r ~/docker/immich/library /path/to/external/drive/
  3. Use rsync for incremental backups:

    rsync -av ~/docker/immich/library/ /path/to/backup/