---
title: "Deploy Immich"
description: "Self-hosted Google Photos alternative with AI search"
category: "Storage"
url: https://railway.com/deploy/deploy-immich-photo-backup-on-railway
---

# Deploy Immich

Self-hosted Google Photos alternative with AI search

**[Deploy Immich on Railway](https://railway.com/template/deploy-immich-photo-backup-on-railway)**

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

- **Creator:** onepush
- **Category:** Storage

## Template content

### immich-server

- **Image:** ghcr.io/immich-app/immich-server:v3.3.3@sha256:bae7664ff3aa4c2c1fcbdcdd86b40b105643c5f861f3e6a770fc760089f25862
- **Health check:** /api/server/ping
- **Public domain:** Yes

### immich-machine-learning

- **Image:** ghcr.io/immich-app/immich-machine-learning:v3.3.3@sha256:73915f07e1f4289ba45b174c58443db74cef47ddf502613f475fc5e52458ea42
- **Health check:** /ping

### Valkey

- **Image:** valkey/valkey:9.1.2@sha256:c123e3715db63d06d4ad6964884037aa0d5d4d703939b9929954112889708e1d
- **Start command:** `/bin/sh -c "rm -rf /data/lost+found && exec docker-entrypoint.sh valkey-server --requirepass $REDIS_PASSWORD --save 60 1 --dir /data --maxmemory-policy noeviction --bind '* -::*'"`

### Postgres

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

## Documentation

# Deploy and Host self hosted Immich (Open-Source Photo and Video Backup) on Railway

This template runs Immich v3.3.3 with CPU machine learning, VectorChord Postgres and Valkey. Image tags are pinned, four volumes are created and every password is generated, so your photo server starts with no extra input. Built for moving a big family library off Google Photos.

## About Hosting Immich open-source software on Railway (self hosted Immich template)

This template runs the Immich v3.3.3 server and CPU machine-learning images, the VectorChord Postgres database Immich needs, and Valkey for the job queue. Four persistent volumes keep the library, database, model cache, and queue data across deploys.

## Why Deploy Immich, the Google Photos alternative on Railway (Railway Free Trial)

Google Photos means renting storage forever and trusting someone else with your library. You keep the data, not a subscription.

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.

### Railway vs Other Hosting Providers and VPS for Immich self hosting

Railway gives you a ready-made stack; other providers make you build it yourself.

| Provider | What You Get with Railway | What You Get with the Other Provider |
|---|---|---|
| DigitalOcean | One-click template with Immich v3.3.3, VectorChord, Valkey. | Manual Docker Compose; you install everything. |
| AWS | No IAM or security groups; private networking is automatic. | EC2 or ECS requires manual networking and Postgres setup. |
| Hetzner | Managed volumes and backups are built in. | Cheap bare metal, but you run and patch everything. |

For most home users, Railway removes the operational work those providers leave to you.

## Common Use Cases for hosted Immich

- **Family phone backup:** Turn on auto backup on every phone in the house and stop paying for per-account cloud storage. Each user gets a private timeline, and you can share albums for trips or for grandparents to view.
- **Google Takeout import:** Pull a full Google Photos export with the Immich CLI or immich-go, then let the server rebuild thumbnails, faces and smart search on your own volume.
- **Shared event albums:** Create an album for a wedding or group trip, share a link, and let several people upload originals without compressing them.
- **Off-site archive:** Keep a second copy of your library on Railway while your home NAS holds the primary, with nightly database dumps going to the volume.

## Dependencies for Immich Docker hosted on Railway

Immich needs four services working together: the API and web UI, a CPU machine-learning worker, a Postgres database with the VectorChord extension, and Valkey for job queues. All images are pinned, and volumes keep state separate.

### Deployment Dependencies for Managed Immich Service (Photo Management)

The managed service depends on immich-server (public HTTP on port 2283), immich-machine-learning (private on port 3003), Postgres 14 with vectorchord0.4.3 and pgvectors0.2.0, and Valkey 9.1.2. Four volumes persist the library, database, model cache, and queue.

### Implementation Details for Immich (Using the official Immich v3.3.3 images)

immich-server uses ghcr.io/immich-app/immich-server:v3.3.3 with PORT and IMMICH_PORT=2283, DB_HOSTNAME, DB_PORT=5432, DB_USERNAME, DB_PASSWORD, DB_DATABASE_NAME, REDIS_HOSTNAME, REDIS_PORT=6379, REDIS_PASSWORD, IMMICH_MACHINE_LEARNING_URL, and TZ. Valkey provides the BullMQ queue with a generated REDIS_PASSWORD.

## How does Immich compare against other photo backup tools

### Immich vs Google Photos (Google Photos Alternative)

- **Ownership:** Your originals live on a Railway volume you control, not inside a Google account that can be suspended or scanned.
- **Daily features:** Timeline, albums, shared links, memories, map, partner sharing and multiple users cover most Google Photos habits.
- **Smart search:** CLIP search, face recognition and OCR run locally on your own CPU. Google wins on polish, speed and zero setup, but Immich wins on privacy.

### Immich vs iCloud Photos (iCloud Photos Alternative)

- **Platform reach:** Immich works on iOS, Android and the browser. iCloud Photos is excellent on Apple hardware and awkward outside it.
- **Storage growth:** Your library grows with Railway volumes instead of paid iCloud+ tiers tied to one vendor.
- **Trade-off:** iCloud wins on hands-off sync and native Apple integration. Immich requires a server, upgrades and your own backup plan.

### Immich vs PhotoPrism (PhotoPrism Alternative)

- **Mobile backup:** Immich apps are built for automatic phone upload. PhotoPrism leans on third-party sync tools or WebDAV for mobile.
- **AI features:** Both do face detection and search. PhotoPrism has polished browsing and tagging, but several features sit behind paid membership tiers.
- **Fit:** Immich is one coherent server, ML and Postgres stack. PhotoPrism is simpler if you only want a browse-and-tag archive.

### Immich vs Nextcloud Memories (Nextcloud Memories Alternative)

- **Scope:** Immich is a dedicated photo library. Memories is an app inside a Nextcloud installation.
- **Fit:** Pick Immich for a focused, fast photo server. Pick Memories if you already run Nextcloud and want one platform for files and photos.
- **Mobile experience:** Immich backup feels close to Google Photos. Memories backup depends on the Nextcloud mobile app and is less photo-first.

## How to use Immich (the OSS photo library)?

1. Wait about a minute for first-boot migrations and geodata import to finish, then open the immich-server URL.
2. Create your first account; this user becomes the admin, so use a strong password and set up a second account for family later.
3. In Administration, Settings, Server, set the External domain to your Railway URL or custom domain so shared links work correctly.
4. Install the Immich mobile app on iOS or Android, enter your server URL, log in, and enable automatic backup from your phone.
5. To import existing photos, use the immich-go tool or Immich CLI with a Google Takeout archive or a folder of files.
6. On small plans, disable Smart Search, Facial Recognition, or OCR in Administration, Settings, Machine Learning to speed up the initial import.

## How to self host Immich on other VPS Services (Immich self hosting guide)

### Clone the Repository

Create an immich-app folder and download docker-compose.yml and example.env from the latest GitHub release. Save example.env as .env.

### Install Dependencies

You only need Docker and Docker Compose on a VPS with local SSD storage, at least 6 GB RAM and 2 CPU cores (8 GB and 4 cores recommended). Never put the database on a network share.

### Configure Environment Variables

Edit .env: set UPLOAD_LOCATION to your library path, DB_DATA_LOCATION to a database folder, DB_PASSWORD to an alphanumeric string (Immich rejects special characters), and TZ to your timezone.

### Start the Immich Application

Run docker compose up -d, then open port 2283 on your firewall and visit http://your-domain:2283. The first account becomes the admin.

Railway handles all of this: the pinned images, VectorChord Postgres, Valkey, volumes, passwords and networking are set up for you, so you only open the server URL and create the admin account.

## Official Pricing of Immich (Immich pricing)

Immich itself is free and open source, with no paid tier and no official cloud. You pay only for the infrastructure you run it on. FUTO sells optional one-time supporter licenses for individuals or per server; they unlock no extra features and are not required.

## Immich cloud vs self hosted comparison (Pricing, features, costs, and more)

Self hosting Immich trades a monthly SaaS bill for a compute and storage bill you control, and you keep every file on your own volume. The software itself is free, so the real comparison is your time and the infrastructure underneath it.

### Monthly cost of self hosting Immich on Railway

Plan for roughly $20-40 per month for compute at light family use, about 4 GB RAM across the four services, plus volume storage for the actual library, billed per GB-month. Start with the $5 Railway trial to test the template before committing.

### System Requirements for Hosting Immich on a VPS

The upstream minimum is 6 GB RAM and 2 CPU cores, but 8 GB and 4 cores is the realistic floor for a smooth import. Put the database on local SSD storage, never a network share, or thumbnailing will crawl.

## Frequently Asked Questions (FAQs)

### Who becomes the admin account?

The first account created after initial migration is the admin. Create it right away so nobody else registers first.

### Does smart search and face recognition work without a GPU?

Yes. The CPU machine-learning image handles CLIP search, face recognition and OCR, just slower. You can disable some ML jobs under Administration, Settings, Machine Learning.

### How large should the volume be for a family photo library?

Leave headroom beyond your library size for thumbnails, transcoded videos and database dumps, and grow the volume as you go. Check your Railway plan's volume limit first.

### How do I back up Immich data?

Immich writes nightly database dumps to /data/backups. Copy them off-site or enable Railway volume backups; the volume alone is not a backup.

### What is the best way to import Google Takeout?

Use the immich-go community tool on your unzipped Takeout folder. It handles metadata and albums better than the web UI.

### How do I upgrade Immich safely?

Read the release notes first, then update the server and machine-learning image tags together. Keep the Postgres image unless the notes say otherwise.


## Similar templates

- [RustFS | (Just Updated) S3 Object Store, Public URL and Keys Set](https://railway.com/deploy/rustfs-or-just-updated-s3-object-store-p) — S3-compatible object store, keys and public URL preset, volume kept
- [TimescaleDB](https://railway.com/deploy/timescaledb-railway-template) — A PostgreSQL-based time-series database for analytics on Railway.
- [Garage S3 Storage](https://railway.com/deploy/garage-s3-storage) — Ultra-light S3 server: fast, open-source, plug-and-play.

Open this page in a browser: https://railway.com/deploy/deploy-immich-photo-backup-on-railway
