Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/AsyncFuncAI/deepwiki-open/llms.txt

Use this file to discover all available pages before exploring further.

This guide walks you through the manual setup for DeepWiki Open: a Python FastAPI backend that handles AI processing and a Next.js frontend that serves the wiki interface. By the end you will have both services running locally and be ready to generate your first repository wiki.
1

Set up API keys

DeepWiki needs at least one AI provider key to generate wikis. Create a .env file in the project root with your credentials:
.env
GOOGLE_API_KEY=your_google_api_key
OPENAI_API_KEY=your_openai_api_key
# Optional: Use Google AI embeddings (recommended if using Google models)
DEEPWIKI_EMBEDDER_TYPE=google
# Optional: Add this if you want to use OpenRouter models
OPENROUTER_API_KEY=your_openrouter_api_key
# Optional: Add this if you want to use Azure OpenAI models
AZURE_OPENAI_API_KEY=your_azure_openai_api_key
AZURE_OPENAI_ENDPOINT=your_azure_openai_endpoint
AZURE_OPENAI_VERSION=your_azure_openai_version
# Optional: Add Ollama host if not local. default: http://localhost:11434
OLLAMA_HOST=your_ollama_host
Where to get API keys:You need at minimum one of GOOGLE_API_KEY or OPENAI_API_KEY. The default embedder type is openai, so OPENAI_API_KEY is required unless you set DEEPWIKI_EMBEDDER_TYPE=google.
2

Start the backend

Install Python dependencies using Poetry, then start the API server on port 8001:
# Install Python dependencies
python -m pip install poetry==2.0.1 && poetry install -C api

# Start the API server
python -m api.main
The backend requires Python 3.11 or later. Leave this terminal running — the API server must stay active while you use the frontend.
3

Start the frontend

In a new terminal, install JavaScript dependencies and start the Next.js development server:
# Install dependencies
npm install

# Start the development server
npm run dev
The frontend runs on port 3000. Leave this terminal running alongside the backend.
4

Generate your first wiki

Open http://localhost:3000 in your browser. To generate a wiki:
  1. Enter a GitHub, GitLab, or Bitbucket repository URL — for example, https://github.com/openai/codex or https://gitlab.com/gitlab-org/gitlab.
  2. For private repositories, click + Add access tokens and enter your personal access token.
  3. Click Generate Wiki and wait for DeepWiki to analyze the repository, create embeddings, and build the wiki.
The first run for a repository may take a minute or two as DeepWiki clones the repo and generates embeddings. Subsequent visits use cached results.

Next steps

Configure AI models

Switch between Google Gemini, OpenAI, OpenRouter, Azure, and Ollama models.

Generate your first wiki

Learn how DeepWiki analyzes repositories and structures documentation.

Chat with your repo

Use the Ask feature to ask questions about any repository using RAG.

Run with Docker instead

Skip the manual setup and run the full stack with a single Docker command.

Build docs developers (and LLMs) love