Deploy Immich | (Just Updated) Google Photos Alternative Nobody Can Hijack
Google Photos alternative: admin pre-seeded so nobody can hijack it, AI on
redis
Just deployed
/data
immich-machine-learning
Just deployed
/cache
Just deployed
/var/lib/postgresql/data
immich-server
Just deployed
/data
Deploy and Host Immich on Railway
Immich is the self-hosted Google Photos alternative: a fast photo and video library with a timeline, albums, shared links, mobile apps for iOS and Android with automatic backup, and AI-powered features — semantic search, face detection and People grouping, OCR text search and duplicate detection — all running on your own domain and your own storage.
This template deploys Immich with the administrator account already created and machine
learning switched on. On a stock Immich deployment the setup endpoint
POST /api/auth/admin-sign-up has no authentication of its own — the first person to reach the
public URL becomes the admin, permanently, and Immich ships no environment variable or headless
command to seed one, so the deployer is locked out with no working reset. Here the admin is
seeded from the deploy's own generated secret before the public port ever opens, the password
is re-applied on every boot, and the server refuses to start with an empty admin password.
About Hosting Immich
Immich is a Node.js server backed by PostgreSQL (with the VectorChord vector extension) and Redis, plus a separate machine-learning service that runs the CLIP, face-recognition and OCR models. Photos and videos are written to disk, so the server needs a persistent volume; the database and Redis each get their own. The server migrates its schema forward on boot — Immich does not support downgrades — so this template pins every image to a known release rather than a moving tag.
Four services deploy together: the Immich server (a thin wrapper on the pinned upstream
v3.1.0), the official machine-learning container on a model-cache volume, PostgreSQL on a
volume, and Redis (Valkey) on a volume with append-only persistence and a password. The wrapper
seeds and rotates the admin, binds Immich to loopback and fronts it with a small nginx that opens
the platform's injected PORT only after the admin exists, and passes very large uploads and the
realtime websocket through untouched.
Why Deploy Immich on Railway?
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 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.
Immich in particular benefits: the private network wires the server to PostgreSQL, Redis and the machine-learning container with no exposed internal ports, the generated domain becomes your photo library URL automatically, and a redeploy is how you rotate the admin password — the image re-applies it from the environment on every boot.
Common Use Cases
- Replace Google Photos with a private, self-hosted library on your own domain and storage.
- Back up phone photos automatically from the Immich mobile apps, with face grouping and search.
- Share albums and individual photos by link without handing them to a third party.
- Keep family or client media inside infrastructure you fully control.
Dependencies for Immich
- PostgreSQL 14+ with the VectorChord extension, deployed by this template on a volume.
- Redis (Valkey), deployed by this template on a volume.
- The Immich machine-learning service, deployed by this template on a cache volume.
Deployment Dependencies
- Immich source and documentation: https://github.com/immich-app/immich
- Self-hosting guide: https://immich.app/docs/overview/introduction
- Wrapper image built for this template: https://github.com/bon5co/immich-railway
After deploying
Open the generated domain and log in as admin@ with the password shown in the
service variables (IMMICH_ADMIN_PASSWORD). Change it in the Immich account settings, or change
the variable and redeploy to rotate it. Install the mobile app, point it at your domain, and turn
on automatic backup.
Template Content
redis
valkey/valkey:9immich-machine-learning
ghcr.io/immich-app/immich-machine-learning:v3.1.0PGDATA
POSTGRES_DB
POSTGRES_USER
POSTGRES_INITDB_ARGS
immich-server
ghcr.io/bon5co/immich-railway:3.1.0DB_PORT
REDIS_PORT
DB_USERNAME
DB_DATABASE_NAME