Deploy your own RAG (Retrieval-Augmented Generation) service with admin dashboard. Hybrid search (semantic + BM25), API key management, query analytics, and knowledge learning API. Powered by PostgreSQL with pgvector and an OpenAI-compatible AI provider.
Deploy your own RAG (Retrieval-Augmented Generation) service with admin dashboard. Hybrid search (semantic + BM25), API key management, query analytics, and knowledge learning API. Powered by PostgreSQL with pgvector and an OpenAI-compatible AI provider.
A complete RAG service with admin dashboard for managing your knowledge base.
Source code: github.com/zeabur/rag-service
Go to Zeabur Dashboard and create a new project.
Add RAG Service from the Marketplace and provide a Zeabur AI Hub API Key for answer generation plus a Gemini API Key for embeddings. The template creates a private PostgreSQL 17 service with pgvector and injects its connection string into the RAG service automatically.
Schema migrations run automatically on first startup — no manual setup needed.
/api/learn| Endpoint | Method | Auth | Description |
|---|---|---|---|
/api/query | POST | API key | Search knowledge base + optional RAG answer |
/api/learn | POST | API key | Add new knowledge chunks |
/api/report | POST | API key | Report content issues |
/api/feedback | POST | API key | Submit result feedback |
/api/admin/* | GET/POST | API key (admin) | API key management, signals, reports, chunks |
/dashboard | GET | Basic Auth | Admin dashboard |
curl -X POST "https://your-domain/api/query" \
-H "Authorization: Bearer $RAG_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "how to deploy", "mode": "hybrid", "top_k": 5}'
Install the plugin to let Claude Code agents search and contribute to your knowledge base:
claude plugins marketplace add zeabur/rag-service
claude plugins install rag-service@rag-service
claude
# Inside Claude Code, run: /zeabur-rag-setup
The plugin provides 8 skills: search, learn, report for everyday use, and triage, inspect, edit, curate for admin curation. Agents automatically search the KB when answering questions and can contribute new knowledge after solving problems.
| Variable | Required | Description |
|---|---|---|
DATABASE_URL | Auto | Private PostgreSQL connection string |
ZEABUR_AI_HUB_API_KEY | Yes | Zeabur AI Hub key for LLM inference |
GEMINI_API_KEY | Yes | Gemini API key for embeddings |
EMBEDDING_MODEL | No | Embedding model (default: gemini-embedding-2) |
EMBEDDING_DIMENSIONS | No | pgvector dimension (default: 1536) |
RAG_API_KEY | Auto | API key for service access (auto-generated) |
RAG_BASIC_AUTH | Auto | Dashboard auth (auto-generated, format admin:password) |
RAG_MODEL | No | LLM model (default: gemini-2.5-flash-lite) |
CORS_ORIGIN | No | CORS origin (default: service URL) |
Embeddings use gemini-embedding-2 (1536d) through the Gemini API by default.
Schema migrations run automatically on first startup.