Immich Setup to Self Host Your Phone Photo Backups
Your phone holds eight years of photos, the cloud plan just went up again, and you already have a small server humming in a cupboard.

Your phone holds eight years of photos, the cloud plan just went up again, and you already have a small server humming in a cupboard. A careful Immich setup can move that whole library home in an afternoon, but only if you plan the storage and the backups before you upload a single picture.
This guide walks through the hardware, the Docker Compose install, the phone app and the parts that quietly decide whether the project survives its first disk failure.
What an Immich setup needs before you start
Immich is a self hosted photo and video service with a phone app that behaves a lot like the big commercial ones: automatic background upload, a timeline, face grouping, maps and search by description. It runs as a handful of containers: the main server, a machine learning service, a Postgres database and a small Redis compatible cache.
The hardware floor is modest, but not tiny:
- Memory: 4 GB of RAM is the practical minimum and 6 to 8 GB is comfortable. The machine learning container alone can sit at 1.5 GB while it indexes.
- CPU: any 64 bit x86 or ARM chip from the last eight years works. An Intel N100 mini PC handles a family of four without strain once the first import finishes.
- Storage: count your current library and multiply by three. A 300 GB library becomes roughly 330 GB once thumbnails and transcoded previews are added, and it keeps growing.
- Disk type: put the database on an SSD. The photos themselves can live on spinning disks without much pain.
If you are still deciding what box to run this on, the walkthrough on setting up Proxmox for your first virtual machines covers a good layout where Immich gets its own VM with a fixed amount of memory.
Installing Immich with Docker Compose
The project ships an official Compose file and an example environment file, and you should use both rather than a random template from a forum.
- Create a folder such as /opt/immich and download the current docker-compose.yml and example.env from the project's release page into it. Rename example.env to .env.
- Open .env and set UPLOAD_LOCATION to the path where originals will live, for example /mnt/photos/immich. Set DB_DATA_LOCATION to a folder on your SSD.
- Replace the default DB_PASSWORD with a long random string of letters and numbers only. Special characters in that variable have broken installs for people before.
- Pin the version. Set IMMICH_VERSION to the exact release number instead of leaving it on "release", so an accidental pull never upgrades you across a breaking change.
- Run docker compose up -d and wait about two minutes. The web interface answers on port 2283.
Open the address in a browser, create the first account, and that account becomes the admin. Make a second, normal account for daily use. Keeping admin separate means a stolen phone session cannot change server settings.
Storage template and folder layout
By default Immich stores uploads in folders named after internal IDs, which is fine until you want to browse the files without Immich running. Turn on the storage template in the admin settings before the first big upload. A pattern of year, then month, then the original file name gives you a tree you could copy to any other machine and still understand in ten years.
Connecting phones and running the first import
Install the Immich app on each phone, enter the server address, sign in, and pick which albums to back up. Start with the camera roll only. Messaging apps and screenshot folders can triple the upload with images nobody wants.
The first import is where people lose patience. A phone with 25,000 photos and 400 videos took about nine hours over home Wi-Fi in our test, then another night for the machine learning job to recognise faces and build search data. Plug the phone in, keep the app open for the first session, and let it run overnight. Background upload on iOS is opportunistic, so a big first sync works best with the app in the foreground.
Reaching Immich away from home
Phones only back up when they can reach the server. You have two sane routes. The simplest is a VPN: with WireGuard set up on the home server, the phone connects back home and uploads as if it were on your sofa. Nothing is exposed to the open internet.
The second route is a public hostname behind a reverse proxy with a valid certificate. That gives family members a link that just works, but it also means a login page facing every scanner online. If you go that way, read the checklist on what to check before exposing a home server first, and raise the proxy's upload size limit to at least 50 GB, or long 4K videos will fail halfway with a vague error.
Why Immich is not your backup
Here is the common advice we disagree with: "Once your photos are on Immich, you can delete them from the phone and cancel the cloud plan." Many setup guides end on that note. It is the fastest way to lose a decade of pictures.
Immich is a copy of your library, not a backup of it. The project itself says so in its documentation, and for good reason. A bad upgrade, a corrupted database, a failed disk or a mistaken bulk delete in the app all hit the only copy you have once the phone is empty.
A workable plan looks like this:
| What to protect | Where it lives | How to back it up |
|---|---|---|
| Original photos and videos | UPLOAD_LOCATION | Nightly restic or Borg job to a second disk, weekly to off site storage |
| Database (albums, faces, metadata) | Postgres container | Immich's built in daily database dump, copied off the machine with the photos |
| Thumbnails and encoded video | Same upload folder | Skip them; Immich can regenerate both |
The day to day rhythm of keeping that second copy healthy is covered in what running a home backup server involves. Test a restore once, on a spare machine, before you delete anything from a phone. Restoring 300 GB over a home connection can take a full day, and it is better to learn that on a quiet weekend.
Keeping it running month after month
Once the first import settles, Immich is a low maintenance service. A few habits keep it that way:
- Upgrade on purpose, roughly once a month, after reading the release notes for every version you skip.
- Watch free space. Set an alert at 80 percent full, because Postgres behaves badly on a full disk.
- Check the job queue in the admin panel after big imports. Stuck thumbnail jobs usually mean the machine learning container ran out of memory.
Frequently asked questions
How much RAM does Immich need?
Plan for at least 4 GB of RAM, with 6 to 8 GB being comfortable for a household. The machine learning service uses the most memory during face recognition and search indexing. You can turn machine learning off on very small machines, but you lose face grouping and smart search.
Can Immich replace Google Photos?
For backup, browsing, sharing albums and search, it covers most of what a family uses day to day. What it cannot replace on its own is the off site redundancy a large provider gives you. Pair it with a real backup job and an off site copy before you cancel anything.
Is it safe to expose Immich to the internet?
It can be, behind a reverse proxy with HTTPS, strong passwords and an up to date release. A VPN is still the safer default because nothing listens publicly. Choose public access only if non technical family members truly need a plain link.
More in Self Hosting
Self Hosting
Dynamic DNS Setup to Reach Your Home Server by Name
The server at home is fine. The router is fine. What broke is the sentence you memorised two months ago, the one with four...
Self Hosting
Minecraft Server on a Mini PC: RAM, Flags and Backups
The server my friends play on is a fanless Intel N100 mini PC that cost $155, sits on a shelf behind the router, and has been...
Self Hosting
Updating Self Hosted Containers Without Breaking Them
Nothing on the server is broken, which is exactly why the Nextcloud container on mine spent fourteen months running an image I...