
Deploy Immich Face Recognition
Find people in your photo library with Immich ML
Just deployed
/var/lib/postgresql/data
immich-server
Just deployed
/data
Valkey
Just deployed
/data
immich-machine-learning
Just deployed
/cache
Deploy and Host self hosted Immich Face Recognition (Self-Hosted Photo Library with Face Recognition) on Railway
This template deploys Immich with its machine-learning service, so faces are detected, embedded and clustered into people entirely on your own Railway project.
About Hosting Immich Face Recognition open-source software on Railway (self hosted Immich face recognition template)
Immich is open-source photo management under AGPL-3.0, and this template runs it in your own Railway project so your photos and face data stay in storage you control.
Why Deploy Immich Face Recognition, the Google Photos face grouping alternative on Railway (Railway Free Trial)
Google Photos groups faces well, but every face embedding lives on Google's servers, and you have no say in how long they're kept.
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 Face Recognition 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 Face Recognition self hosting
Immich's face pipeline is CPU-heavy, so hosting comes down to how much server work you want to do yourself.
| Provider | What You Get with Railway | What You Get with the Other Provider |
|---|---|---|
| DigitalOcean | Four linked services from a template, with private networking and growable volumes. | Root access and a flat droplet fee, but you write the Compose file and manage updates. |
| AWS | Immich services already linked, with no VPC or security group setup before the first scan. | Fine control over instance and storage types, but lots of networking before Immich runs. |
| Hetzner | Managed deploys and private networking, billed by usage. | Cheap CPU and RAM for an always-on box, but you run Docker Compose and backups yourself. |
Hetzner is often cheapest for a machine that runs day and night, so pick Railway if you would rather not maintain the server.
Common Use Cases for hosted Immich Face Recognition
- Finding every photo of a family member: Pick a person in Explore, People and Immich lists every photo where that face appears, including the ones from ten years ago that you forgot existed.
- Building albums per person: Once someone is named, you can search by them and save the results as an album, which is handy for a grandparent's birthday book or a school photo collection.
- Cleaning up mis-grouped people: When the clustering splits one person into two or merges two people, you can merge them, hide the wrong ones, or pick a better feature photo to tidy things up.
- Searching for two people together: Combine people in search to find moments where two family members appear in the same frame, like every shot of you and your sister at the lake.
- Private face search instead of cloud photo services: All detection and clustering run on your own Railway services, so your family's faces never leave your project for a vendor's servers.
Dependencies for Immich Face Recognition Docker hosted on Railway
Immich Face Recognition runs as four services in one Railway project: immich-server, immich-machine-learning, Postgres, and Valkey. Only immich-server gets a public domain, on port 2283.
Deployment Dependencies for Managed Immich Face Recognition Service (Photo Management)
- immich-server: ghcr.io/immich-app/immich-server:v3.3.3, public on port 2283, volume at /data for the library and nightly backups.
- immich-machine-learning: ghcr.io/immich-app/immich-machine-learning:v3.3.3 (CPU), private on port 3003, volume at /cache for face models.
- Postgres: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0, private, with its own volume.
- Valkey: version 9.1.2 as the job queue, private, volume at /data, password required.
Implementation Details for Immich Face Recognition (Using Immich official docker image)
On immich-server, set PORT and IMMICH_PORT to 2283, plus the DB_ variables and REDIS_ variables referenced from Postgres and Valkey.
How does Immich Face Recognition compare against other ways to find people in a photo library
Immich vs Google Photos face grouping (Google Photos Alternative)
- Where Immich wins: Face detection and clustering run on your own Railway services, so your photos never leave your project to reach a cloud face model.
- Control: You set the recognition distance and minimum faces per person yourself, instead of accepting Google's grouping as-is.
- Where Google wins: Its face grouping is polished, fast, and needs no setup, and you can't match it on a small CPU-only box.
Immich vs Apple Photos People (Apple Photos Alternative)
- Where Immich wins: It works on any phone or browser, not only Apple devices, and it runs on a server you control.
- Control: Named people, merges, and hidden people sync through your own database rather than an Apple account.
- Where Apple wins: People recognition on-device is smooth on iPhone, and nothing needs a server to be running.
Immich vs PhotoPrism faces (PhotoPrism Alternative)
- Where Immich wins: Its mobile apps back up automatically, and face search is built into the main timeline.
- Where PhotoPrism wins: It is strong at browsing and AI tagging, and some of its features sit in paid membership tiers rather than in the free build.
Immich vs Synology Photos people (Synology Photos Alternative)
- Where Immich wins: It doesn't need a Synology NAS, so you can run it on Railway or any VPS.
- Where Synology wins: If you already own the NAS, its people view is integrated with the hardware you rely on for storage.
How to use Immich Face Recognition (the OSS photo management app)?
Once the deploy is green, work through these steps on day one.
- Open the immich-server URL and create the admin account right away, since the first account becomes the admin.
- Install the Immich mobile app, enter your server URL, log in and turn on backup so new photos upload automatically.
- Go to Administration, Settings, Machine Learning and confirm facial recognition is switched on.
- Open Administration, Jobs and run Face Detection, then Facial Recognition, both set to All assets.
- Open Explore, People and name the people the job finds.
- Merge duplicate people and hide anyone who isn't useful, then search for a person to check the results.
For a large existing library, bulk import from your computer with the Immich CLI:
npm i -g @immich/cli
immich login https://your-domain/api API_KEY
immich upload --recursive /path/to/photos
How to self host Immich Face Recognition on other VPS Services (Immich self hosting guide)
Immich ships an official Docker Compose setup for any VPS with Docker. Plan on 6 GB RAM and 2 CPU cores minimum.
Clone the Repository
Create a folder and download the compose file and example environment from the latest release.
mkdir immich-app && cd immich-app
wget https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
wget https://github.com/immich-app/immich/releases/latest/download/example.env
Install Dependencies
Install Docker and the Compose plugin. Keep the database on local SSD, never a network share.
Configure Environment Variables
Copy the example file to .env, then set your paths and credentials.
cp example.env .env
Set UPLOAD_LOCATION for photos, DB_DATA_LOCATION for the database, DB_PASSWORD with letters and numbers only, and TZ to your zone.
Start the Immich Face Recognition Application
Bring the stack up, then open port 2283 in a browser.
docker compose up -d
Railway handles the service wiring, private networking, and volumes for you, which this manual setup leaves to you.
Official Pricing of Immich Face Recognition (Immich pricing)
Immich is free and open source under AGPL-3.0, with no paid tier and no cloud service, so face detection and recognition cost you nothing to license.
Immich Face Recognition cloud vs self hosted comparison (Pricing, features, costs, and more)
Cloud photo services like Google Photos handle face grouping for you, but your faces and photos live on their servers.
Monthly cost of self hosting Immich Face Recognition on Railway
Expect roughly $20-40 per month for compute at light family use, covering about 4 GB of RAM spread across the four services.
System Requirements for Hosting Immich Face Recognition on a VPS
Upstream Immich asks for at least 6 GB of RAM and 2 CPU cores, with 8 GB and 4 cores recommended. Use local SSD storage for the database and never a network share.
Frequently Asked Questions (FAQs)
Why are some people split into two entries?
Clustering is strict by default, so one person can form two groups when their faces vary across age, lighting, or angle. Push it too far and different people will merge.
Why are some faces missing?
Small, blurry, turned, or partly hidden faces can fall below the min detection score and never get detected. Lowering that score finds more faces but adds false detections.
How long does the first run take on CPU?
Railway has no GPU, so the first full Face Detection and Facial Recognition pass on a large library can take hours. Let it finish once, then the nightly job handles new uploads.
Does Immich send my photos anywhere?
No.
What does min recognized faces do?
It sets how many matching faces must be found before Immich creates a person, with a default of 3.
How do I reset face recognition?
In Administration, Jobs, run Facial Recognition with All to rebuild clusters, which can reset names, so re-check people afterward.
Template Content
immich-server
ghcr.io/immich-app/immich-server:v3.3.3Valkey
valkey/valkey:9.1.2immich-machine-learning
ghcr.io/immich-app/immich-machine-learning:v3.3.3