we earn commissions when you shop through the links below

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

OptionBest forCostHow
Home server or NASLarge libraries. Disks you already own are the cheapest storage.Free if you already have the hardwareSame Docker steps as below. Immich recommends a 64-bit Linux system; Windows and macOS through Docker Desktop are strongly discouraged.
DigitalOcean DropletAlways-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 storageCreate 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 topA community template runs the Immich server, machine learning, Postgres and Redis: deploy Immich on Railway.

What you need

Step by step (your own server)

  1. 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.
  2. 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
  3. Edit the settings. Open .env with nano .env. Set UPLOAD_LOCATION to a new folder with plenty of free space (this is where your photos go), change DB_PASSWORD to a random password using only letters and numbers, and uncomment TZ to 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>
  4. 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
  5. Create the admin account. Open http://<server-ip>:2283 and click Getting Started. The first user to register becomes the admin, who can add accounts for family members under Administration → Users.
  6. 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
    }
  7. 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 prune

Backups

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 ownFree (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
MemoryvCPUSSDPrice
512 MiB1 vCPU10 GiB$4/month
1 GiB1 vCPU25 GiB$6/month
2 GiB1 vCPU50 GiB$12/month
2 GiB2 vCPUs60 GiB$18/month
4 GiB2 vCPUs80 GiB$24/month
8 GiB4 vCPUs160 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

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.