English · 简体中文
In one sentence: throw your documents (PDF / Word / Excel / PPT / images / web pages) at it, then ask questions in plain language and get answers grounded in those documents.
- Written in Rust. It idles at a few tens of MB of RAM (RAGFlow needs ~1 GB to start).
- The UI and feature set follow the open-source project RAGFlow, but RayRAG needs no MySQL, Elasticsearch, Redis or MinIO: vectors live in zvec and metadata lives in PostgreSQL 18.4.
- Works on networks in mainland China: container images, package mirrors and web search all use endpoints reachable from there.
- Ships with 65 model providers (DeepSeek, Qwen, Zhipu, Moonshot, SiliconFlow, VolcEngine, Baichuan, …) plus local Ollama / vLLM / LM Studio / llama.cpp.
- No Docker? Run a single binary instead (pure Linux mode).
- 1. Up and running in five minutes
- 2. Open the web UI, first steps
- 3. Connect a model (what makes answers smart)
- 4. FAQ (read this first when something breaks)
- 5. Day-2 operations: upgrade / backup / uninstall
- 6. No Docker: pure Linux install
- 7. What is inside
- 8. More documentation
Open a terminal and run:
docker compose version- You see a version (e.g.
Docker Compose version v2.24.0) → go to step 2. - Command not found → install Docker first:
- Windows / macOS: install Docker Desktop, then restart.
- Linux:
curl -fsSL https://get.docker.com | sh
No Docker, or you would rather not use it? Jump to section 6: pure Linux install.
git clone https://github.com/Junesgone/RayRAG.git
cd RayRAG
./install.shinstall.sh does everything else for you:
- writes
.env— the database and the first login both start asadmin; nothing generated, nothing to hunt for; - pulls base images and dependencies through mirrors that work in mainland China (the first run takes 5–15 minutes depending on your connection);
- starts the database and the application and waits until the service is really healthy;
- prints the URL, the login e-mail and the password on screen.
When it finishes you will see something like:
============================================================
RayRAG is up and running 🎉
------------------------------------------------------------
Web UI : http://192.168.1.10:9380
Login : admin / admin (username and password are both 'admin' at first)
Password : admin (initial; the first-run guide walks you through changing it)
------------------------------------------------------------
Logs : docker compose logs -f rayrag
Stop : docker compose down
Restart : docker compose restart
============================================================
Sign in with
admin/admin, then change the password — the first-run guide walks you through it.
./install.sh --port 8080 # listen on another web port (default 9380)
./install.sh --global-mirror # build against upstream mirrors instead of CN ones
./install.sh --no-build # start without rebuilding the image
./install.sh --dry-run # check everything and write .env, then stop
./install.sh --help # all optionscp .env.example .env
# Optional: RAYRAG_POSTGRES_USER / RAYRAG_POSTGRES_PASSWORD start as admin/admin (like the
# first login); RAYRAG_ADMIN_PASSWORD is unset for the admin first login — set it (12+ chars)
# if you want your own password up front. Save, then:
docker compose up -d --buildWhere your settings live: the
.envfile in this project folder. RayRAG mounts it into the container, so the first-login setup page (section 2) writes exactly the file you can open, edit and back up — one file, no hidden copy.
- Open a browser at
http://<your-host-ip>:9380(locally:http://127.0.0.1:9380).
Running RAGFlow on the same machine? RayRAG's default port, 9380, is also RAGFlow's, so the two cannot both hold it. Change one line in
.env—RAYRAG_PORT=9390— and rundocker compose up -dagain; the command above prints the URL that is actually in use, anddocker compose port rayrag 8080tells you the published port at any time.
- Log in as
adminwith the passwordadmin— the first account is created with all three fields set toadminso a fresh deployment needs no generated password. Change it right after signing in (the first-run page and the profile page both offer it). - Create a knowledge base: left menu
Knowledge Base→Create knowledge base→ type a name → save. - Upload documents: open the knowledge base →
Filestab →+ Add file, drop your PDF / Word / Excel / images → confirm. - Parse: tick the files → click
Parse(the green play button) → wait for the status to becomeDONE. Large files take a while; theLogstab shows progress. - Ask questions:
- quick check: left menu
Search→ type a question → Enter, and you get the matching passages; - ChatGPT-style chat: left menu
Chat→Create chat assistant→ pick your knowledge base → start chatting.
- quick check: left menu
Almost every button is bilingual (English / 简体中文); switch it under your avatar → Language.
First login already configures the important parts for you. The opening page (/setup)
detects this host's CPU and memory, suggests how many documents to parse at once, and lists
the settings that matter — model endpoints, storage, resource limits, the search engine, and
the sign-up switch. Saving writes them to the project's .env and tells you which took
effect immediately and which need a restart. Everything there can also be set by environment
variable, exactly as in RAGFlow.
Two things make it quick to trust:
- Values are filled in already. Anything RayRAG would default to is shown and tagged
default, so you read it and press Save; fields that have no safe default (a model endpoint, an API key, your database) stay empty rather than guessing an address for you. - The page and
.envstay in step. Edit.envin another window and the page picks the change up within seconds. If you have unsaved edits at that moment it asks before reloading, so nothing you typed is thrown away silently.
RayRAG works without any model: parsing, chunking and keyword retrieval all run. But chat answers and vector semantic search need one chat model and one embedding model. RayRAG ships no models and is not tied to any vendor.
- Avatar (top right) →
Model providers - Under Available models, find your provider (e.g.
DeepSeek) and clickAddon its card. - Fill in:
- Instance name — any label, e.g.
my-deepseek - API-Key — the key from the provider's console
- Base-Url — usually prefilled; only change it for a gateway or self-hosted endpoint
- Instance name — any label, e.g.
- Click
Verifyto test connectivity, thenOk. - Back at the top of the page, Set default models: pick your new model as
LLMandEmbedding(VLM,ASR,Rerank,TTSare optional).
Custom models (gateways, self-hosted servers, a provider RayRAG has never heard of) ask you for facts you may not have at hand: does it support tool calls, how large is its context window, what does it cost per million tokens. RayRAG can look those up for you.
- In the model dialog, open
List models→Add custom model. - Type the model name (for example
deepseek-chat) and pressLook up model info. - RayRAG consults the public model catalogue at models.agent-one.dev and shows what it found: the provider, the context window, capability tags (tool calls / reasoning / vision / structured output), and the published price per million tokens in and out.
- The dialog fills in the fields you had left empty — model types, max tokens, tool-call
support. Anything you typed yourself is kept until you press
Use these values.
The same lookup is available when you add a whole provider: fill in the API Base in
+ Add Provider and press Look up provider — RayRAG recognises the endpoint,
fills in the provider id and name, and offers that provider's model names for the model box.
The answer is cached for a day, so lookups are instant and keep working even when the
catalogue is unreachable (you then simply see the last copy it had).
| Provider | Pick in RayRAG | Base-Url (usually prefilled) | Notes |
|---|---|---|---|
| DeepSeek | DeepSeek |
https://api.deepseek.com/v1 |
cheapest solid chat model |
| Alibaba Qwen | Tongyi-Qianwen |
DashScope compatible endpoint | chat + embedding |
| SiliconFlow | SILICONFLOW |
https://api.siliconflow.cn/v1 |
chat + embedding + rerank in one |
| Zhipu AI | ZHIPU-AI |
https://open.bigmodel.cn/api/paas/v4 |
free tier available |
| Moonshot (Kimi) | Moonshot |
https://api.moonshot.cn/v1 |
long context |
| VolcEngine (Doubao) | VolcEngine |
endpoint from the console | create an inference endpoint first |
| Baidu Qianfan | BaiduYiyan |
endpoint from the console | — |
| iFlytek Spark | XunFei Spark |
— | — |
| Tencent Hunyuan | Tencent Hunyuan |
— | — |
| Any OpenAI-compatible service | OpenAI-API-Compatible |
your endpoint | gateways, proxies, self-hosted |
| Runtime | Pick in RayRAG | Default endpoint |
|---|---|---|
| Ollama | Ollama |
http://127.0.0.1:11434 |
| vLLM | VLLM |
http://127.0.0.1:8000/v1 |
| LM Studio | LM-Studio |
http://127.0.0.1:1234/v1 |
| llama.cpp (llama-server) | OpenAI-API-Compatible |
http://127.0.0.1:8080/v1 |
| Xinference | Xinference |
http://127.0.0.1:9997 |
| GPUStack | GPUStack |
see your GPUStack dashboard |
From inside Docker, a model server on the host is not
127.0.0.1. Usehttp://host.docker.internal:11434(on Linux use the host's LAN IP, e.g.http://192.168.1.10:11434).
Edit .env, then docker compose up -d:
LLM_API_BASE=http://192.168.1.10:8088/v1 # chat model
LLM_API_KEY=sk-xxxx
LLM_MODEL=Qwen3.5-9B-Q4_K_M.gguf
EMBED_API_BASE=http://192.168.1.10:8888/v1 # embedding model
EMBED_API_KEY=
EMBED_MODEL=Qwen3-Embedding-4B-Q4_K_M.gguf
RERANK_API_BASE=http://192.168.1.10:8899/v1 # reranker (optional)
RERANK_MODEL=bge-reranker-v2-m3Important: if the model server is not on the same machine as RayRAG,
127.0.0.1will never work — use the real IP. TheSystempage shows whether each link is healthy.
Q1 — install.sh says docker: command not found, or docker compose is unknown.
Install Docker (step 1). On Linux also make sure your user is in the docker group:
sudo usermod -aG docker $USER, then log out and back in.
Q2 — port 9380 is already in use.
Pick another port: ./install.sh --port 8080. Already deployed? Change RAYRAG_PORT in .env
and run docker compose up -d.
Q3 — are there password rules?
The first login starts as admin/admin; the first-run guide asks you to change it, and anything
you set (or later change in the UI) must be at least 12 characters. If you pre-set
RAYRAG_ADMIN_PASSWORD in .env, a shorter value stops install.sh before it starts anything.
Q4 — I forgot the login password.
Change RAYRAG_ADMIN_PASSWORD in .env (set one if it was unset), then:
docker compose down && docker volume rm rayrag-state && ./install.shThis wipes existing data. To only change the password, log in and use avatar →
Profile→Password.
Q4b — how do I change the database credentials?
Fresh deployment: edit RAYRAG_POSTGRES_USER / RAYRAG_POSTGRES_PASSWORD in .env before the
first docker compose up — the database is created, and RayRAG connects, with exactly those
values. Already running: rotate the same password inside the database
(docker compose exec postgres psql -U admin -c "ALTER USER admin WITH PASSWORD 'your-new-password'"),
edit .env to match, then docker compose up -d rayrag so it reconnects (or recreate the
rayrag-postgres-data volume to start clean).
Q5 — builds or image pulls are slow. CN mirrors are already the default (DaoCloud images, Tsinghua apt, a CN crates mirror). If it is still slow, force the CN profile:
RAYRAG_MIRROR_PROFILE=cn docker compose build rayragQ6 — chat says it found nothing.
Check in order: ① are the documents DONE (see the Files tab); ② is an embedding model
selected under Set default models; ③ does the System page report the embedding link healthy?
Q7 — where is my data?
Entirely in Docker volumes: rayrag-state (files and business data), rayrag-zvec-data
(vector index), rayrag-postgres-data (database). Nothing is sent to a third party.
Q8 — can it handle images and scanned PDFs?
Yes, with an OCR / vision model configured (OCR tab, or a VLM default model). Mainland-China
options include PaddleOCR, MinerU and SoMark, or a local vision model.
Q9 — why is my reranker unavailable?
If the GPU is fully occupied by the chat model, the reranker cannot load. Move it to another
machine/port, or simply leave Rerank unset under Set default models — retrieval still works,
just without reranking.
Q10 — how do I know the service is really healthy?
docker compose ps # both services should say healthy
curl http://127.0.0.1:9380/api/v1/system/healthz
# {"code":0,"data":{"status":"healthy","postgres":"healthy","zvec":"healthy"}}Q11 — no Docker at all? See the next section.
Q12 — Windows / macOS? Docker mode runs on both (arm64 / Apple Silicon included). The bare-metal binary is Linux-only.
If "Build navigation tree" or the artifact Generate button reports
extracts: 0 / failed: n instead of pages, the usual cause is the chat model endpoint, not the
dataset. Check it in this order:
- Is the endpoint actually running? From the host:
curl -s -o /dev/null -w '%{http_code}\n' "$LLM_API_BASE/v1/models"—000means nothing is listening. RayRAG logs the reason (wiki_gen_json: the chat call failed error=error sending request for url (…)) and reports the run as failed rather than pretending the dataset was empty. - Is it reachable from inside the container? A service on the machine running RayRAG is not
127.0.0.1from inside the container; use the docker gateway address (docker compose exec rayrag ip routeshows it). The embedding endpoint answering200proves the path works — if it does and the chat endpoint does not, the chat service is simply down. - Do not point
LLM_API_BASEat the embedding port. An embedding server will happily answer/v1/chat/completionswith HTTP 200 and return nonsense (systemsystemsystem…), so the failure looks like "the model produced no entities" instead of "wrong model".EMBED_API_BASEis for embeddings,LLM_API_BASEfor chat.
Then re-run the compile; extracts > 0 proves the model is really being used.
# upgrade
git pull
./install.sh # rebuild and start
# logs (first thing to check)
docker compose logs -f rayrag
# stop / start
docker compose stop
docker compose start
# backup the data volume into the current directory
docker run --rm -v rayrag-state:/data -v "$PWD":/backup alpine \
tar czf /backup/rayrag-backup-$(date +%F).tar.gz -C /data .
# uninstall (keep data)
docker compose down
# uninstall and delete everything (irreversible!)
docker compose down -vYou need three things: Rust 1.97+, a PostgreSQL 18.4 and the zvec shared library.
# 1) Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"
# 2) build (PostgreSQL metadata + the native zvec vector backend — both default)
# ZVEC_LIB_DIR points at the folder holding libzvec_c_api.so and TARGET
export ZVEC_LIB_DIR="$HOME/.local/lib/zvec/0.7.2" # any version present under ~/.local/lib/zvec
cargo build --release --locked
# 3) configure
export RAYRAG_POSTGRES_URL=postgresql://admin:admin@127.0.0.1:5432/rayrag # same pair as the first login
export RAYRAG_ADMIN_EMAIL=admin # username of the first account (default: admin)
# unset keeps the admin first login; when set, at least 12 characters
export RAYRAG_ADMIN_PASSWORD='at-least-12-characters'
# 4) run — flag first, then RAYRAG_PORT from .env, then 9380
./target/release/rayrag serve --port 9380serve also reads RAYRAG_PORT and RAYRAG_STATIC_DIR from the environment, including the .env
file at the project root. On a machine where RAGFlow already occupies 9380, put RAYRAG_PORT=9398
in .env and run ./target/release/rayrag serve with no arguments. Precedence is
--port > .env RAYRAG_PORT > 9380.
Running it also needs libzvec_c_api.so to be findable. Building with ZVEC_LIB_DIR bakes that
directory into the binary's runpath (readelf -d target/release/rayrag | grep RUNPATH shows it), so
no LD_LIBRARY_PATH is needed afterwards; if you build without it, or move the library, you will see
error while loading shared libraries: libzvec_c_api.so — re-export ZVEC_LIB_DIR (this machine has
0.7.2 under $HOME/.local/lib/zvec/) and rebuild, or run with
LD_LIBRARY_PATH=/path/to/zvec/lib.
postgres-backend and zvec-backend are the crate's default features, so the command above already
builds the shipped configuration and the binaries use zvec unless asked otherwise: point it at a
data directory with RAYRAG_ZVEC_DIR=/var/lib/rayrag/zvec (default ./zvec-data). The resolved
ZVEC_LIB_DIR is baked into the binary's runpath, so no LD_LIBRARY_PATH is needed to run it. For an
environment without the native library, cargo build --release --locked --no-default-features --features postgres-backend keeps the portable JSON index (RAYRAG_VECTOR_BACKEND=json).
Full environment reference, systemd units and private-deployment notes:
docs/advanced.md.
| Page | What you can do |
|---|---|
Knowledge Base |
create KBs, upload/parse documents, inspect and edit chunks, knowledge graph, retrieval test, logs |
Chat |
create assistants, streaming answers, citations, conversation management |
Search |
multi-KB retrieval, reranking, related-question suggestions |
Agent |
visual canvas: retrieval, web search, code execution, branches, loops — each agent keeps a run log you can search, sort and export as CSV |
Files |
one place for every uploaded file |
Skills |
skill index configuration and search |
Memories |
long-term memory (write and recall) |
Model providers |
65 vendors and local runtimes, default-model settings |
Data sources |
sync from 35 sources (S3, Notion, Yuque, Feishu, GitLab, …) |
System / Admin |
health, users and teams, permissions, monitoring |
API |
OpenAI-compatible /api/v1/chat/completions, /embeddings, /rerank — drop-in for LangChain, OpenWebUI, Dify |
Stack: Rust (Axum + Tokio) · zvec vector store · PostgreSQL 18.4 · single binary.
Relationship to RAGFlow: page hierarchy, buttons and interactions track RAGFlow v0.26.4; the parsing pipeline is rewritten in Rust; MySQL / Elasticsearch / Redis / MinIO are replaced by PostgreSQL + zvec, which makes deployment much lighter.
| Document | Content |
|---|---|
README.zh-CN.md |
this README in Chinese |
docs/advanced.md |
architecture, full environment reference, password/TLS, Agent canvas executor, parser integrations |
docs/providers-cn.md |
connectors and search sources for mainland-China networks |
CHANGELOG.md |
what changed in every release |
NOTICE |
upstream attribution and third-party assets |
Apache License 2.0 — see LICENSE.