
Deploy RAGFlow GraphRAG
Knowledge graph extraction over your RAG datasets
Just deployed
/data
MySQL
Just deployed
/var/lib/mysql
Redis
Just deployed
/data
ragflow
Just deployed
/ragflow/logs
Elasticsearch
Just deployed
/usr/share/elasticsearch/data
Deploy and Host self hosted RAGFlow GraphRAG (Open-Source GraphRAG Engine) on Railway
This template runs RAGFlow v0.27.2 with Elasticsearch, MySQL, Redis and MinIO on Railway. It suits teams testing GraphRAG on a small corpus.
About Hosting RAGFlow GraphRAG open-source software on Railway (self hosted RAGFlow GraphRAG template)
RAGFlow GraphRAG keeps documents, extracted entities and graph chunks in your own Railway project. Model keys go in under Model providers, so they stay with you.
Railway handles the tedium: private networking between the five services, generated passwords and secret key, volumes for the stateful ones, TLS on your domain, and a health check on /api/v1/system/healthz.
Why Deploy RAGFlow GraphRAG, the Microsoft GraphRAG alternative on Railway (Railway Free Trial)
Microsoft GraphRAG means wiring an indexing pipeline yourself. Here graph building is a dataset setting next to parsing and chat. Try it on the $5 trial with a tiny dataset.
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 GraphRAG 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 GraphRAG self hosting
Railway runs the same five services as the upstream compose file, so the choice comes down to who tunes Elasticsearch.
| Provider | What You Get with Railway | What You Get with the Other Provider |
|---|---|---|
| DigitalOcean | Five services pre-wired, secrets generated | Droplets plus your own Elasticsearch and kernel tuning |
| AWS | One project, private networking and volumes | EC2, ECS, IAM, security groups, Elasticsearch tuning |
| Hetzner | One click, RAM scaled from the dashboard | Cheap RAM, but you patch the host and set vm.max_map_count |
The trade is the same everywhere: you pay for RAM, and Elasticsearch eats most of it.
Common Use Cases for hosted RAGFlow GraphRAG
- Multi-hop questions over contracts: Ask which vendor owns the indemnity clause in the renewal signed after the merger, and retrieval walks the graph from vendor to agreement to amendment instead of guessing from one chunk.
- People and organization maps from reports: With entity types set to organization, person, event and category, quarterly reports become a map of who signed what, who reports to whom, and which events touched which account.
- Deduplicating entities across documents: Entity resolution merges variants like "2025" and "the year of 2025" so the same customer is not counted five times across five files.
- Community summaries of a research corpus: Community reports give you LLM summaries of entity clusters, which is the fastest way to see the shape of a few hundred papers before you ask anything specific.
- Agent retrieval with graph context: In agent workflows the Retrieval component has the same Use knowledge graph toggle, so a tool call can pull related chunks rather than only keyword matches.
Dependencies for RAGFlow GraphRAG Docker hosted on Railway
This template runs infiniflow/ragflow:v0.27.2, pinned by digest, with the four services it needs: Elasticsearch 8.11.3 as the doc engine (graph chunks land there), MinIO via pgsty/silo, MySQL 8.4.11 and Redis 8.2.10.
Deployment Dependencies for Managed RAGFlow GraphRAG Service (GraphRAG Engine)
- ragflow: port 80 public, API 9380, admin server 9381, volume /ragflow/logs, health /api/v1/system/healthz, 900s timeout.
- Elasticsearch: 1 GB heap, volume /usr/share/elasticsearch/data. MinIO (pgsty/silo): volume /data. MySQL: rag_flow, volume /var/lib/mysql. Redis: volume /data.
- Secrets: RAGFLOW_SECRET_KEY, ADMIN_DEFAULT_PASSWORD, ELASTIC_PASSWORD, MINIO_ROOT_PASSWORD, MYSQL_ROOT_PASSWORD, REDIS_PASSWORD. Fixed: DOC_ENGINE=elasticsearch, DEVICE=cpu, TZ=UTC.
Implementation Details for RAGFlow GraphRAG (Using RAGFlow official docker image)
Start: /ragflow/entrypoint.sh --enable-adminserver --init-model-provider-tables. Add LLM keys in the UI, not env vars. RAGFlow and Elasticsearch share project RAM, so test small.
How does RAGFlow GraphRAG compare against other GraphRAG tools
RAGFlow vs Microsoft GraphRAG (GraphRAG Alternative)
- Same prompts, different shell: the General method feeds Microsoft GraphRAG prompts, but the graph lands in your dataset next to the chunks you already chat with.
- Light is the default: start there, because General costs noticeably more tokens and memory.
- Where GraphRAG wins: corpus-scale community reports and a standalone Python pipeline you can script, cache and rerun outside any UI.
RAGFlow vs LightRAG (LightRAG Alternative)
- Shared DNA: Light is the default method and reuses LightRAG prompts, with fewer tokens, less memory and less CPU than General.
- Fewer knobs: LightRAG as a library lets you pick graph stores and retrieval strategy; RAGFlow gives you entity types, method, resolution and reports.
- Where LightRAG wins: pluggable backends like Neo4j and no dependency on the Elasticsearch doc engine.
RAGFlow vs Neo4j GraphRAG (Neo4j GraphRAG Alternative)
- Not a property graph: RAGFlow stores graph chunks and community reports in the doc engine (Elasticsearch on this template), so there are no Cypher queries.
- Consumption is a toggle: you switch on Use knowledge graph in a chat assistant or the Retrieval agent component rather than writing traversal queries.
- Where Neo4j wins: real graph analytics, path queries and edges you can inspect, correct and audit one at a time.
RAGFlow vs Dify (Dify Alternative)
- Extraction is built in: Dify gives you knowledge bases and chunk retrieval; graph building is a RAGFlow dataset feature, not something you assemble.
- Both self host: model providers, agents and APIs exist in each; Dify is the better fit when you mostly want workflow building.
- Where Dify wins: workflow building comes first, and no graph build to pay for when multi-hop is not the problem.
- Watch the bill: both consume chat model tokens, but only RAGFlow also spends on graph builds. Test on a small dataset first.
How to use RAGFlow GraphRAG (the OSS RAG engine)?
- Open your Railway domain and register the first account, then set REGISTER_ENABLED to 0.
- Under Model providers add a chat model and an embedding model.
- Create a dataset, upload a few files, and parse them with a chunking template.
- In the dataset Configuration page set Entity types (defaults: organization, person, event, category) and Method, Light or General.
- On the Files page click Generate in the top right, then Knowledge graph.
- Wait until the Knowledge graph field shows a timestamp instead of Not generated.
- In a chat assistant switch on Use knowledge graph and ask a multi-hop question.
How to self host RAGFlow GraphRAG on other VPS Services (RAGFlow self hosting guide)
The same v0.27.2 stack runs on any VPS with 4 cores, 16 GB RAM and 50 GB disk.
Clone the Repository
git clone https://github.com/infiniflow/ragflow
cd ragflow/docker
Install Dependencies
Install Docker 24+ and Compose, then raise the Elasticsearch map count.
sudo sysctl -w vm.max_map_count=262144
Configure Environment Variables
Edit docker/.env in place: keep DOC_ENGINE=elasticsearch and DEVICE=cpu, and replace every default password.
grep -nE 'DOC_ENGINE|DEVICE|PASSWORD' .env
Start the RAGFlow GraphRAG Application
docker compose -f docker-compose.yml up -d
First boot pulls several GB of images and DeepDoc models. Railway runs all five services, secrets and health checks for you.
Official Pricing of RAGFlow GraphRAG (RAGFlow pricing)
RAGFlow is Apache-2.0, so GraphRAG costs nothing to license: you pay for infrastructure, and for the LLM tokens each graph build burns.
RAGFlow GraphRAG cloud vs self hosted comparison (Pricing, features, costs, and more)
Self hosting splits into two bills: the Railway project, which is predictable, and the LLM that builds the graph, which is not.
Monthly cost of self hosting RAGFlow GraphRAG on Railway
Expect about $40-80/mo on Railway because Elasticsearch, MySQL, and the RAGFlow container with DeepDoc models need several GB of RAM, and large datasets push past that.
System Requirements for Hosting RAGFlow GraphRAG on a VPS
Upstream asks for 4 CPU cores, 16 GB RAM, 50 GB disk and Docker 24+, plus vm.max_map_count 262144 for Elasticsearch.
Frequently Asked Questions (FAQs)
How much does graph extraction cost?
It is the most token-hungry step in RAGFlow. Test on a small dataset with a cheap chat model first; the docs warn it needs significant memory, compute and tokens.
Should I pick Light or General?
Light is the default and uses LightRAG-style prompts with fewer tokens, less memory and CPU. General uses Microsoft GraphRAG prompts and produces richer entities and relationships at a higher bill.
Does the graph update when new files are parsed?
Yes. RAGFlow keeps one graph per dataset across all its files. When a newly uploaded file is parsed, the graph updates automatically.
What do entity resolution and community reports do?
Resolution merges duplicate entities; reports summarize entity clusters with the LLM. Both are off by default and cost extra tokens.
Where is the graph stored?
As extra chunks in the doc engine, which is Elasticsearch on this template, sitting alongside your dataset. Community reports are stored there too.
Is GraphRAG the same as RAPTOR?
No. RAPTOR is a separate dataset option that recursively summarizes chunks. The knowledge graph is its own run from the Files page, with its own token bill.
Template Content
MySQL
mysql:8.4.11Redis
redis:8.2.10ragflow
infiniflow/ragflow:v0.27.2Elasticsearch
elasticsearch:8.11.3