Run the LLM Wiki as a Docker container with a single command.
- Docker (v20+)
- Docker Compose (v2+)
- An API key for at least one LLM provider
-
Clone the repository
git clone https://github.com/yologdev/yopedia.git cd yopedia -
Create a
.envfile with your API keyecho "ANTHROPIC_API_KEY=sk-ant-..." > .env
-
Start the app
docker compose up -d
That's it. Your wiki data persists in Docker volumes across restarts.
Configure your LLM provider by setting the relevant API key in .env:
| Variable | Provider | Example |
|---|---|---|
ANTHROPIC_API_KEY |
Anthropic Claude | sk-ant-api03-... |
OPENAI_API_KEY |
OpenAI | sk-proj-... |
GOOGLE_GENERATIVE_AI_API_KEY |
Google Gemini | AIza... |
OLLAMA_BASE_URL |
Ollama (local) | http://host.docker.internal:11434 |
You only need one provider. The app auto-detects which key is set.
| Variable | Description | Default |
|---|---|---|
LLM_WIKI_PROVIDER |
Force a specific provider (anthropic, openai, google, ollama) |
Auto-detected |
LLM_WIKI_MODEL |
Override the default model name | Provider default |
EMBEDDING_MODEL |
Override the embedding model name | Provider default |
PORT |
Server port inside the container | 3000 |
The compose file defines two named volumes:
| Volume | Container Path | Purpose |
|---|---|---|
wiki-data |
/app/wiki |
Generated wiki markdown pages |
raw-data |
/app/raw |
Ingested source documents |
Your wiki data lives in these volumes and persists even if you remove the container.
To map wiki data to a directory on your host machine:
# docker-compose.yml override
services:
wiki:
volumes:
- ./my-wiki:/app/wiki
- ./my-sources:/app/rawIf you run Ollama on your host machine, the container needs to reach it:
# .env
OLLAMA_BASE_URL=http://host.docker.internal:11434On Linux, you may need to add --add-host=host.docker.internal:host-gateway or use the host network:
services:
wiki:
extra_hosts:
- "host.docker.internal:host-gateway"Pull the latest code and rebuild:
git pull
docker compose up -d --buildYour wiki data in the volumes is preserved.
If you prefer running directly on your machine:
-
Install Node.js 22+ and pnpm
corepack enable -
Install dependencies
pnpm install
-
Create
.env.localwith your API keyecho "ANTHROPIC_API_KEY=sk-ant-..." > .env.local
-
Run in development mode
pnpm dev
Or build and run in production mode:
pnpm build pnpm start
Check the logs:
docker compose logs wikiMost common cause: missing API key in .env.
Change the host port mapping:
ports:
- "8080:3000"Ensure the host directories are writable, or use named volumes (the default).