How to self-host Immich
Immich backs up the photos and videos on your phone to your own server, with a Google Photos-style timeline, face grouping and smart search. It runs as a small Docker Compose stack. Every command below comes from Immich's official docs.
Steps and prices checked Dec 1, 2026 against the official docs (sources below). Immich on GitHub: 121k stars, AGPL-3.0 license, active, latest release v3.4.2 on Nov 18, 2026 (as of Nov 30, 2026).
Before you start: This server will hold your only copy of photos once you start deleting them from your phone or Google. Immich's docs recommend a 3-2-1 backup strategy, and its built-in database backups do not include the photos and videos themselves. Set up file backups before you rely on it.
Three ways to run it
| Option | Best for | Cost | How |
|---|---|---|---|
| Home server or NAS | Large libraries. Disks you already own are the cheapest storage. | Free if you already have the hardware | Same Docker steps as below. Immich recommends a 64-bit Linux system; Windows and macOS through Docker Desktop are strongly discouraged. |
| DigitalOcean Droplet | Always-on in the cloud without home hardware. | $48/month (8 GiB, 4 vCPUs, 160 GiB SSD), plus $10/month per 100 GiB of extra Volume storage | Create a Droplet with Docker at DigitalOcean, then follow the steps below. Use the 8 GiB size: Immich needs at least 6 GB of RAM. |
| Railway (one click) | No server to manage. Usually the priciest route for a big library. | Pro plan $20/month for libraries over 5 GB (Hobby volumes max out at 5 GB); usage billed on top | A community template runs the Immich server, machine learning, Postgres and Redis: deploy Immich on Railway. |
What you need
- RAM: minimum 6 GB, recommended 8 GB. On a 4 GB machine Immich can run only with machine learning (face and smart search) turned off.
- CPU: minimum 2 cores, recommended 4, on amd64 or arm64. Since v3, the machine-learning container on amd64 needs an x86-64-v2 CPU (most CPUs since about 2012).
- Storage: room for your whole library plus 10-20% for thumbnails and transcoded video, on a Unix-style filesystem (EXT4, ZFS, APFS and similar). The Postgres database is usually 1-3 GB and should sit on a local SSD, never a network share.
- Docker Engine with the Compose plugin. Immich requires
docker compose; the olddocker-composeis no longer supported.
Step by step (your own server)
- Create the server. Create a Droplet with Docker installed and at least 8 GiB of RAM (the $48/month, 4 vCPU size), or use a 64-bit Linux machine at home. If your library is bigger than the Droplet's disk, attach a Volume for the photos but keep the database on the Droplet's own SSD.
- Download the official files. Make a folder for Immich, then download the Compose file and the example settings into it:
mkdir ./immich-app cd ./immich-app wget -O docker-compose.yml https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml wget -O .env https://github.com/immich-app/immich/releases/latest/download/example.env - Edit the settings. Open
.envwithnano .env. SetUPLOAD_LOCATIONto a new folder with plenty of free space (this is where your photos go), changeDB_PASSWORDto a random password using only letters and numbers, and uncommentTZto set your time zone. The relevant lines look like this:UPLOAD_LOCATION=./library DB_DATA_LOCATION=./postgres TZ=America/New_York IMMICH_VERSION=v3 DB_PASSWORD=<letters-and-numbers-only> - Start Immich. If you get an error like
unknown shorthand flag: 'd', your distribution's Docker package is too old; install Docker Engine from Docker's official repository.docker compose up -d - Create the admin account. Open
http://<server-ip>:2283and click Getting Started. The first user to register becomes the admin, who can add accounts for family members under Administration → Users. - Put it behind HTTPS. Point a subdomain at the server and proxy it to port 2283. Immich must be on the root of a (sub)domain, not a sub-path like
/immich. With Caddy installed on the server, this Caddyfile is enough, and Caddy gets the certificate automatically:immich.example.com { reverse_proxy http://localhost:2283 } - Back up your phone. Install the Immich app (App Store, Google Play, F-Droid or the APK on GitHub) and log in with your server URL. Tap the cloud icon at the top right, choose the albums to back up, then tap Enable Backup. Large first uploads can take a while. To bring over photos that are only in Google Photos, Immich's docs point to Google Takeout plus the immich-go tool.
Updating
Read the release notes for breaking changes first, and update the phone apps before the server: Immich says the app is usually compatible with the current and prior major version, but the server only with its own. If you pinned IMMICH_VERSION in .env, change it. Then, in the folder with docker-compose.yml:
docker compose pull && docker compose up -d
docker image pruneBackups
Immich dumps its database automatically every day at 2:00 AM and keeps the last 14 dumps in UPLOAD_LOCATION/backups; change this under Administration → Settings. Those dumps hold metadata only. You must also back up the files in UPLOAD_LOCATION with your own backup tool; at minimum the library, upload and profile folders, which hold the originals. Stop the immich-server container while the backup runs, or back up the database first and the files second, so they stay in sync. To take a manual database dump (username and database name are usually postgres and immich):
docker exec -t immich_postgres pg_dump --clean --if-exists --dbname=<DB_DATABASE_NAME> --username=<DB_USERNAME> | gzip > "/path/to/backup/dump.sql.gz"Restoring
On an existing install, go to Administration → Maintenance → Restore database backup. On a fresh install, move your old backups, encoded-video, library, profile, thumbs and upload folders into the new UPLOAD_LOCATION, start Immich, and choose Restore from backup on the welcome screen.
What it costs
| Home server or NAS you already own | Free (plus disks and power) |
|---|---|
| 8 GiB / 4 vCPU DigitalOcean Droplet (160 GiB SSD) | $48/month |
| DigitalOcean Volume for a bigger library | $10/month per 100 GiB ($50 for 500 GiB, $100 for 1,000 GiB) |
| Railway Pro plan | $20/month, includes $20 of usage; memory about $10 per GB per month and volumes about $0.15 per GB per month on top |
| Google One (for comparison) | 15 GB free; 100 GB $1.99/month; 2 TB $9.99/month (Google AI Plus) |
DigitalOcean Basic Droplet sizes and list prices
| Memory | vCPU | SSD | Price |
|---|---|---|---|
| 512 MiB | 1 vCPU | 10 GiB | $4/month |
| 1 GiB | 1 vCPU | 25 GiB | $6/month |
| 2 GiB | 1 vCPU | 50 GiB | $12/month |
| 2 GiB | 2 vCPUs | 60 GiB | $18/month |
| 4 GiB | 2 vCPUs | 80 GiB | $24/month |
| 8 GiB | 4 vCPUs | 160 GiB | $48/month |
List prices checked Dec 1, 2026; they can change. Some hosting links on this page are affiliate links, which never change what we recommend.
FAQ
How much RAM does Immich need?
At least 6 GB, with 8 GB recommended, plus 2 CPU cores (4 recommended). Immich says a 4 GB system can run it only with machine learning features turned off, which removes face recognition and smart search.
How much storage does Immich need?
Your whole photo and video library, plus 10-20% on average for the thumbnails and transcoded videos Immich creates, plus 1-3 GB for the Postgres database. Keep the database on a local SSD; Immich says it should never be on a network share.
Is self-hosting Immich cheaper than Google Photos?
Usually only if you run it on hardware you already own. Google One storage is $1.99/month for 100 GB or $9.99/month for 2 TB, while a cloud server big enough for Immich starts at $48/month on DigitalOcean before extra storage. Most people self-host Immich for privacy and control, on a home server or NAS.
Does Immich back up my photos for me?
Immich backs up your phone to your server, and it dumps its own database every day. It does not back up the server. Immich's docs say you must back up the files in UPLOAD_LOCATION yourself, ideally with a 3-2-1 strategy: two local copies and one off-site.
Can I move my Google Photos library to Immich?
Yes. Immich's docs suggest exporting with Google Takeout and importing with immich-go, a separate tool. Photos still on your phone can simply be backed up with the Immich app.
Related
Sources
- Immich docs: Requirements
- Immich docs: Docker Compose install
- Immich docs: Post-install steps
- Immich docs: Quick start (mobile app, Google Takeout)
- Immich docs: Reverse proxy
- Immich docs: Upgrading
- Immich docs: Backup and restore
- Railway Immich template
- DigitalOcean Volumes pricing
- Google One plans
- Railway pricing
- DigitalOcean Droplet pricing
Commands are adapted from the official docs linked above (example domains replaced with placeholders). Spot something out of date? Tell us at hello@opensourceswap.com.