Deploy RAGFlow Chat Widget

Embed a RAGFlow assistant on your website

Deploy RAGFlow Chat Widget

Just deployed

/usr/share/elasticsearch/data

Just deployed

/data

Just deployed

/ragflow/logs

Just deployed

/var/lib/mysql

Deploy and Host self hosted RAGFlow Chat Widget (Open-Source RAG Chat Widget for Your Website) on Railway

This template deploys a self-hosted RAGFlow stack so you can build a document-grounded chat assistant and embed it on your own website.

About Hosting RAGFlow Chat Widget open-source software on Railway (self hosted RAGFlow chat embedded on websites template)

Your knowledge base, uploaded documents, and chat history live in the services this template deploys into your own Railway project, not in a vendor's cloud.

Why Deploy RAGFlow Chat Widget, the Intercom Fin alternative on Railway (Railway Free Trial)

Intercom Fin is a hosted support AI tied to the Intercom helpdesk, so you pay for the seat and the resolution model and your docs sit in their system.

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 Chat Widget 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 Chat Widget self hosting

Self-hosting RAGFlow means choosing where its five services run. Here is how Railway compares.

ProviderWhat You Get with RailwayWhat You Get with the Other Provider
DigitalOceanFive services wired from one template, with generated secrets and a public domain.A droplet you size, secure, and patch yourself, with full host control.
AWSA single public URL with no VPC or load balancer setup.Fine-grained networking and instance choice, with more to configure.
HetznerSimpler billing and a faster route to a working assistant.Low-cost servers with generous RAM, but you handle installs and backups.

Pick Railway for a quick start, and a VPS when you need host control or the lowest raw cost.

Common Use Cases for hosted RAGFlow Chat Widget

Teams reach for this when a static FAQ stops keeping up with repeat questions. The assistant only answers from the knowledge base you attach, which keeps its scope tight.

  • Help-center assistant grounded in product docs: Upload setup guides and release notes, parse them, and embed a Chat assistant so customers get cited answers.
  • Internal policy bot on an intranet page: Point an assistant at HR and expense policy PDFs so staff stop pinging the people team with the same questions.
  • Floating widget on a marketing site: Embed an Agent as an Intercom-style floating widget with your own title, colours, and locale, available on every page.
  • Agent that answers from a knowledge base and hands off: Route anything the Agent cannot ground in your docs to a human contact form, keeping unsupported answers out of the chat.
  • Embedding in a CMS page: Paste the iframe code into one CMS page, such as a pricing FAQ, so the assistant sits beside the content it is grounded in.

Dependencies for RAGFlow Chat Widget Docker hosted on Railway

This template runs the full RAGFlow stack as five Railway services, so the website embed has real parts behind it.

Deployment Dependencies for Managed RAGFlow Chat Widget Service (RAG Chat Assistant)

  • ragflow: the official RAGFlow image on public port 80, with the API on 9380 and the admin server on 9381. Logs mount at /ragflow/logs.
  • Elasticsearch 8.11.3: the doc engine, single node, 1 GB heap, volume at /usr/share/elasticsearch/data.
  • MinIO (pgsty/silo): S3-compatible storage for uploads, volume at /data.
  • MySQL 8.4.11: metadata database rag_flow, volume at /var/lib/mysql.
  • Redis 8.2.10: task queue, locks, and caches, volume at /data.

Implementation Details for RAGFlow Chat Widget (Using RAGFlow official docker image)

The template sets DOC_ENGINE=elasticsearch, DB_TYPE=mysql, DEVICE=cpu, and REGISTER_ENABLED=1 at deploy. Secrets like RAGFLOW_SECRET_KEY and ELASTIC_PASSWORD are generated per deploy.

How does RAGFlow Chat Widget compare against other ways to put a document-grounded chatbot on a website

RAGFlow vs Intercom Fin (Intercom Fin Alternative)

  • Hosting and data: RAGFlow runs in your own Railway project, so documents stay in your infrastructure. Intercom Fin lives inside the Intercom platform.
  • Where it fits: Fin wins if your support desk already runs on Intercom and you want a managed answer bot with little setup.
  • Cost model: RAGFlow is open source and you pay for hosting and model calls. Fin is a paid add-on tied to Intercom.

RAGFlow vs Chatbase (Chatbase Alternative)

  • Setup effort: Chatbase puts a bot on a site in minutes from a hosted dashboard. RAGFlow needs the stack deployed and chunking tuned first.
  • Parsing depth: DeepDoc handles scanned PDFs, tables, and slides with visual chunk inspection. Chatbase may be enough for clean text sources.
  • Ownership: Chatbase is hosted, so your data and uptime depend on their service.

RAGFlow vs Dify (Dify Alternative)

  • Scope: Dify is a full LLM app platform with workflows and web app embeds. RAGFlow focuses on retrieval quality and grounded answers with citations.
  • Licensing: Dify uses a modified Apache license with extra conditions. RAGFlow is Apache-2.0.
  • Where Dify wins: If you want many LLM apps beyond document chat, Dify covers more ground.

RAGFlow vs AnythingLLM (AnythingLLM Alternative)

  • Simplicity: AnythingLLM is an easy all-in-one app with an embed widget, and it is faster for a single user or small team.
  • Retrieval depth: RAGFlow adds hybrid search with rerank and template-based chunking for messy or large document sets.
  • Deployment weight: AnythingLLM runs on far less infrastructure. RAGFlow needs Elasticsearch, MySQL, MinIO, and Redis, so expect a heavier Railway bill.

How to use RAGFlow Chat Widget (the OSS RAG engine)?

Work through these steps on your first day after the deploy. Get a working assistant on a test page before touching the rest of the site.

  1. Log in on your Railway RAGFlow domain and register. Set REGISTER_ENABLED to 0 afterward.
  2. Add a chat model and an embedding model under Model providers.
  3. Create a knowledge base, upload documents, and wait for parsing. Spot-check chunks.
  4. Create a Chat assistant linked to that knowledge base.
  5. Create an API key from your avatar, then API.
  6. Open the assistant's Embed dialog and copy the iframe code.
  7. Paste the iframe into your page:


  1. Ask a real question from your docs and check that the citations point to the right files.

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

Running this stack on your own VPS gives you full control, but you own the host setup. Plan for enough RAM to run Elasticsearch, MySQL, and the RAGFlow container together.

Clone the Repository

Grab the upstream source and move into the Docker directory, where the compose file lives.

git clone https://github.com/infiniflow/ragflow
cd ragflow/docker

Install Dependencies

Install Docker 24 or newer with the Compose plugin. Elasticsearch needs a higher memory map limit, so set it first.

sudo sysctl -w vm.max_map_count=262144

Configure Environment Variables

Edit the .env file next to the compose file and set your passwords and public domain. Add LLM and embedding keys later in the RAGFlow UI under Model providers.

Start the RAGFlow Chat Widget Application

Start the stack in the background, then open your-domain in a browser. The first start can be slow while models download, so watch the logs.

docker compose -f docker-compose.yml up -d
docker compose logs -f ragflow

On your own VPS you handle backups, upgrades, and TLS yourself, which Railway would otherwise take on for you.

Official Pricing of RAGFlow Chat Widget (RAGFlow pricing)

RAGFlow is open source under Apache-2.0, so the software itself is free to self host and you pay only for the infrastructure it runs on.

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

Self hosting gives you control over the stack, upgrades, and data, while a hosted option trades that control for convenience. The difference is who runs the infrastructure.

Monthly cost of self hosting RAGFlow Chat Widget on Railway

Expect roughly $40-80 per month on Railway, since Elasticsearch, MySQL, and the RAGFlow container with its DeepDoc models need several gigabytes of RAM. Large knowledge bases push that higher.

System Requirements for Hosting RAGFlow Chat Widget on a VPS

Upstream recommends at least 4 CPU cores, 16 GB RAM, 50 GB disk, and Docker 24 or newer. Budget extra disk if you plan to parse large PDF collections.

Frequently Asked Questions (FAQs)

Do I need an API key to embed the chat assistant?

Yes. Create a RAGFlow API key first by clicking your avatar and then API, or the embed will fail with an error.

Can visitors see my documents?

Not directly. Attach only the content you're happy to expose.

How do I style the widget?

For a Chat assistant, the embed code controls the iframe itself, so you style the surrounding page and container.

Does it stream responses?

Yes, the chat interface streams answers as they generate. Streaming options are configured in the embed settings, so check the dialog if you want to change how responses appear.

Can I limit who uses it?

You can restrict the public domain itself.

Should I use the iframe or the HTTP API?

Use the iframe when you want RAGFlow's ready-made chat UI on a page quickly.


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
Weaviate
Vector database with hybrid search and an API key-protected API

zer0person
1
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