Deploy RAGFlow

Deep-document RAG with citations, v0.27.2 digest-pinned

Deploy RAGFlow

Just deployed

/var/lib/mysql

Just deployed

/data

Just deployed

/ragflow/logs

Just deployed

/usr/share/elasticsearch/data

Deploy and Host self hosted RAGFlow (Open-Source RAG Engine) on Railway

RAGFlow is an Apache-2.0 deep document RAG engine from InfiniFlow. It parses PDFs, scans, tables, slides, and spreadsheets into cited answers. This Railway template pins official infiniflow/ragflow:v0.27.2 with five services, generated secrets, and no default passwords.

About Hosting RAGFlow open-source software on Railway (self hosted RAGFlow template)

The template runs v0.27.2, the latest stable release. v1.0.0-rc1 is a preview rewrite that migrates data irreversibly, so it is not used. Every image is pinned by tag and digest. Services: ragflow, Elasticsearch 8.11.3, MinIO via pgsty/silo, MySQL 8.4.11, and Redis 8.2.10. All persistent data lives on named volumes.

The ragflow service exposes port 80. Inside, nginx fronts the UI, API on 9380, admin server on 9381, and a task executor. The health check hits /api/v1/system/healthz, which reports the state of MySQL, Elasticsearch, Redis, and MinIO. Start command: /ragflow/entrypoint.sh --enable-adminserver --init-model-provider-tables.

Generated secrets: RAGFLOW_SECRET_KEY, ADMIN_DEFAULT_PASSWORD, ELASTIC_PASSWORD, MINIO_ROOT_PASSWORD, MYSQL_ROOT_PASSWORD, REDIS_PASSWORD. No default passwords.

Why Deploy RAGFlow, the ChatGPT Enterprise knowledge alternative on Railway (Railway Free Trial)

RAGFlow answers questions from a 200-page PDF with page citations. It is an open-source alternative to locked-in enterprise knowledge tools. You keep parsing, chunking, retrieval, and generation on your own Railway project. The trial lets you test the full five-service stack before paying for RAM.

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 RAGFlow 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.

Railway vs Other Hosting Providers and VPS for RAGFlow self hosting

ProviderRAGFlow hosting experienceBest for
DigitalOceanYou manage Docker, vm.max_map_count, TLS, volumes, and upgrades manually. Elasticsearch plus RAGFlow can hit memory limits quickly on a 4 GB droplet.Full root control on one VPS
AWSEC2, EBS, security groups, IAM, and OOM risks with DeepDoc parsing. Managed OpenSearch adds cost.Enterprises already inside AWS
HetznerCheap RAM and disk, but you handle Docker, sysctls, reverse proxy, backups, and monitoring yourself.Budget self hosters who accept ops work
RailwayFive services, pinned digests, volumes, health checks, generated secrets, one public domain. Updated, pinned, persistent, no config.Developers who want RAGFlow working today

Common Use Cases for hosted RAGFlow

Use the Railway deployment for internal knowledge bases over PDFs, Word, Excel, Markdown, and scans. Law firms load contracts and get page citations. Support teams upload manuals to cut first-response time. HR parses policy PDFs and answers benefits questions. Researchers compare papers, extract tables, and generate summaries with sources.

Dependencies for RAGFlow Docker hosted on Railway

Five services, each pinned by tag and digest. All writable data lives on Railway volumes. Nothing is stored in the container layer.

Deployment Dependencies for Managed RAGFlow Service (RAG Engine)

ragflow depends on MySQL, Elasticsearch, Redis, and MinIO. MySQL stores users, datasets, documents, tasks, and chats. Elasticsearch is the document engine. Redis holds queues, locks, and caches. MinIO stores uploads and parsed outputs. No dependency is exposed directly.

Implementation Details for RAGFlow (Using RAGFlow official docker image)

Uses infiniflow/ragflow:v0.27.2 pinned by digest. Elasticsearch 8.11.3 single node, 1 GB heap, security on, volume /usr/share/elasticsearch/data. MinIO pgsty/silo volume /data. MySQL 8.4.11 volume /var/lib/mysql. Redis 8.2.10 volume /data. ragflow volume /ragflow/logs.

How does RAGFlow compare against other RAG platforms

RAGFlow vs Dify

  • RAGFlow: DeepDoc layout-aware parsing, template chunking, hybrid search, grounded citations. Apache-2.0.
  • Dify: LLM app platform with RAG, workflow, agents. Modified Apache license with extra conditions.
  • RAGFlow: Focused on document retrieval and citation accuracy. Self-host on Railway.
  • Dify: Broader app builder, but parsing is less specialized.

RAGFlow vs AnythingLLM

  • RAGFlow: Advanced parsing of scans, tables, slides; visual chunk inspection; hybrid search.
  • AnythingLLM: MIT, simpler all-in-one chat with documents. Desktop and Docker.
  • RAGFlow: More moving parts (Elasticsearch, MySQL, Redis, MinIO). Better for complex PDFs.
  • AnythingLLM: Easier single-container setup, but less granular chunk control.

RAGFlow vs Onyx

  • RAGFlow: Apache-2.0, DeepDoc parsing, agent workflows, MCP.
  • Onyx: Formerly Danswer, MIT core plus enterprise edition. Many connectors.
  • RAGFlow: Strong on layout parsing and citations from files.
  • Onyx: Strong on enterprise search across SaaS connectors.

RAGFlow vs LlamaIndex

  • RAGFlow: Ready-to-run app with UI, API, MCP. No coding required.
  • LlamaIndex: Framework library you code against, plus LlamaCloud parsing.
  • RAGFlow: Deploy and use immediately. Good for teams.
  • LlamaIndex: Build custom pipelines with code. More flexible, more work.

How to use RAGFlow (the OSS RAG engine)?

Open your Railway domain, register an account, then set REGISTER_ENABLED=0 after creating team accounts. Add an LLM, embedding model, and optional reranker under Model providers. Create a dataset, pick a chunking template (General, Q&A, Manual, Laws), upload files, and click parse. Inspect chunks visually, adjust if needed.

How to self host RAGFlow on other VPS Services (RAGFlow self hosting guide)

Upstream: git clone https://github.com/infiniflow/ragflow, then docker compose. You need Docker 24+, vm.max_map_count=262144, 4 CPU, 16 GB RAM, 50 GB disk.

Clone the Repository

Run git clone https://github.com/infiniflow/ragflow, then cd ragflow/docker. Default .env ships passwords infini_rag_flow and admin. Change them before starting.

Install Dependencies

Install Docker Engine and Compose plugin. Set sudo sysctl -w vm.max_map_count=262144 and make it permanent in /etc/sysctl.conf. Need 4 CPU, 16 GB RAM, 50 GB disk. Pull images with docker compose pull.

Configure Environment Variables

Edit .env: set RAGFLOW_SECRET_KEY, ADMIN_DEFAULT_PASSWORD, ELASTIC_PASSWORD, MINIO_ROOT_PASSWORD, MYSQL_ROOT_PASSWORD, REDIS_PASSWORD. Set DOC_ENGINE=elasticsearch, DEVICE=cpu, DB_TYPE=mysql, HF_ENDPOINT=https://huggingface.co. REGISTER_ENABLED=1 first, then 0. No LLM keys here; they go in the UI.

Start the RAGFlow Application

Run docker compose -f docker-compose.yml up -d. Wait for health, open http://your-domain. Register, add provider, create dataset, parse. Upstream does not pin digests, generate unique secrets, or provide Railway health checks.

Official Pricing of RAGFlow (RAGFlow pricing)

RAGFlow is open source under Apache-2.0. Self-hosted version is free. ragflow.io lists pricing for hosted and enterprise offerings, but this template does not quote those prices. You pay only for Railway resources. No license fees for the core engine.

RAGFlow cloud vs self hosted comparison (Pricing, features, costs, and more)

Cloud removes infrastructure burden but sends documents to InfiniFlow. Self hosting keeps documents, embeddings, and logs in your Railway project. Features are similar, but cloud may add support and enterprise controls.

Monthly cost of self hosting RAGFlow on Railway

Cost depends on usage. Elasticsearch 1 GB heap and ragflow are the largest memory consumers. MySQL and Redis add modest RAM. MinIO uses disk. You can scale down idle, but Elasticsearch needs consistent memory. Large sets, concurrent parses, or always-on agents increase cost. The free trial covers testing. No license fee.

System Requirements for Hosting RAGFlow on a VPS

Upstream requires 4 CPU, 16 GB RAM, 50 GB disk, Docker 24+, vm.max_map_count=262144. On Railway, you do not set kernel parameters; Elasticsearch runs with mmap and memory lock off, 1 GB heap. Small documents may work with 8 GB, but 16 GB is safer for DeepDoc parsing. Disk grows with uploads and indices. Use volumes for every service.

Frequently Asked Questions (FAQs)

Does this template use RAGFlow v1.0.0-rc1?

No. The template pins infiniflow/ragflow:v0.27.2. v1.0.0-rc1 migrates data irreversibly and is not used.

Are there default passwords in the Railway RAGFlow template?

No. Every secret is generated per deploy: RAGFLOW_SECRET_KEY, ADMIN_DEFAULT_PASSWORD, ELASTIC_PASSWORD, MINIO_ROOT_PASSWORD, MYSQL_ROOT_PASSWORD, REDIS_PASSWORD.

Where do I add my OpenAI or Ollama keys?

You add LLM, embedding, and rerank keys in the UI under Model providers. They are not environment variables.

How do I disable open registration?

Set REGISTER_ENABLED=0 in Railway service variables after creating team accounts. The built-in admin@ragflow.io remains available.

Can I use GPU for parsing?

The template sets DEVICE=cpu. GPU support depends on Railway availability and may require a different plan or custom Docker setup.

Does the health check cover all dependencies?

Yes. /api/v1/system/healthz checks MySQL, Elasticsearch, Redis, and MinIO. Startup timeout is 900 seconds.

How do I upgrade RAGFlow later?

Wait for the template update, or change the pinned image to a newer tag and redeploy. Volumes keep your data, but back up MySQL first.

Keep every volume attached; MySQL, Elasticsearch, and MinIO together hold your knowledge bases.


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
stella
Self-host stella with web, API, Postgres, Redis, and object storage.

Jan Kubica
7
View Template
Hermes Agent | OpenClaw Alternative with Dashboard
Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

codestorm
88