
Deploy Immich Backups
Automatic Immich database dumps and a restore plan
immich-machine-learning
Just deployed
/cache
immich-server
Just deployed
/data
Just deployed
/var/lib/postgresql/data
Valkey
Just deployed
/data
Deploy and Host self hosted Immich Backups (Open-Source Photo Backup) on Railway
This template runs Immich on Railway with Postgres, Valkey and CPU machine learning, and Immich dumps its database nightly. It is for people who want their photos and metadata protected, and a restore they have actually tested.
About Hosting Immich Backups open-source software on Railway (self hosted Immich backups template)
The library and the nightly dumps both sit on your own volume, not someone else's cloud. This template runs immich-server v3.3.3, CPU machine learning, Postgres 14 with VectorChord and Valkey, wired with generated passwords.
Railway handles the domain, private networking and volume backups, so you spend your time on dump retention and one real test restore instead of compose files. Dumps and originals are two separate things to protect.
Why Deploy Immich Backups, the Google Photos alternative on Railway (Railway Free Trial)
Google Photos keeps your library on Google's terms; Immich keeps it on yours. Start on the $5 trial, then pay only for compute and volume storage.
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Immich Backups on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Railway vs Other Hosting Providers and VPS for Immich Backups self hosting
A dump on the library volume is not a backup, so check what each host adds.
| Provider | What You Get with Railway | What You Get with the Other Provider |
|---|---|---|
| DigitalOcean | Wired stack, /data volume, volume backups, easy offsite copy | A droplet you patch and secure, separate block storage, your own snapshots |
| AWS | Managed Postgres with VectorChord, Valkey, ML, health checks | ECS or EC2 plus EBS, S3 for copies, IAM and VPC setup, backup scripts |
| Hetzner | Same template, volume backups, domain in minutes, no admin | VMs with local SSD, but you run compose, TLS, updates, dump cron |
Common Use Cases for hosted Immich Backups
- Nightly dumps before an upgrade: let the 2:00 AM dump run, or trigger one from Job Queues, before you change image tags, so a bad migration has a recent database to fall back on.
- Restoring after a failed migration: Administration, Maintenance lists every dump with its version and date, so you can roll the database back without touching the photos on /data.
- An offsite copy of originals: dumps hold file paths and metadata only, so sync /data somewhere else with your own backup tool or Railway volume backups.
- Moving Immich to another host: carry the latest dump plus a copy of /data to a VPS and restore into a fresh stack.
- Recovering an accidental deletion: restore the database to rebuild albums and paths, then pull the missing files back from your offsite copy.
Dependencies for Immich Backups Docker hosted on Railway
Backups rest on the stack's shape, not a fifth service. All 36 variables ship defaulted.
Deployment Dependencies for Managed Immich Backups Service (Photo Management)
- DB_HOSTNAME, DB_USERNAME, DB_PASSWORD and DB_DATABASE_NAME point immich-server at Postgres, which needs VectorChord. A plain Railway Postgres will not restore these dumps.
- TZ=Etc/UTC decides when the 2:00 AM dump fires, so set your zone.
- Library and dumps share /data, so a dump on the same volume fails if the volume goes.
Implementation Details for Immich Backups (Using Immich official docker image)
Server image is ghcr.io/immich-app/immich-server:v3.3.3, health checked at /api/server/ping. Force one from Administration, Job Queues. Dumps hold metadata and paths only, so copy /data offsite too.
How does Immich Backups compare against other photo library backup strategies
Immich vs Google Photos (Google Photos Alternative)
- Where the library lives: Google keeps the copies. Here your originals sit on /data and only a dump copied offsite actually protects you.
- Restore: Administration, Maintenance restores a dump in the UI. Google does the same work invisibly and you never see it.
- Where Google Photos wins: no maintenance. Nobody has to notice that the 2:00 AM dump stopped writing.
Immich vs iCloud Photos (iCloud Photos Alternative)
- Device model: iCloud syncs a library Apple holds. Immich runs on your Railway project, so the dumps and /data are yours to copy offsite.
- Restore: Apple handles it. Here you click Restore in Administration, Maintenance against a dump you actually kept and tested.
- Where iCloud wins: it ships on the phone and never asks you to check a job queue or a cron job.
Immich vs PhotoPrism (PhotoPrism Alternative)
- Backup burden: both are self-hosted, so backup is your job. Immich ships nightly Postgres dumps and keeps the last 14 by default.
- Restore: Immich has a restore button in Administration, Maintenance. PhotoPrism is a documented manual dance with more steps.
- Where PhotoPrism wins: a lighter stack and a long track record, though some features sit behind paid membership tiers.
Immich vs Synology Photos (Synology Photos Alternative)
- Hardware: Synology runs on a NAS you own, with Hyper Backup and snapshots. Railway gives you volume backups, plan-dependent, plus whatever you copy out yourself.
- Failure domain: a NAS dies with your house. A Railway volume dies with the volume, which is why a dump on the same volume is not a backup.
- Where Synology wins: LAN speed, and one vendor for disks, RAID and the backup software that covers all of it.
How to use Immich Backups (the OSS self-hosted photo library)?
- Open Administration, Settings, Database Dump Settings and set the schedule and retention. Defaults: daily at 2:00 AM, keep the last 14.
- Run one now: Administration, Job Queues, Create job, Create Database Dump, Confirm. It lands in UPLOAD_LOCATION/backups and counts toward retention.
- Check it from the immich-server shell:
ls -lh /data/backups
- Copy the dumps and the /data originals offsite with your own backup tool. Immich won't do it.
- Turn on Railway volume backups in the volume settings so the volume has its own copy.
- Rehearse the restore on a throwaway project: Administration, Maintenance, Restore database backup, pick a version, click Restore. A dump without the photos is not a backup.
How to self host Immich Backups on other VPS Services (Immich self hosting guide)
Immich ships an official compose file, so a VPS install is storage layout plus one env file.
Clone the Repository
Make a folder and pull the compose file and example env from the latest release.
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
Install Dependencies
Install Docker Engine and the Compose plugin.
docker compose version
Configure Environment Variables
In .env set UPLOAD_LOCATION for the library, DB_DATA_LOCATION for Postgres, a letters-and-numbers DB_PASSWORD, and TZ.
Start the Immich Backups Application
Start it, open port 2283 via your-domain, and create the first admin account right away.
docker compose up -d
Dumps land in UPLOAD_LOCATION/backups, and copying them plus the originals offsite is still on you. Railway handles the deploy, private Postgres, Valkey and ML wiring, and the volume holding library and dumps.
Official Pricing of Immich Backups (Immich pricing)
Immich is free: AGPL-3.0, no paid tier, no cloud plan. Your bill is infrastructure only. Dumps only add volume storage, and since they share the library volume, keep a copy offsite.
Immich Backups cloud vs self hosted comparison (Pricing, features, costs, and more)
Managed photo clouds bundle storage, sync and someone else's backups. Self hosted Immich splits those apart: you run the stack, and you own the dump files and the originals.
Monthly cost of self hosting Immich Backups on Railway
Railway bills compute and volume storage separately. The $5 trial covers a first look. Immich itself is AGPL-3.0 with no paid tier, so nothing goes to a license.
System Requirements for Hosting Immich Backups on a VPS
Upstream asks for 6 GB of RAM and 2 CPU cores minimum, with 8 GB and 4 cores recommended once Smart Search and face recognition are on. Keep the Postgres data on local SSD, never a network share.
Frequently Asked Questions (FAQs)
Do database dumps include my photos?
No. Dumps contain the Postgres database only: file paths, users, albums, faces and other metadata. Immich does not rescan the library folder, so you need a copy of UPLOAD_LOCATION (the /data volume here) alongside every dump.
Where are the automatic backups stored?
In UPLOAD_LOCATION/backups, which on this template is /data/backups on the immich-server volume. Change the schedule and retention under Administration, Settings, Database Dump Settings. The defaults are a daily dump at 2:00 AM keeping the last 14.
How do I restore if an upgrade goes wrong?
Open Administration, Maintenance, Restore database backup, pick the entry by version and date, and click Restore. Rehearse it on a throwaway project first so the real one is not your first attempt.
Are Railway volume backups enough on their own?
They protect against losing the volume, but a dump sitting on the same volume is not offsite. Copy dumps and originals elsewhere for a real 3-2-1 setup.
What should I back up before upgrading?
A fresh dump from Administration, Job Queues, Create job, Create Database Dump, plus a current copy of the originals.
Template Content
immich-machine-learning
ghcr.io/immich-app/immich-machine-learning:v3.3.3immich-server
ghcr.io/immich-app/immich-server:v3.3.3Valkey
valkey/valkey:9.1.2