I wanted to stop paying for extra iCloud storage, but I wasn't willing to give up automatic photo backups from my iPhone. Since I already run a Proxmox homelab and have a NAS, I decided to host Immich myself.
Immich gives me a photo timeline, search, albums, a map, and an iPhone app that sends photos and videos to storage I control. Here's how I deployed it with Debian, Docker Compose, and NFS, along with a few things I'd do differently if I were starting from scratch.
TL;DR: I run Immich in a Debian 13 LXC container on Proxmox, store photos on my NAS, and keep PostgreSQL on local storage. It works well for my iPhone backups, but if you're new to this setup, I'd recommend a Debian VM instead of Docker inside LXC.
Why I Chose Immich Instead of iCloud Photos
The biggest selling point wasn't just getting away from a monthly subscription. I already have a server running 24/7, so it made sense to use that hardware for my photo library, too.
Immich has the features I actually use: an organized photo timeline, automatic mobile uploads, albums, location-based browsing, and search. I can open the same library from my phone or a browser without manually copying files between devices.
Immich's web interface feels familiar if you've used iCloud Photos or Google Photos.
There is an important distinction, though: Immich is not a drop-in replacement for Apple's two-way photo syncing. Its mobile app backs up selected photos and videos to your server, but it doesn't replace the native iOS Photos library or every iCloud integration.
Also, iOS limits how often third-party apps can upload in the background. I enable Background App Refresh and open Immich periodically, especially after taking lots of photos.
My Proxmox and Immich Configuration
Here's what I'm running in my homelab:
| Component | Configuration |
|---|---|
| Hypervisor | Proxmox |
| Guest OS | Debian 13 LXC |
| CPU and RAM | 4 cores, 8 GB |
| Root disk | 64 GB, ZFS-backed |
| Deployment | Docker Compose in /opt/immich |
| Photo storage | NAS over NFS, mounted at /mnt/photos |
| Database | PostgreSQL on local disk at /opt/immich/postgres |
| Remote access | HTTPS through HAProxy on OPNsense |
My LXC container is privileged, and Docker inside LXC can require additional Proxmox configuration. Immich recommends a full VM for this use case. If I were setting this up for someone who wanted the fewest surprises, I'd create a Debian VM instead.
For a deeper comparison, I wrote about LXC containers versus virtual machines in Proxmox.
Installing Immich on Proxmox
The following is the simplified process I followed. It assumes you already have a network-connected Debian guest and shell access.
1. Install Docker and Compose
Give the Debian guest enough memory and CPU for Immich. My allocation is 4 cores and 8 GB RAM, in line with the recommended requirements.
Install Docker Engine and the Compose plugin following Docker's official Debian instructions. Use the modern docker compose command, not the older docker-compose executable.
2. Configure your photo storage
I keep my actual photos and videos on the NAS, separate from the guest's root filesystem. You can use a local disk instead, but make sure there's enough room for your originals, thumbnails, and transcoded videos.
For an NFS share, an illustrative mount inside a Debian VM looks like this:
sudo apt update sudo apt install nfs-common sudo mkdir -p /mnt/photos sudo mount -t nfs 10.0.0.100:/srv/photos /mnt/photos findmnt /mnt/photos Replace the example IP address and export path with your NAS settings. To mount it again after a reboot, add an entry to /etc/fstab:
10.0.0.100:/srv/photos /mnt/photos nfs defaults,_netdev 0 0 Check that the NAS is mounted and writable before starting Immich. Otherwise, the same local directory can exist without the NAS attached, and uploads may end up on the wrong disk.
If you choose LXC, NFS mounting has extra permission and container considerations; a host-mounted share passed into the container may be more practical.
3. Download Immich's official Compose files
I keep the deployment under /opt/immich:
sudo mkdir -p /opt/immich cd /opt/immich sudo wget -O docker-compose.yml https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml sudo wget -O .env https://github.com/immich-app/immich/releases/latest/download/example.env Then edit /opt/immich/.env to reflect your storage paths and database credentials:
UPLOAD_LOCATION=/mnt/photos DB_DATA_LOCATION=./postgres IMMICH_VERSION=v3 DB_PASSWORD=REPLACE_WITH_A_RANDOM_ALPHANUMERIC_PASSWORD DB_USERNAME=postgres DB_DATABASE_NAME=immich The v3 value reflects the current major-version tag used in the official example when I wrote this. Check Immich's Docker Compose guide for the latest installation details before deploying.
The key separation is UPLOAD_LOCATION for the photo library and DB_DATA_LOCATION for PostgreSQL. Keep the database on local storage, not an NFS share.
4. Start the services
From the deployment directory:
sudo docker compose up -d sudo docker compose ps Once the containers are running, open the web interface:
http://YOUR_DEBIAN_GUEST_IP:2283 Create the initial account, upload a test photo, and confirm that the file is being stored where you expect.
5. Add secure remote access
I use HAProxy on my OPNsense firewall to terminate HTTPS and forward requests to Immich on port 2283. That gives my iPhone a consistent HTTPS address whether I'm at home or away.
You can also use a VPN or another properly configured HTTPS reverse proxy. Follow Immich's reverse proxy documentation for request headers and upload-size considerations. Don't expose Immich's plain HTTP endpoint directly to the public internet.
Setting Up Automatic iPhone Backups
Once the server was working, the iOS app was the easy part:
- Install the Immich app and sign in using your server's HTTPS URL.
- Allow it to access your photos and choose the albums you want to back up.
- Open the backup screen, select your albums, and enable backup.
- Enable Background App Refresh for Immich in iOS Settings.
- Check your library on the web interface to make sure the uploads really arrived.
I use the iPhone app for daily browsing and backups, not just as a one-time import tool.
For a large first migration, leave the app open long enough to work through your library. If you use Optimize iPhone Storage, some originals may need to be fetched from iCloud before Immich can upload them.
Don't downgrade iCloud storage until you've verified that your originals are on the server and have independent backups.
One feature I particularly like is the map view. If your photos contain GPS metadata, you can browse them by location instead of digging through dates and albums.
Backups Are the Part You Can't Skip
Self-hosting means I'm responsible for protecting the library. In my setup, photo and video files live on the NAS, while the PostgreSQL database stays on the Debian guest's local disk.
I have automatic database dumps and a separate scheduled database export, but a database dump does not contain the original photos and videos. Both the media files and the database need to be backed up.
And a second copy on the same NAS isn't enough protection if that NAS fails. Ideally, keep an independent copy somewhere else, preferably offsite. Immich's backup and restore documentation is worth reading before you trust it with your only copy of a photo library.
You'll also need to maintain the deployment. For example, choosing a major-version image tag doesn't mean already-running containers automatically update themselves. I still have to pull and deploy updates, then occasionally clean up unused Docker images without touching important volumes.
Would I Recommend Immich?
If you already have Proxmox, a NAS, or a small homelab, absolutely. Immich lets me keep the convenience of automatic iPhone photo backups without relying on another paid cloud storage tier, and I like having direct control over the files.
Just remember what you're trading: Apple's seamless ecosystem integration for the responsibility of running, updating, and backing up your own server.
For me, that's worth it. I spend far more time using the Immich app than thinking about the Docker containers behind it, which is exactly what I wanted.
Originally published on TechOpt.io: My iCloud Photos Alternative - Setting Up Immich on Proxmox.



