
Deploy Immich Smart Search
Search photos by description with CLIP in Immich
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 Smart Search (Self-Hosted Photo Library with Smart Search) on Railway
This template gives you a self-hosted Immich stack where you can find photos by typing what is in them, such as "beach sunset dog".
About Hosting Immich Smart Search open-source software on Railway (self hosted Immich smart search template)
Your photos stay in your own Railway project, not on a vendor's servers.
Why Deploy Immich Smart Search, the Google Photos search alternative on Railway (Railway Free Trial)
Google Photos search is convenient, but your library and the search index sit on Google's servers, and storage counts against your Google account.
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 Smart Search 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 Smart Search self hosting
Smart Search runs CLIP on the machine learning service, so you choose between a managed stack and assembling one yourself.
| Provider | What You Get with Railway | What You Get with the Other Provider |
|---|---|---|
| DigitalOcean | Four linked services, private networking and volumes for /data and /cache already attached. | A Droplet you size yourself, with Docker, the compose file and the VectorChord Postgres image installed by hand. |
| AWS | Smart Search working on first deploy, with no IAM, security group or EBS sizing to figure out. | Finer control over instance types and storage, but more setup before a CLIP query returns results. |
| Hetzner | A managed path to the same stack, with volume billing and no server patching on your side. | Low-cost cloud boxes where you run the full compose stack and tune model settings yourself. |
Pick the route that matches how much time you want to spend on the server versus your photos.
Common Use Cases for hosted Immich Smart Search
Smart Search helps most when you remember a photo by what was in it, not by its file name.
- Finding photos by description: Type "dog on a beach at sunset" and CLIP ranks images by visual content, with no tags needed in the metadata.
- Combining smart search with date and location filters: Narrow "birthday cake" to one year or city using the time frame and location filters.
- Searching text in screenshots: Pair a description with OCR text so a receipt or boarding pass shows up when you search for words printed on it.
- Multilingual CLIP models: Switch to ViT-B-16-SigLIP-i18n-256__webli if you query in several languages, since nllb models follow your user language setting.
- Re-indexing after a model change: After you pick a new model under Administration, Settings, Machine Learning, run the Smart Search job for all assets from the Job Status page, because results mix old and new embeddings until it finishes.
Dependencies for Immich Smart Search Docker hosted on Railway
Smart Search lives in the immich-machine-learning service, which runs CLIP on the CPU and writes each photo's embedding into Postgres through the VectorChord extension.
Deployment Dependencies for Managed Immich Smart Search Service (Photo Management)
- immich-server: ghcr.io/immich-app/immich-server:v3.3.3, public on port 2283, with the /data volume for originals and thumbnails.
- immich-machine-learning: ghcr.io/immich-app/immich-machine-learning:v3.3.3 (CPU image), private on port 3003, with the /cache volume holding downloaded CLIP models.
- Postgres: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0. A plain Railway Postgres will not run Smart Search.
- Valkey 9.1.2: the Redis-compatible queue, private, with a required password.
Implementation Details for Immich Smart Search (Using Immich official docker image)
Set IMMICH_MACHINE_LEARNING_URL on immich-server to the private address of the ML service on port 3003.
How does Immich Smart Search compare against other photo search tools
Immich Smart Search vs Google Photos search (Google Photos Alternative)
- Search Scope: Smart Search runs CLIP over your own library, so "dog on a beach at sunset" matches photos with no keywords in the metadata. Google Photos has the broader, more polished search across a huge hosted index.
- Data Location: Photos and embeddings stay on your Railway volume and Postgres. You own the backups, which Immich dumps nightly to /data/backups.
- Cost Model: Immich is free and AGPL-3.0, and you pay Railway for compute and storage. Google Photos storage counts against your Google account.
Immich Smart Search vs Apple Photos search (Apple Photos Alternative)
- Ecosystem Fit: Apple Photos is tightly tied to iCloud and Apple devices. Immich works across iOS and Android through its mobile app, which suits mixed households.
- Filters: Immich combines CLIP with filters for people, OCR text, folder path, camera model, location and time frame.
- Model Control: You can switch the CLIP model in Administration, Settings, Machine Learning and re-run the Smart Search job. Apple offers no such choice, so Apple wins on zero setup.
Immich Smart Search vs PhotoPrism (PhotoPrism Alternative)
- Core Strength: PhotoPrism is strong on browsing and AI tagging. Immich is stronger on mobile backup, timeline and sharing.
- Search Method: PhotoPrism leans on labels, while Immich embeds the query and the image in the same space, which handles freeform phrases better.
- Licensing: Some PhotoPrism features sit in paid membership tiers. Immich's features are all in the open-source release.
Immich Smart Search vs Ente (Ente Alternative)
- Privacy Model: Ente is end-to-end encrypted, so the server cannot read your photos. Immich is not, because CLIP needs to read the images on your server, so you trust the host you run it on.
- Pricing Model: Ente uses a subscription. Immich has no paid tier, so your ongoing cost is the Railway bill.
- Search Depth: Immich documents CLIP plus metadata, OCR and path filters in one place, which gives you more ways to narrow a query.
How to use Immich Smart Search (the OSS photo management app)?
Open the immich-server URL and log in as the admin you created first.
- Upload photos. Install the mobile app and turn on backup, or import folders with the Immich CLI or immich-go.
- Wait for the Smart Search job. Watch Job Status until the queue drains.
- Type a description. Search freeform text; no metadata keywords needed.
- Add filters. Narrow by time frame, location, camera, or media type.
- Change the CLIP model if needed. Go to Administration, Settings, Machine Learning, Smart Search, and set Model Name. Pick a multilingual model like ViT-B-16-SigLIP-i18n-256__webli for mixed-language queries.
- Re-run the Smart Search job for all assets. Save, open Job Status, and click "All" next to Smart Search. Until it finishes, results mix old and new embeddings.
Example queries to try:
beach sunset dog
receipts from 2023
whiteboard photos from the office
How to self host Immich Smart Search on other VPS Services (Immich self hosting guide)
Smart Search runs in the machine learning container, so a VPS needs Docker and enough memory for CLIP.
Clone the Repository
Download the compose file and example env from the latest Immich release, then save the example as .env.
mkdir immich-app && cd immich-app
wget -O docker-compose.yml https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
wget -O .env https://github.com/immich-app/immich/releases/latest/download/example.env
Install Dependencies
Install Docker and the Compose plugin.
Configure Environment Variables
Set your library path, database password and timezone in .env.
UPLOAD_LOCATION=/srv/immich/library
DB_DATA_LOCATION=/srv/immich/postgres
DB_PASSWORD=your-alphanumeric-password
TZ=your-timezone
Start the Immich Smart Search Application
Run the stack, then open port 2283 at your-domain.
docker compose up -d
Railway handles the containers, private networking, the VectorChord Postgres image and volumes for you.
Official Pricing of Immich Smart Search (Immich pricing)
Immich is free and open source under AGPL-3.0, with no paid tier and no hosted cloud.
Immich Smart Search cloud vs self hosted comparison (Pricing, features, costs, and more)
Cloud photo search is convenient, but your library then lives on someone else's servers.
Monthly cost of self hosting Immich Smart Search on Railway
Expect roughly $20-40 per month for compute at light family use, covering about 4 GB RAM across the four services.
System Requirements for Hosting Immich Smart Search on a VPS
Upstream Immich wants at least 6 GB RAM and 2 CPU cores, with 8 GB and 4 cores recommended.
Frequently Asked Questions (FAQs)
How does CLIP smart search find my photos?
Immich's machine learning service turns each photo into a vector with a CLIP model, and your typed query becomes a vector too.
Which CLIP model should I pick?
Start with the default and switch only if queries are in another language or results feel weak.
How much memory does Smart Search use?
It depends on the model, from about 100 MiB for a small OpenAI model to several gigabytes for the largest SigLIP2 variants.
Why are some photos missing from results?
Usually the Smart Search job hasn't reached those assets yet, so they have no embedding.
Do I need to re-run jobs after changing the model?
Yes.
What if errors appear after switching models?
Incompatible data from the old model can linger in the database.
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