Skip to content
Back to search

Knowledge-Base-Self-Hosting-Kit

A Docker-powered RAG system that understands the difference between code and prose. Ingest your codebase and documentation, then query them with full privacy and zero configuration.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/2dogsandanerd--knowledge-base-self-hosting-kit/badge.svg)](/listings/2dogsandanerd--knowledge-base-self-hosting-kit)

HTML

<a href="/listings/2dogsandanerd--knowledge-base-self-hosting-kit"><img src="/api/listings/2dogsandanerd--knowledge-base-self-hosting-kit/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

1. `git clone https://github.com/2dogsandanerd/Knowledge-Base-Self-Hosting-Kit.git` 2. `cd Knowledge-Base-Self-Hosting-Kit` 3. `cp .env.example .env` and adjust `DOCS_DIR`, LLM provider settings, etc. 4. `docker compose up -d` 5. `curl http://localhost:8080/health` to check the backend. 6. Open `http://localhost:8080` in your browser.

**Services (all exposed via the root nginx gateway):** - Web UI + Agent Configuration tab: `http://localhost:8080/` - OpenAPI docs: `http://localhost:8080/docs` - Health check: `http://localhost:8080/health` - API root: `http://localhost:8080/api/v1/rag`

---

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 150 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. ⚠️ IMPORTANT NOTICE REGARDING PLAGIARISM & AUTHORSHIP ⚠️
  2. It has come to my attention that the GitHub user @tfantas (Thiago Antas) and his automated account @jarvis-aix are falsely claiming credit for my architecture.
  3. They have explicitly listed my original repositories (including RAG_enterprise_core, smart-ingest-kit, DAUT, etc.) as their own '🔬 Featured Work' on their public
  4. profile without authorization or proper attribution. Below is the documented proof.
  5. ![Screenshot Plagiat](assets/plagiat_26-03-14_20-56-16.png)
  6. https://github.com/tfantas seems to have 20+ years of expirience but no own ideas .... Im gonna make him famous......
  7. If you enjoyed my repos and found them useful, Im sorry but im out of this game !!! No more opensource Sorry
  8. Im sure you will find my further developed Repos at https://github.com/jarvis-aix .... What a disgrace and disrespect !
  9. This repository, the Multi-Lane Consensus Architecture, and the V4.0 Manifest are 100% my original work, built over two years.
  10. Please be highly cautious of actors in the AI space attempting to rebrand, clone, or take credit for this Enterprise RAG system
  11. ⚠️ ⚠️ ⚠️
  12. # Knowledge Base Self-Hosting Kit
  13. [![Version](https://img.shields.io/badge/version-1.2.0-blue)](https://github.com/2dogsandanerd/Knowledge-Base-Self-Hosting-Kit/releases) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Docker Ready](https://img.shields.io/badge/docker-ready-blue)](https://www.docker.com/)
  14. **A production-ready, self-hosted RAG memory layer that pairs with local LLMs, chains, and autonomous agents.**
  15. - **ChromaDB + Docling** powers ingestion of everything from PDFs to code repositories.
  16. - **FastAPI backend** exposes CRUD/ingestion/search APIs plus a log-friendly health endpoint.
  17. - **Modern UI** includes dashboards, ingestion tooling, and now a dedicated **Agent Configuration** tab for MCP clients.
  18. ---
  19. ## 🚀 Quick Start
  20. 1. `git clone https://github.com/2dogsandanerd/Knowledge-Base-Self-Hosting-Kit.git`
  21. 2. `cd Knowledge-Base-Self-Hosting-Kit`
  22. 3. `cp .env.example .env` and adjust `DOCS_DIR`, LLM provider settings, etc.
  23. 4. `docker compose up -d`
  24. 5. `curl http://localhost:8080/health` to check the backend.
  25. 6. Open `http://localhost:8080` in your browser.
  26. **Services (all exposed via the root nginx gateway):**
  27. - Web UI + Agent Configuration tab: `http://localhost:8080/`
  28. - OpenAPI docs: `http://localhost:8080/docs`
  29. - Health check: `http://localhost:8080/health`
  30. - API root: `http://localhost:8080/api/v1/rag`
  31. ---
  32. ## ⚙️ Features at a Glance
  33. - **Ingestion modes:** single uploads, folder scans, hybrid chunking (vector + BM25).
  34. - **Agent-ready search:** run semantic queries with `k` tuning, view citations, and see streaming logs.
  35. - **MCP integration:** connect OpenClaw or other MCP-aware agents via the included MCP server.
  36. - **Agent Configuration tab:** configure MCP connection details without touching `.env` or the CLI.
  37. - **Local LLM friendly:** default Ollama setup shares host models, but OpenAI-compatible servers are supported via `OPENAI_BASE_URL`.
  38. ---
  39. ## 🧠 Agent Configuration (New Tab)
  40. The UI now surfaces an **Agent Configuration** tab where you can:
  41. - Review the MCP-friendly CLI snippet.
  42. - Set `KNOWLEDGE_BASE_API_URL`, timeouts, and log levels for the MCP server directly.
  43. - Test connectivity before handing the config to your agent.
  44. ### Recommended OpenClaw command
  45. ```
  46. openclaw mcp add --transport stdio knowledge-kit npx -y @knowledge-kit/mcp-server
  47. ```
  48. Existing agents can point at the tab’s configuration values (copyable) or use the CLI above to bootstrap the connector.
  49. ---
  50. ## 📁 Configuration
  51. | Variable | Default | Description |
  52. |----------|---------|-------------|
  53. | `PORT` | `8080` | External port for the nginx gateway |
  54. | `DOCS_DIR` | `./data/docs` | Host path mounted at `/host_root` for folder ingestion |
  55. | `LLM_PROVIDER` | `ollama` | Model provider (ollama, openai, anthropic, gemini, openai_compatible) |
  56. | `LLM_MODEL` | `llama3:latest` | Selected model for LLM calls |
  57. | `EMBEDDING_PROVIDER` | `ollama` | Embedding provider (usually same as LLM) |
  58. | `EMBEDDING_MODEL` | `nomic-embed-text` | Embedding model name |
  59. | `CHUNK_SIZE` | `512` | Document chunk size |
  60. | `CHUNK_OVERLAP` | `128` | Chunk overlap for context continuity |
  61. | `DEBUG` | `false` | Toggle verbose logging |
  62. | `LOG_LEVEL` | `INFO` | `DEBUG`/`INFO`/`WARN`/`ERROR` |
  63. For OpenAI-compatible servers, set `LLM_PROVIDER=openai_compatible` and point `OPENAI_BASE_URL` to your local endpoint.
  64. ---
  65. ## 🔍 Ingestion & Search API
  66. - `POST /api/v1/rag/collections`: create a collection with embedding metadata.
  67. - `POST /api/v1/rag/documents/upload`: upload PDF/MD/TXT files.
  68. - `POST /api/v1/rag/ingest-folder`: kick off folder ingestion (uploads via mounted `DOCS_DIR`).
  69. - `GET /api/v1/rag/collections/:name/stats`: inspect document counts.
  70. - `POST /api/v1/rag/query`: semantic queries (vector + BM25 fusion) with citation data.
  71. - `POST /api/v1/rag/search`: immediate keyword search without LLM generation.
  72. Use the frontend or any HTTP client; JSON responses include `answer`, `sources`, and scoring metadata.
  73. ---
  74. ## 🧪 MCP Configuration API
  75. - `GET /api/v1/config`: read current `.env` values via `ConfigService`.
  76. - `POST /api/v1/config`: persist updates sent from the UI.
  77. - `POST /api/v1/config/test`: validate downstream connections (LLM, Ollama, etc.) before deploying the change.
  78. This powers the new **Agent Configuration** tab so you can tune the connector without restarting containers.
  79. ---
  80. ## 🛠️ Development
  81. - Backend: `cd backend && pip install -r requirements.txt && uvicorn src.main:app --reload`.
  82. - Frontend is static; editing `frontend/index.html` suffices.
  83. - Build stack with Docker: `docker compose build` to refresh containers.
  84. - Configuration persists in `.env`, but the UI uses `/api/v1/config` for live editing.
  85. ### MCP Server
  86. The companion connector lives in `mcp-server/` and publishes `@knowledge-kit/mcp-server`. Run it with:
  87. ```
  88. cd mcp-server
  89. npm install
  90. npm run build
  91. npm start
  92. ```
  93. ---
  94. ## 📚 Documentation & Design Notes
  95. - Architecture diagrams, MCP guides, and customization tips live under `docs/`.
  96. - `CHROMADB` and `Ollama` containers are orchestrated via `docker-compose.yml`.
  97. - Use `smithery/` configs to run the MCP server inside Smithery.
  98. ---
  99. ## ❤️ Contributing
  100. 1. Open an issue describing your feature or bug.
  101. 2. Create a branch off `main` and target your change at the repo’s layout.
  102. 3. Keep docs, tests, and UI changes in sync when you refactor functionality.
  103. 4. If you update MCP wiring, ensure the Agent Configuration tab and `mcp-server` read the same env names.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.