Deploy Immich (Loopback Fixed)
Self-hosted Google Photos alt, full ML+Redis, loopback bug fixed
immich-postgres
Just deployed
/var/lib/postgresql/data
immich-machine-learning
Just deployed
/cache
immich-server
Just deployed
/data
Redis
Just deployed
/data
Deploy and Host Immich on Railway (Loopback-Bug Fixed)
Immich is a high-performance, self-hosted photo and video backup solution — a fully open-source alternative to Google Photos, with automatic mobile backup, facial recognition, object detection, smart search, and album sharing.
This template includes a fix for a real, currently-open upstream bug
(immich-app/immich#26663)
where the Immich server binds to loopback (127.0.0.1) regardless of the
IMMICH_HOST setting, making it unreachable from outside its own container on
standard Linux infrastructure (confirmed during testing: zero HTTP requests
ever reached the app externally, even with IMMICH_HOST=0.0.0.0 explicitly
set). This template's immich-server image adds a small socat relay
sidecar that forwards external traffic to the loopback-bound app, verified
working end-to-end — public URL, health checks, database, Redis, and machine
learning all confirmed live.
About Hosting Immich
Hosting Immich gives you a complete self-managed photo library with automatic backup from the Immich mobile app, AI-powered facial recognition and object detection, duplicate detection, reverse geocoding for photo locations, and full album/sharing features — without handing your photos to a third-party cloud provider.
This template runs the full feature set (not a stripped-down "no-ML" variant): a dedicated machine-learning service for smart search and facial recognition, Redis for job queues and caching, and a Postgres database built with the VectorChord/pgvector extensions Immich requires for vector search — Railway's standard managed Postgres does not include these extensions, so this template deploys a purpose-built Postgres image instead.
Common Use Cases
-
Personal Photo/Video Backup: Automatic backup from the Immich mobile app (iOS/Android), replacing Google Photos or iCloud with a self-hosted library you fully control.
-
Family Photo Sharing: Shared albums and libraries across multiple user accounts, with granular sharing links.
-
AI-Powered Organization: Facial recognition, object detection, and smart natural-language search across your entire photo library.
-
Privacy-Focused Archival: Long-term photo/video storage without third-party scanning, ads, or unclear data retention policies.
Dependencies for Immich Hosting
Core Dependencies
- PostgreSQL (VectorChord/pgvector) - Stores metadata, albums, and
vector embeddings for smart search. Uses
ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0— not Railway's standard Postgres, since this image bundles the extensions Immich requires. - Redis - Job queue and caching layer for background processing (thumbnail generation, ML jobs, metadata extraction).
- Immich Machine Learning - Dedicated inference service for facial
recognition, smart search embeddings, and duplicate detection
(
ghcr.io/immich-app/immich-machine-learning:release).
Deployment Dependencies
- Immich Server Docker Image - https://github.com/immich-app/immich
- Immich Documentation - https://immich.app/docs/
- Upstream loopback-binding bug - https://github.com/immich-app/immich/issues/26663
Implementation Details
- The
immich-serverservice runs a custom image (built from the official one, publicly available) that adds asocatrelay so the app is reachable externally — see the bug link above for background. No manual networking configuration is needed after deploy. - Machine learning inference runs on CPU only (no GPU access on Railway) — facial recognition and smart search work correctly but process more slowly than a GPU-accelerated self-hosted setup on your own hardware.
- Uploaded photos/videos persist on a dedicated volume across redeploys.
- To connect the Immich mobile app, use your Railway-generated domain as the
server URL (no trailing slash, no
/apisuffix).
Why Deploy Immich on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway hosts your infrastructure so you don't have to deal with configuration, while letting you vertically scale it.
By deploying this template, you get the full Immich feature set — including machine learning and Redis, not a cut-down variant — with a genuine fix for a real reachability bug already applied and verified, so you can start backing up photos from the mobile app immediately after deploy.
Template Content
PGDATA
POSTGRES_DB
POSTGRES_USER
POSTGRES_PASSWORD
POSTGRES_INITDB_ARGS
immich-machine-learning
ghcr.io/immich-app/immich-machine-learning:releaseimmich-server
gowardipemanish95/immich-server-proxied:releaseDB_PORT
Postgres port - wired automatically to the bundled Postgres service.
DB_USERNAME
Postgres username - wired automatically to the bundled Postgres service.
IMMICH_HOST
Bind address for the Immich server process. Set to 0.0.0.0 for deterministic behavior — this template's image includes a proxy sidecar that forwards external traffic to it regardless of the upstream loopback-binding bug.
DB_DATABASE_NAME
Postgres database name used by Immich.
Redis
redis:8.2REDISPORT
REDISUSER