Deploy Meilisearch
Fast search engine that indexes your data and handles typos
meilisearch-ui
Just deployed
meilisearch
Just deployed
/meili_data
Deploy and Host Meilisearch on Railway
Meilisearch is an open-source search engine written in Rust that returns ranked, typo-tolerant results in a couple of milliseconds — what teams reach for when they want Algolia's search-as-you-type experience without handing their data to a third party. You point it at JSON documents — products, articles, tickets, customer records — and it builds an index handling misspellings, filters, facets, sorting, synonyms and geographic queries through one REST API.
This template lets you self-host Meilisearch on Railway with a working admin dashboard attached, so you can create an index and run your first query minutes after deploying. It runs two services: meilisearch, the engine, backed by a persistent volume holding every index, snapshot and dump; and meilisearch-ui, a browser dashboard for creating indexes, uploading documents and testing queries. The engine is protected by a master key from the first boot, serves a REST API on its public domain, and is reachable privately at meilisearch.railway.internal:7700.

Getting Started with Meilisearch on Railway
After the deploy finishes, copy MEILI_MASTER_KEY from the meilisearch service's variables — that key is the root credential, and Meilisearch has no usernames or passwords. Check the engine at https:///health, which answers {"status":"available"} unauthenticated; every other route returns 401 without the key. Then open the meilisearch-ui domain, click the + tile and add an instance using the engine's public URL and the master key — the dashboard keeps that key in your own browser and calls the engine directly.
The instance page shows the engine's version, database size and index list. Click Create, give the index a UID such as movies and a primary key such as id, then use Upload documents to push a JSON array. Open Documents, type a deliberately misspelled query and check you get sensible hits back in single-digit milliseconds — that round trip proves the deployment works. Use Settings to declare searchable, filterable and sortable attributes before pointing your app at the API.

About Hosting Meilisearch
Meilisearch is a single Rust binary with an embedded LMDB store, which is what makes it practical to self-host: no cluster to babysit, no JVM to tune, no coordination layer. It accepts documents over HTTP, indexes them through an internal task queue, and serves queries from memory-mapped files on disk. Teams self-host it when search data is sensitive, or when per-record SaaS pricing stops making sense.
Key features:
- Typo tolerance and search-as-you-type, under 50 ms on typical datasets
- Filtering, faceting and sorting on any attribute marked filterable or sortable
- Hybrid search combining full-text matching with vector embeddings
- Scoped API keys and tenant tokens, so each client sees only their own data
- Official SDKs for JavaScript, Python, PHP, Ruby, Go, Rust, Java and .NET
The architecture is deliberately small. The meilisearch service owns the volume at /meili_data, holding the index at data.ms alongside snapshots and dumps. The meilisearch-ui service is a static single-page app served by nginx: it holds no data and keeps your connection details in browser local storage, so it needs no volume, database or secrets.
Why Deploy Meilisearch on Railway
Railway removes the operational work that usually surrounds a self-hosted search engine.
- Persistent volume attached and configured, so indexes survive every redeploy
- Master key generated at deploy time — no unauthenticated instance is exposed
- Private networking lets your app query the engine without leaving Railway
- Health checks, automatic HTTPS and a public REST endpoint out of the box
- Indexing threads and memory sized from the container's real limits, not the host's
Common Use Cases
- Product search for an ecommerce storefront, with facets for brand, price and availability
- In-app search across documents, tickets or records, using tenant tokens so each customer searches only their own rows
- Documentation and knowledge-base search, replacing a slow
LIKE '%query%'with instant, misspelling-tolerant results - A retrieval layer for an AI assistant, where hybrid search returns the passages a model answers from
Dependencies for Meilisearch
getmeili/meilisearch:v1— the search engine, pinned to the v1 line so it stays current without jumping a majoreyeix/meilisearch-ui:lite— the dashboard, prebuilt static assets on nginx (github.com/eyeix/meilisearch-ui)- One persistent volume mounted at
/meili_dataon the engine
No database, cache, queue or object storage is needed — Meilisearch stores everything itself.
Environment Variables Reference
| Variable | Service | Purpose |
|---|---|---|
MEILI_MASTER_KEY | meilisearch | Root credential; every other key derives from it |
MEILI_ENV | meilisearch | production makes the master key mandatory |
MEILI_HTTP_ADDR | meilisearch | [::]:7700, so other services can reach it privately |
MEILI_UPGRADE_DB | meilisearch | Migrates the database in place after a version bump |
PORT | both | Listening port for each service |
Deployment Dependencies
- Source: github.com/meilisearch/meilisearch
- Image: hub.docker.com/r/getmeili/meilisearch
- Docs: meilisearch.com/docs
Hardware Requirements for Self-Hosting Meilisearch
Meilisearch is memory-hungry while indexing and modest while serving, so size for the import, not the queries.
| Resource | Minimum | Recommended |
|---|---|---|
| CPU | 1 vCPU | 2–4 vCPU |
| RAM | 1 GB | 4–8 GB, comfortably above your index size |
| Storage | 1 GB volume | 2–3× the size of your raw documents |
| Runtime | Linux container | Linux container |
This template caps indexing threads and memory from the container's own limits, so a large import cannot exhaust the instance mid-index.
Self-Hosting Meilisearch
To run the same engine locally with a persistent data directory:
docker run -d --name meilisearch -p 7700:7700 \
-e MEILI_ENV=production \
-e MEILI_MASTER_KEY=$(openssl rand -hex 32) \
-v $(pwd)/meili_data:/meili_data \
getmeili/meilisearch:v1
Create an index, add documents, then search — the same request shapes work against your Railway domain:
AUTH="Authorization: Bearer $MEILI_MASTER_KEY"
JSON='Content-Type: application/json'
curl -X POST localhost:7700/indexes -H "$AUTH" -H "$JSON" \
--data '{"uid":"movies","primaryKey":"id"}'
curl -X POST localhost:7700/indexes/movies/documents -H "$AUTH" -H "$JSON" \
--data-binary @movies.json
curl -X POST localhost:7700/indexes/movies/search -H "$AUTH" -H "$JSON" \
--data '{"q":"advenure"}'
How Much Does Meilisearch Cost to Self-Host?
The Meilisearch Community Edition is free and open source under the MIT license, commercial use included, so there is no per-record or per-request charge however large the index grows. Meilisearch also sells a Cloud service and an Enterprise Edition covering sharding and S3-streaming snapshots under a separate license — neither is part of this template. Self-hosting on Railway costs only the compute, memory and storage the services use.
FAQ
What is Meilisearch? An open-source, typo-tolerant search engine written in Rust. You send it JSON documents over a REST API and it returns ranked, filtered, faceted results in milliseconds — most often described as an open-source Algolia alternative.
What does this Railway template deploy?
Two services: the Meilisearch engine with a persistent volume for its indexes and snapshots, and meilisearch-ui, a browser dashboard for managing them.
How do I authenticate against self-hosted Meilisearch?
With API keys, not accounts. The master key is generated at deploy time and Meilisearch derives four scoped keys from it. Fetch them with GET /keys and give your frontend the search-only key.
Why does the Meilisearch service need a volume?
The index, its snapshots and any dumps live on disk at /meili_data. Without a persistent volume every redeploy would start from an empty index.
Can my other Railway services query Meilisearch privately?
Yes — any service in the project reaches it at http://meilisearch.railway.internal:7700, keeping search traffic off the internet.
Is the admin dashboard safe to expose publicly? It stores nothing server-side; your instance URL and API key live only in your browser, so the dashboard is useless without the key. The security boundary is the engine's master key, which rejects every unauthenticated request.
How do I back up a self-hosted Meilisearch index?
Snapshots are written to the volume daily, and you can trigger a portable dump any time from the dashboard's Dump button or with POST /dumps. Dumps are version-independent, so they also move data between instances.
Template Content
meilisearch-ui
eyeix/meilisearch-ui:litemeilisearch
getmeili/meilisearch:v1