Railway

Deploy meilisearch [Updated Sep'26]

Meilisearch [Sep '26] (Lightning-Fast Open Source Search Engine) Self Host

Deploy meilisearch [Updated Sep'26]

Just deployed

/meili_data

Deploy and Host Meilisearch Self-Hosted on Railway

Meilisearch is the open-source search engine that gives any website or app instant, typo-tolerant search without the operational baggage of Elasticsearch. Written in Rust, it ships as a single binary with a built-in REST API, indexes documents in seconds, and typically answers queries in 20-100ms. Think Algolia's developer experience without Algolia's per-search invoice.

About Hosting Meilisearch Self-Hosted

Algolia's Grow plan bills $0.50 per 1,000 searches once you're past the free tier, and $1.75 per 1,000 on Grow Plus. A store doing half a million searches and 250,000 records a month lands around $245/month in overages on Grow alone, more on Grow Plus. Self-hosting Meilisearch on Railway costs a flat infrastructure fee no matter how many queries you run, so the gap only grows as your traffic does.

The bigger reason to self-host isn't only price, though. Every search query and every indexed document tells you something about your users, what they're looking for, what they can't find, what they abandon a search over. On Algolia's cloud, that query stream lives on their infrastructure. Self-hosting keeps it on yours. For products handling anything sensitive, that's not a nice-to-have.

This Template Deploys the Current Stable Release, Not a Stale Pin

Here's something worth knowing before you deploy: the most-used existing Meilisearch template on Railway is pinned to v1.9.0, a release that's meaningfully behind current. We checked Docker Hub directly rather than assuming, and the actual current stable tag is v1.53.1. This template deploys that version, not an old one carried forward out of inertia.

We also deliberately did not add an HTTP healthcheck here, even though Meilisearch exposes a real /health endpoint that returns {"status":"available"} with no auth required, confirmed live against this template's own test deployment. The best-performing existing Meilisearch template on the marketplace runs with no HTTP healthcheck at all, relying on Railway's process-alive restart behavior instead. We matched that proven pattern rather than adding a check that looks more thorough on paper but doesn't obviously help in practice.

One more real decision, not a default: Meilisearch's own default port is 7700. This template runs it on 3331 instead, with MEILI_HTTP_ADDR explicitly set to match. Railway auto-injects PORT=8080 for services that don't declare their own port, and that auto-injection has broken more than one template in this project's history when an app's start command assumed a different port than what Railway actually routed to. Setting both PORT and MEILI_HTTP_ADDR to the same explicit value sidesteps that failure mode entirely.

Common Use Cases

  • E-commerce catalog search: Typo-tolerant, faceted product search that returns results as the shopper types, without per-search billing eating into margins on high-traffic stores.
  • Documentation and knowledge-base search: Drop-in instant search for docs sites and internal wikis, indexed in seconds and queryable the moment a page is added.
  • SaaS in-app search: Give every customer their own searchable workspace without shipping query volume to a third-party bill that scales with your growth.
  • Internal tools: Fast lookup across large internal datasets or logs without standing up a full Elasticsearch cluster for a single search box nobody outside the company sees.

Dependencies for Meilisearch Self-Hosted Hosting

Meilisearch has zero external dependencies. No database, no cache, no message queue, just one self-contained binary with its own on-disk index. That's the entire point of this template: one service, one volume, nothing else to keep online.

Deployment Dependencies

This template deploys exactly 1 service. Compare that to search stacks built on Elasticsearch, which typically need a JVM runtime, a cluster coordinator, and several gigabytes of memory committed before the first query even runs. Meilisearch's single-service footprint is a genuine reliability advantage, not a corner cut. Fewer moving services means fewer things that can independently fail.

Reference Links

Official documentation: meilisearch.com/docs. Source and issue tracker: github.com/meilisearch/meilisearch. Official Docker image: hub.docker.com/r/getmeili/meilisearch.

Implementation Details

The service runs getmeili/meilisearch:v1.53.1 directly from the official image, no custom Dockerfile required. MEILI_MASTER_KEY is auto-generated per deployment and required in production mode; every request except /health needs it as a bearer token. MEILI_DB_PATH is set inside the mounted volume at /meili_data, so index data survives redeploys instead of resetting to empty on every restart.

How Meilisearch Compares to the Alternatives

Against Algolia, the trade is control for convenience. Algolia's global CDN guarantees sub-50ms responses anywhere in the world and requires zero infrastructure thought from you; Meilisearch self-hosted answers in 20-100ms from wherever you deploy it, and you own every part of the stack in exchange for setting it up yourself, which this template does for you in one click.

Against Elasticsearch, the trade is scale for simplicity. Elasticsearch is built to handle billions of documents with heavy analytics layered on top, and that capability comes with real operational cost: JVM tuning, shard management, a genuine multi-gigabyte memory floor. Meilisearch skips almost all of that by design. If your dataset is a product catalog, a documentation site, or an app's internal records rather than a logging pipeline at planetary scale, Elasticsearch's extra machinery is mostly overhead you're paying for and not using.

Against Typesense, the closest comparison, both are lean, developer-focused, written in a systems language instead of running on a JVM. Typesense leans further into built-in multi-node clustering for high availability out of the box, using Raft consensus to keep replicas in sync automatically. Meilisearch's self-hosted story is simpler at the cost of that built-in HA story being thinner. For a single-instance deployment, which is what most people running a Railway template actually want, the difference mostly disappears, and what's left is largely a matter of taste in API design and ranking tuning rather than a hard technical gap.

Against OpenSearch, the Elasticsearch fork that inherited most of its parent's weight, the comparison is similar to Elasticsearch itself: real analytics and observability capability, real JVM tax to go with it. OpenSearch's own documentation recommends at minimum 8GB of RAM for a small single-node deployment, roughly eight times what Meilisearch needs to run comfortably. If your use case is search, not log analytics or observability dashboards, that's capability you're paying to host but not actually using.

Getting Started

Deploy the template, then open your service's Variables tab and copy the auto-generated MEILI_MASTER_KEY. Point one of Meilisearch's official SDKs, JavaScript, Python, PHP, Go, and several others are available, at your new Railway domain using that key as a bearer token, create your first index, add documents, and start querying. There's no admin UI to configure first; the API is live the moment the deploy finishes.

Why Deploy Meilisearch Self-Hosted on Railway?

Because the two obvious alternatives both cost you something you probably don't want to pay. Algolia's convenience comes with a bill that scales with your success, the more your product is used, the more you owe. Running Elasticsearch yourself avoids that billing model but trades it for real operational weight: a JVM to tune, a cluster to babysit, several gigabytes of memory before you've indexed a single document. Meilisearch splits the difference, and Railway removes the remaining setup friction: no server to provision, no TLS certificate to renew, a persistent volume already attached, and a rolling deploy model so a version bump doesn't cost you downtime. Railway offers a $5 free trial, enough to deploy this template and run real queries against it before you decide to keep it.

Frequently Asked Questions

Why doesn't this template have a healthcheck configured?

It's a deliberate choice, not an oversight. The best-performing comparable template on Railway's marketplace runs the same way, no HTTP healthcheck, relying on process-alive restart behavior instead. Meilisearch does expose a real /health endpoint if you want to wire one up yourself later.

Why is Meilisearch running on port 3331 instead of its default 7700?

To avoid a real, previously-seen failure mode: Railway auto-injects PORT=8080 for any service that doesn't explicitly declare its own port, which can silently break apps that assume a specific port internally. Setting PORT and MEILI_HTTP_ADDR to the same explicit value here avoids that mismatch entirely.

Do I need a separate database for this template?

No. Meilisearch stores its entire index on disk itself, inside the mounted volume. There's nothing else to provision.

What happens to my data if I redeploy?

Nothing, as long as the volume stays attached. MEILI_DB_PATH points inside /meili_data, which is the mounted volume, so a redeploy or restart doesn't touch your indexed documents.

Is my search data private?

Yes. Every request except /health requires your MEILI_MASTER_KEY as a bearer token, and all of it runs on infrastructure you control, not a shared multi-tenant cloud service.

How is this different from just using Algolia?

Cost at scale, mainly. Algolia is easier to start with and guarantees faster global response times out of the box, but the bill grows with your usage. This template gets you a comparable developer experience for a flat monthly infrastructure cost instead.


Template Content

More templates in this category

View Template
Rocky Linux
Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
44
View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
71
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta
51