Self-Hosted DeepWiki-Open: Turn Any Git Repo Into an AI Wiki

New dev starts Monday. You point them at the README, three Notion pages that contradict each other, and a Slack thread from 2023. They spend the first week grep-ing the monorepo wondering where auth actually lives. DeepWiki (the commercial product) went viral for turning repos into readable wikis — but you can't paste your client's private GitLab into someone else's SaaS.

DeepWiki-Open is the MIT-licensed alternative. ~17k GitHub stars, enter a GitHub/GitLab/Bitbucket URL, and it clones the repo, analyzes structure, generates documentation with Mermaid diagrams, and builds a navigable wiki — plus RAG chat so you can ask "where is the payment webhook handled?" against the actual code.

What it actually does

DeepWiki-Open is an AI-powered wiki generator for git repositories, not a general note-taking app.

Repo → wiki pipeline. Paste a public repo URL or add a personal access token for private ones. The backend clones, indexes the codebase, creates embeddings, and uses an LLM to write structured docs — architecture overviews, module explanations, data-flow context.

Mermaid diagrams. Auto-generated charts showing how components connect. Better than staring at a folder tree when you're onboarding or writing internal docs.

Ask questions (RAG). Chat with the repository — answers grounded in retrieved code snippets, not model hallucination about a project the LLM never saw. Streaming responses, conversation history for follow-ups.

Deep research mode. Multi-round investigation for complex topics — the agent iterates (up to five rounds) with a plan, updates, and final conclusion. Useful for "how does caching work across services?" on a large codebase.

Multi-provider LLMs. Google Gemini, OpenAI, OpenRouter, or local Ollama. Custom OpenAI-compatible endpoints via OPENAI_BASE_URL — point at your own vLLM or corporate gateway. Embeddings need an OpenAI-compatible key unless you're on the Ollama-specific setup.

Cached wikis. Generated content persists under ~/.adalflow/wikicache/ — re-opening a repo doesn't burn tokens re-generating everything. Auth mode (DEEPWIKI_AUTH_MODE) lets you lock wiki generation behind a shared code so random visitors don't trigger expensive runs.

DeepWiki-Open vs Khoj vs Open WebUI

We've covered other self-hosted AI tools — different jobs:

  • Khoj — personal second brain over PDFs, notes, and mixed documents
  • Open WebUI — team chat front end for Ollama and RAG you configure yourself
  • Onyx — enterprise search and chat over connectors

DeepWiki-Open is repo-native. You don't upload files — you point at git. Built for "document this codebase" and "answer questions about this codebase," not "organize my reading list." Pair it with self-hosted Gitea when the code never touches GitHub.

Why self-host?

Private repos stay private. Your PAT clones the repo to your server. Source code, embeddings, and generated wikis live in your ~/.adalflow volume — not a third-party indexer that might train on your client's Laravel monolith.

Control LLM routing. Send generation to Ollama on the same Canadian VPS, or OpenAI with your enterprise key — your choice per deployment. Agency client code shouldn't need to transit a random hosted DeepWiki instance.

Onboarding at scale. Generate wikis for internal microservices once, cache them, hand new hires a URL. Cheaper than senior devs repeating the same architecture tour every month.

MIT license. Fork, modify, run air-gapped. The project also ships a commercial "Grok Wiki" product — the open repo is the self-hostable core.

What running it takes

Docker Compose is the straightforward path — frontend on 3000, API on 8001, 6 GB memory limit in the default compose file (indexing large repos is not lightweight):

git clone https://github.com/AsyncFuncAI/deepwiki-open.git
cd deepwiki-open
echo "GOOGLE_API_KEY=your_key" > .env
echo "OPENAI_API_KEY=your_key" >> .env
docker compose up -d

Mount ~/.adalflow persists cloned repos, embeddings, and wiki cache across container restarts. For private GitLab or Bitbucket, add a token in the UI when prompted.

Very large monorepos may timeout or choke on first generation — start with a smaller service repo to validate your LLM budget and RAM. Ollama mode needs extra setup (see Ollama-instruction.md in the repo). LiteLLM compose variant exists if you want a unified proxy layer.

Who it's for (and who should skip it)

Good fit: dev teams onboarding contributors, agencies maintaining client forks, open-source maintainers who want auto-docs beyond stale READMEs, security reviewers doing initial codebase reconnaissance on repos they're authorized to access.

Maybe skip it: you don't use git — this tool does one thing. You need wiki docs for Notion and Google Docs — use Khoj or a knowledge base. You won't pay for LLM tokens or allocate 4–6 GB RAM — hosted wiki tools or manual docs are saner.

Hosting it in Canada

DeepWiki-Open wants RAM for embeddings and disk for cloned repos. We run it on Canadian Docker hosting with persistent volumes, TLS on the web UI, and optional Ollama on the same network for local generation.

Tell us how many private repos you plan to index — we'll size the box and help you lock down auth mode before someone triggers a wiki run on a 2 GB monorepo.

Tags:
  • DeepWiki
  • AI
  • Documentation
  • Git
  • Self-Hosted

Need Help With Your Hosting?

Tell us about your application — we respond within 1 hour with honest recommendations.