Chat with your company documents on Railway
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 RailwayRAGFlow or Onyx
Choose by where your documents live:
- Files you upload (contracts, manuals, research papers, scanned PDFs, slides): RAGFlow. Its template runs a separate parsing worker with OCR and layout models, and answers cite the source passages.
- Content in connected tools (Slack, Google Drive, Confluence, Notion, Jira, GitHub): Onyx. It indexes connectors, keeps them in sync and offers a ChatGPT-style assistant over the results.
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 |
| Template | Creator | Deployments | Services |
|---|---|---|---|
| flowise-railway | Henry Heng's Projects | 8,512 | 1 |
| Langflow | – | 2,852 | 2 |
| flowise-with-n8n-ai-automation | derekcheungsa's Projects | 1,974 | 3 |
| AnythingLLM | Timothy Carambat's Projects | 1,972 | 1 |
| Dify | Jack | 1,871 | 11 |
| Langflow | alphasec | 1,284 | 2 |
| FlowiseAI | Protemplate | 782 | 2 |
| Langflow Pre-releases | – | 358 | 2 |
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
- Deploy the template. The first start initialises the database and can take several minutes. Wait for the
ragflowhealthcheck to pass. - Register your account. Open the public URL and sign up, then set
REGISTER_ENABLEDto0on theragflowservice. - Add models. Under Model providers, add a chat model and an embedding model.
- Create a dataset. Upload files and start parsing. The
ragflow-workerservice does the parsing. - Ask questions. Use Chat against the dataset. Answers cite the matching chunks.
- Scale parsing. Add
ragflow-workerreplicas or raiseRAGFLOW_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.
- RAGFlow: about $64 per month idle (5.7 GB RAM) and about $136 for a team knowledge base with a few hundred documents parsed per week.
- Onyx: about $94 per month idle (8.3 GB RAM) and about $220 for a team with several connectors syncing daily.
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
- RAGFlow: Elasticsearch indices turn read-only near 4.75 GB used on a 5 GB volume, so grow the volume early. There is no local embedding service.
- Onyx: the code interpreter tool is unavailable because it needs the Docker socket. A model other than the default embedding model is downloaded on every model-server restart.
- Licences: see the FAQ for Apache-2.0, MIT and enterprise-directory terms.
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.