---
title: "Deploy Immich (Loopback Fixed)"
description: "Self-hosted Google Photos alt, full ML+Redis, loopback bug fixed"
category: "Storage"
url: https://railway.com/deploy/immich-template
---

# Deploy Immich (Loopback Fixed)

Self-hosted Google Photos alt, full ML+Redis, loopback bug fixed

**[Deploy Immich (Loopback Fixed) on Railway](https://railway.com/template/immich-template)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/immich-template/manifest.json

- **Creator:** Manish Gowardipe's Projects
- **Category:** Storage

## Template content

### immich-postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0

### immich-machine-learning https://devicons.railway.app/i/immich.svg

- **Image:** ghcr.io/immich-app/immich-machine-learning:release

### immich-server https://devicons.railway.app/i/immich.svg

- **Image:** gowardipemanish95/immich-server-proxied:release
- **Health check:** /api/server/ping
- **Public domain:** Yes

### Redis https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg

- **Image:** redis:8.2
- **Start command:** `/bin/sh -c "rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH"`

## Documentation

# Deploy and Host Immich on Railway (Loopback-Bug Fixed)

[Immich](https://immich.app) 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](https://github.com/immich-app/immich/issues/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-server` service runs a custom image (built from the official
  one, publicly available) that adds a `socat` relay 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 `/api` suffix).

## 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.

## Similar templates

- [Garage S3 Storage](https://railway.com/deploy/garage-s3-storage) — Ultra-light S3 server: fast, open-source, plug-and-play.
- [Redis](https://railway.com/deploy/redis-1) — Self Host Latest Redis with Railway
- [EasyImg](https://railway.com/deploy/easyimg) — Simple self-hostable Nuxt.js personal image hosting system.

Open this page in a browser: https://railway.com/deploy/immich-template
