Google Photos is convenient โ until you hit the storage limit, notice your AI-trained face showing up in ads, or realize Google can change its terms at any time. In 2024, Google reduced free storage and increased prices again. Many users started asking: is there a way to get the same experience without giving up my photos?
The answer is Immich โ an open-source, self-hosted photo and video management platform that looks and feels remarkably like Google Photos. It offers automatic backup from your phone, facial recognition, smart search, map view, shared albums, and even memories โ all running on your own hardware.
In this guide, we'll walk through setting up Immich from scratch using Docker Compose. By the end, you'll have a fully functional private photo cloud that you control completely.
Why Immich?
Before we dive into the setup, let's understand what makes Immich stand out from other self-hosted photo solutions like PhotoPrism or LibrePhotos:
| Feature | Immich | Google Photos |
|---|---|---|
| Cost | Free (open source) | Free up to 15GB, then $2-10/mo |
| Storage | Unlimited (your hardware) | 15GB free, then paid tiers |
| Privacy | 100% local โ your data stays home | Google scans and indexes your photos |
| Facial Recognition | โ On-device ML | โ Cloud-based |
| Smart Search | โ CLIP-based semantic search | โ Proprietary AI |
| Auto Backup | โ iOS & Android apps | โ iOS & Android apps |
| Shared Albums | โ Multi-user support | โ Sharing built-in |
| Map View | โ GPS-based photo map | โ Location timeline |
| Memories | โ "On this day" feature | โ Memories & collages |
| Offline Access | โ Works without internet | โ Requires connection |
Immich has grown explosively since its first release โ it's now one of the most-starred self-hosted projects on GitHub with over 55,000 stars. The mobile apps are polished, the web interface is fast, and the ML features genuinely rival Google's. Backed by FUTO, a foundation dedicated to building open technology, Immich has long-term sustainability that many open-source projects lack.
What You'll Need
Before we start, make sure you have the following:
- A server or PC โ any Linux machine, a NAS, a Raspberry Pi 5, or even an old laptop. A VPS works too if you want remote access.
- At least 6GB of RAM โ Immich runs several services including PostgreSQL and a machine learning engine. 4GB can work but ML features will be slow.
- Docker and Docker Compose โ the recommended installation method. If you're new to Docker, check out our beginner's guide to self-hosting.
- Storage space โ enough disk space for your photo library. A 1TB drive is a good starting point for most users.
๐ก Hardware Recommendations
- โ Budget: Raspberry Pi 5 (8GB) + external USB drive โ handles ~50,000 photos
- โ Mid-range: Intel N100 mini PC + 16GB RAM + 2TB NVMe โ fast ML, handles 200k+ photos
- โ Enthusiast: Any desktop/server with a GPU (even an old GTX 1050) โ blazing fast face recognition and search
- โ Cloud VPS: A 4-core/8GB VPS (like a Hetzner CX31) works great for 1-3 users
Step 1: Install Docker
If you don't already have Docker installed, here's the quickest way to get it on a fresh Linux server (Ubuntu/Debian):
# Install Docker using the official convenience script
curl -fsSL https://get.docker.com | sh
# Add your user to the docker group (so you don't need sudo)
sudo usermod -aG docker $USER
# Log out and back in, then verify
docker --version
docker compose version
You should see Docker 24+ and Docker Compose v2+. If you're on a different distribution, check the official Docker installation docs.
Step 2: Create the Immich Directory
Let's create a dedicated directory for your Immich installation:
# Create and enter the Immich directory
mkdir ~/immich-app
cd ~/immich-app
Step 3: Download the Configuration Files
Immich provides an official docker-compose.yml and environment file. Download them:
# Download the official docker-compose.yml
wget -O docker-compose.yml https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
# Download the environment template
wget -O .env https://github.com/immich-app/immich/releases/latest/download/example.env
This gives you a pre-configured setup with all the services Immich needs: the main server, the machine learning service, PostgreSQL for the database, and Redis for caching.
Step 4: Configure Your Environment
Open the .env file and customize it:
# Edit the environment file
nano .env
Here are the key settings to change:
# Where your photos will be stored โ pick a location with plenty of space
UPLOAD_LOCATION=/mnt/photos/immich
# Where the database files are stored (keep on fast storage, SSD recommended)
DB_DATA_LOCATION=./postgres
# Set your timezone
TZ=Europe/Paris
# Pin to a specific version for stability (or use 'v2' for latest v2.x)
IMMICH_VERSION=v2
# IMPORTANT: Change this to a secure random password
DB_PASSWORD=YourSecurePasswordHere123
# These usually don't need changing
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
โ ๏ธ Important Notes
- ๐UPLOAD_LOCATION: This is where all your photos and videos will be stored. Point it to your largest drive. Make sure the directory exists before starting.
- ๐DB_PASSWORD: Use only letters and numbers (A-Za-z0-9). Special characters can cause issues with Docker's environment parsing.
- ๐พDB_DATA_LOCATION: The PostgreSQL database must be on a proper Linux filesystem (ext4, ZFS, BTRFS). NTFS and FAT will not work.
Create the upload directory if it doesn't exist yet:
# Create the photo storage directory
sudo mkdir -p /mnt/photos/immich
sudo chown $USER:$USER /mnt/photos/immich
Step 5: Launch Immich
Now for the exciting part โ start everything with a single command:
# Pull images and start all services
docker compose up -d
Docker will download the Immich images (about 2-3 GB on the first run) and start all the containers. You can watch the progress:
# Watch the logs in real-time
docker compose logs -f
Wait until you see the server reporting that it's ready. This usually takes 30-60 seconds on the first boot as the database initializes.
Step 6: Create Your Admin Account
Open your browser and navigate to:
http://YOUR_SERVER_IP:2283
You'll be greeted by the Immich setup screen. Click "Getting Started" and create your admin account. The first user to register automatically becomes the administrator.
Choose a strong password โ this account controls your entire photo library and can manage other users.
Step 7: Set Up Your Mobile App
This is where Immich truly shines. Install the mobile app from:
- Apple App Store (iOS)
- Google Play Store (Android)
- F-Droid (for degoogled Android users)
When you open the app, enter your server URL (http://YOUR_SERVER_IP:2283) and log in with the account you just created.
To enable automatic backup:
- Tap the cloud icon in the top right corner
- Select which albums to back up (Camera, Screenshots, WhatsApp, etc.)
- Toggle "Enable Backup"
- Optionally enable "Background Backup" to sync even when the app is closed
Your photos will start uploading immediately. Depending on the size of your library, this initial sync might take a while โ let it run overnight if needed.
Step 8: Explore Immich's Features
Once your photos are uploaded, take a moment to explore what Immich can do:
Facial Recognition
Immich's ML engine automatically detects faces in your photos and groups them. Navigate to the Explore page to see detected people. Click on a face cluster to assign a name โ after that, you can search for "photos of Mom" or "pictures with Alex" instantly.
Smart Search
Thanks to the CLIP model, you can search using natural language. Try queries like:
- "sunset at the beach"
- "dog playing in snow"
- "birthday cake with candles"
- "red car"
The search is semantic โ it understands concepts, not just keywords. It's genuinely impressive how well it works without any manual tagging.
Map View
If your photos have GPS data (most phone photos do), the Map view shows your photos plotted on a world map. It's a beautiful way to relive trips and see where your memories were made.
Shared Albums & Multi-User
You can create albums and share them with other users on your Immich instance. This is perfect for families โ each person gets their own account with private storage, but you can share albums of vacations, birthdays, or everyday moments.
Memories
Just like Google Photos' "On This Day" feature, Immich shows you photos from previous years. It's a delightful way to rediscover forgotten moments โ except this time, no company is mining those memories for data.
Securing Immich for Remote Access
Right now, Immich is only accessible on your local network. To access it from anywhere (which you'll need for automatic phone backup to work outside your home), you have two main options:
Option A: Reverse Proxy with HTTPS (Recommended)
Set up a reverse proxy like Nginx Proxy Manager or Caddy to handle SSL and expose Immich securely:
# Example Caddy configuration (Caddyfile)
photos.yourdomain.com {
reverse_proxy localhost:2283
}
This gives you a clean URL like https://photos.yourdomain.com with automatic HTTPS via Let's Encrypt. You'll need a domain name and to point its DNS to your server's public IP.
Option B: Cloudflare Tunnel (Zero Config)
If you don't want to open any ports on your router, Cloudflare Tunnel creates a secure connection from your server to Cloudflare's network:
# Install cloudflared
curl -fsSL https://pkg.cloudflare.com/cloudflare-main.gpg | sudo tee /usr/share/keyrings/cloudflare-main.gpg
echo 'deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared any main' | sudo tee /etc/apt/sources.list.d/cloudflared.list
sudo apt update && sudo apt install cloudflared
# Authenticate and create a tunnel
cloudflared tunnel login
cloudflared tunnel create immich
cloudflared tunnel route dns immich photos.yourdomain.com
# Run the tunnel
cloudflared tunnel --url http://localhost:2283 run immich
This approach requires no open ports and no dynamic DNS โ Cloudflare handles everything.
Keeping Immich Updated
Immich is actively developed with frequent updates. To update to the latest version:
# Navigate to your Immich directory
cd ~/immich-app
# Pull the latest images
docker compose pull
# Restart with the new images
docker compose up -d
# Clean up old images (optional, saves disk space)
docker image prune -f
If you pinned IMMICH_VERSION=v2 in your .env file, this will pull the latest v2.x release. For maximum stability, you can pin to a specific version like v2.1.0 and update manually.
๐ Backup Your Database Before Updating
- ๐กAlways back up your PostgreSQL database before major updates. Run:
docker exec -t immich_postgres pg_dumpall -c -U postgres > immich_backup.sql - ๐กYour photos are safe regardless โ they're stored as regular files in your UPLOAD_LOCATION. The database stores metadata, face data, and user accounts.
Performance Tips
Once you've got the basics running, here are some tips to get the most out of your Immich instance:
Enable Hardware-Accelerated Machine Learning
If your server has a compatible GPU (Nvidia, Intel Quick Sync, or AMD), you can dramatically speed up face detection, object recognition, and smart search indexing. Add GPU support to your docker-compose.yml:
# For Nvidia GPUs, add to the immich-machine-learning service:
immich-machine-learning:
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities:
- gpu
With GPU acceleration, processing 10,000 photos drops from hours to minutes.
External Library Support
Already have a photo collection on disk? You don't need to re-upload everything. Immich supports external libraries โ point it at an existing folder, and it will index your photos in place without duplicating files.
Storage Optimization
Immich stores original files by default (no lossy compression). If storage is tight, consider:
- Setting up automatic HEIF/HEVC storage on your phone (smaller files, same quality)
- Using ZFS or Btrfs with compression enabled on your storage drive
- Mounting a NAS or network share for the upload location (works for photos, but not for the database)
Migrating from Google Photos
If you're switching from Google Photos, here's the migration path:
- Export your data from Google Takeout โ select only Google Photos, choose .zip format
- Download the archives โ this might take a while depending on your library size
- Use the Immich CLI to upload in bulk:
# Install the Immich CLI
npm i -g @immich/cli
# Authenticate with your Immich server
immich login http://YOUR_SERVER_IP:2283 YOUR_API_KEY
# Upload your Google Takeout photos
immich upload --recursive /path/to/google-takeout/Google\ Photos/
The CLI preserves EXIF metadata including dates, GPS coordinates, and camera information. Your photos will appear in Immich with the correct timestamps.
FAQ
How much storage do I need?
A typical smartphone photo is 3-8 MB. For 10,000 photos, budget around 50-80 GB. Videos are much larger โ a 1-minute 4K video is about 300-500 MB. A 1TB drive comfortably holds most personal collections.
Can I use Immich on a Raspberry Pi?
Yes! The Raspberry Pi 5 with 8GB RAM runs Immich well. ML processing will be slower than on x86 hardware, but daily use (browsing, uploading, sharing) is smooth. The Pi 4 works too, but expect longer initial processing times.
Is Immich production-ready?
Immich has matured significantly and is used by hundreds of thousands of people daily. The developers are transparent about its status โ while they historically noted it was in active development, the v2 release marks a major stability milestone. Back up your database regularly, and you'll be fine.
Can multiple family members use it?
Absolutely. Create separate user accounts for each family member. Everyone gets their own private library while being able to share albums. The admin can set storage quotas per user.
How does it compare to PhotoPrism?
PhotoPrism is another excellent self-hosted photo manager, but it focuses more on organizing an existing collection. Immich is built from the ground up as a Google Photos replacement with mobile backup as a core feature. If automatic phone backup is important to you, Immich is the clear choice.
What's Next?
You now have a private, self-hosted photo cloud that rivals Google Photos in features while keeping your data completely under your control. Here are some next steps to explore:
- Set up automated backups of your Immich database to protect against data loss
- Explore the API โ Immich has a comprehensive REST API for custom integrations
- Try Immich Kiosk โ turn an old tablet into a digital photo frame showing your Immich library
- Browse more self-hosted apps on Hostly's app directory โ from password managers to reverse proxies, there's a self-hosted solution for almost everything
Self-hosting your photos is one of the most impactful steps you can take toward digital independence. Your memories deserve better than being stored on someone else's server, scanned by algorithms, and held hostage behind a subscription paywall.
With Immich, those memories are yours โ truly, completely yours.