Deploy XERJ | Elasticsearch-Compatible Search & Memory for AI Agents

Search, vector kNN and agent memory in one Rust binary, ES-compatible.

Deploy XERJ | Elasticsearch-Compatible Search & Memory for AI Agents

Just deployed

/data

Deploy and Host XERJ | Elasticsearch-Compatible Search & Memory for AI Agents on Railway

XERJ is an open-source search engine built for AI agents, shipped as a single Rust binary. It speaks the Elasticsearch 8.x REST API, so existing Elasticsearch clients connect unchanged, and it adds semantic search, kNN vector search, hybrid retrieval and namespaced long-term memory, with no JVM and no separate vector database.

About Hosting XERJ | Elasticsearch-Compatible Search & Memory for AI Agents

This template runs the official XERJ release, pinned by version and SHA-256, as one service with a Railway volume at /data for indices and the write-ahead log. Railway serves it over HTTPS and routes the public domain to the Elasticsearch-compatible API on port 9200.

A bare XERJ deploy gets three things wrong on Railway, and the entrypoint fixes all three. XERJ binds to loopback by default, so the template binds 0.0.0.0 behind Railway's TLS, with API-key authentication kept on. XERJ writes its admin key to a file and never prints it, so the template generates XERJ_ADMIN_KEY as a variable you can read in your Variables tab (change it and redeploy to rotate). XERJ ignores $PORT, so the entrypoint writes the port into its config on every boot. The health check uses /health/ready, and Railway's stop signal reaches XERJ directly, so it flushes to the volume before exiting.

Common Use Cases

  • A retrieval backend (RAG) for an AI app: full-text, semantic and hybrid search over your documents
  • Long-term memory for agents over plain HTTP: store and recall facts per namespace
  • A lightweight Elasticsearch-compatible API for apps already written against Elasticsearch clients
  • A remote search and memory server for Claude Code, Cursor or any MCP client, through xerj mcp

Dependencies for XERJ | Elasticsearch-Compatible Search & Memory for AI Agents Hosting

  • XERJ, the official release binary from github.com/xerj-org/xerj (Apache-2.0)
  • A Railway volume mounted at /data (included in this template)

Deployment Dependencies

Implementation Details

Every request carries Authorization: ApiKey :

curl -H "Authorization: ApiKey $XERJ_ADMIN_KEY" https://your-service.up.railway.app/

From another service in the same project, over the private network:

XERJ_URL=http://${{xerj.RAILWAY_PRIVATE_DOMAIN}}:${{xerj.PORT}}
XERJ_API_KEY=${{xerj.XERJ_ADMIN_KEY}}

The default embedding mode is lexical. Set XERJ_EMBED_MODE=neural before indexing to use the built-in MiniLM model (about 90 MB, downloaded once into the volume). This is a community-maintained template, not affiliated with the XERJ project.

Why Deploy XERJ | Elasticsearch-Compatible Search & Memory for AI Agents on Railway?

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 XERJ | Elasticsearch-Compatible Search & Memory for AI Agents 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.


Template Content

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
117
View Template
NEW
Möbius v0.1 Personal AI OS
Self-hosted AI agent that builds and runs apps for you, with memory.

bento
1
View Template
stella
Self-host stella with web, API, Postgres, Redis, and object storage.

Jan Kubica
7