Chat with your company documents on Railway

By Tracklayer · Updated 2026-11-20

Short answer: you need a retrieval-augmented generation (RAG) system: software that splits your files into chunks, indexes them, and passes the relevant chunks to a language model so answers cite your documents. On Railway you can deploy RAGFlow for parsing PDFs, scans and tables, or Onyx for searching connected tools such as Slack, Google Drive and Confluence. Both are heavy stacks and both need an LLM provider key.

Deploy RAGFlow on Railway

RAGFlow or Onyx

Choose by where your documents live:

You can also expose RAGFlow’s retrieval API or MCP endpoint to AI agents.

Compare the two templates

RAGFlow Onyx
Pinned version RAGFlow v0.27.2 Onyx v4.9.0
Index Elasticsearch 8.11.3 OpenSearch 3.6.0
Other services Web, parsing worker, MySQL, Redis, Bucket nginx, API, background workers, web app, two model servers, Postgres, Redis, SeaweedFS
Embeddings Your provider, set in the UI Local models in the template
First account Register, then close registration First account becomes admin
README RAM plan roughly 6 to 10 GB roughly 8 to 14 GB
TemplateCreatorDeploymentsServices
flowise-railwayHenry Heng's Projects8,5121
Langflow–2,8522
flowise-with-n8n-ai-automationderekcheungsa's Projects1,9743
AnythingLLMTimothy Carambat's Projects1,9721
DifyJack1,87111
Langflowalphasec1,2842
FlowiseAIProtemplate7822
Langflow Pre-releases–3582

Railway marketplace data as of 2026-11-19. Full ranking: Best AI app builder templates on Railway.

The table above lists AI app builder templates on Railway by deployments. It includes RAGFlow, while Onyx is not matched by that topic.

Deploy RAGFlow, step by step

  1. Deploy the template. The first start initialises the database and can take several minutes. Wait for the ragflow healthcheck to pass.
  2. Register your account. Open the public URL and sign up, then set REGISTER_ENABLED to 0 on the ragflow service.
  3. Add models. Under Model providers, add a chat model and an embedding model.
  4. Create a dataset. Upload files and start parsing. The ragflow-worker service does the parsing.
  5. Ask questions. Use Chat against the dataset. Answers cite the matching chunks.
  6. Scale parsing. Add ragflow-worker replicas or raise RAGFLOW_TASK_EXECUTORS. Each executor needs roughly 1.5 to 3 GB of RAM while parsing.

For Onyx, wait for api-server to be healthy (the first start runs migrations and can take up to 15 minutes), create the first account, add an LLM provider, then add connectors and let them index. Indexing speed depends on the background and indexing-model-server services.

What persists

RAGFlow stores chunks in Elasticsearch, users and settings in MySQL, the task queue in Redis, and original files in a Railway Bucket. Onyx stores its index in OpenSearch, users and chat history in Postgres, and uploads in SeaweedFS, all on volumes. The Onyx template notes that setting FILE_STORE_BACKEND=postgres before first use removes the need for SeaweedFS.

Costs

These are estimates, not measurements. Both templates’ TEMPLATE.md files compute them from Railway’s RAM, CPU and volume rates and say Hobby is the minimum plan.

Large first-time indexing raises CPU and memory temporarily. Pro is recommended for production. LLM and embedding charges come from your model provider.

Limits and licence notes

These are community templates, not affiliated with InfiniFlow or Onyx.

Other options

For a simpler private chat interface, see Open WebUI and LibreChat. For the vector store alone, see pgvector for RAG. For visual LLM app builders, see Dify and the AI app builder ranking. More guides are listed at /guides/.

FAQ

How do I create the first account?

RAGFlow: open the public URL and register; the first users can register because REGISTER_ENABLED is 1, so set it to 0 on the ragflow service afterwards. The built-in superuser is admin@ragflow.io with the generated ADMIN_DEFAULT_PASSWORD. Onyx: open the nginx public URL and create an account; the first account becomes the administrator. To restrict sign-ups, set VALID_EMAIL_DOMAINS on api-server or configure SSO.

Do I need an LLM account?

Yes, for both. Neither template includes a hosted model. In RAGFlow you add a chat model and an embedding model under Model providers. In Onyx you add an LLM provider in the admin panel, while the embedding models run inside the template. Model usage is billed by your provider, not by Railway.

What licences apply?

RAGFlow is Apache-2.0. Onyx is MIT outside its ee directories, which use the Onyx Enterprise License; the template keeps enterprise features disabled. The stacks also use Elasticsearch 8.11.3 (RAGFlow), distributed under the Elastic License 2.0 or SSPL, and OpenSearch (Onyx, Apache-2.0). The NOTICE says running Elasticsearch unmodified as a backing service is permitted under ELv2. This is not legal advice.

Will my documents survive a redeploy?

Yes. RAGFlow keeps chunks in Elasticsearch, users and datasets in MySQL, and original files in a Railway Bucket. Onyx keeps its index in OpenSearch, users, connectors and chats in Postgres, and uploaded files in SeaweedFS, all on volumes. Back up before upgrading either.

How much RAM do they need?

Both are memory-heavy. The README plans for roughly 6 to 10 GB for RAGFlow and 8 to 14 GB for Onyx. The template TEMPLATE.md files label their own per-service figures as estimates, and the Onyx file says it is not deploy-tested.