{% extends "base.html" %} {% block title %}Documentation{% endblock %} {% block content %}
Version {{ app_version }} ยท Complete manual for setup, multi-wiki, authentication, and API.
pip install -r requirements.txt./start.sh (or python3 run.py --port 8080)/register to create the initial admin user.http://localhost:8080/LLMWikiNG/The original wiki/ folder is migrated to wikis/main/ automatically upon the first startup (no data loss).
Each wiki resides under wikis/<name>/ and has its own display name. Use the WebUI to create new wikis:
/LLMWikiNG/wikis/new โ Form to create a new wiki./LLMWikiNG/wiki/<Name>//LLMWikiNG/wiki/<Name>/<Page>The app's base URL path can be changed via the
LLMWIKI_BASE_PATH environment variable (default: /LLMWikiNG),
e.g. example.com/LLMWikiNG/wiki/<Name>/.
/register (auto-disables after the first user is created)./LLMWikiNG/users โ Add/delete users (Admin only)./LLMWikiNG/api-keys โ Manage API Keys (Admin only).X-API-Password header or query param) alongside it.The central settings page /LLMWikiNG/settings is divided into tabs:
config.json.opencode, hermes, agy). Stored in ai.config.json.config.json)..tar.xz backups.LLMWikiNG includes an integrated same-container Tailscale feature (under Settings โ Tailscale). This allows you to serve your instance within a private Tailnet network or expose it via Tailscale Funnel to the public internet for remote AI agents (e.g., Claude, Grok, Cursor, AGY) โ without port forwarding, NGINX, or CGNAT issues.
zerodot1sllmwiking), check "Funnel (public internet access)", and click "Setup Everything".https://<hostname>.<tailnet>.ts.net. Authentication remains enforced via API Keys / MCP Keys.tailscale cert <dns_name> with a dedicated UI button under Settings โ Tailscale.data/tailscale.json (chmod 0o600). Revealing the key requires admin password verification.cap_add: [NET_ADMIN, NET_RAW], device /dev/net/tun, and volume mounts for ts-data and ts-config.LLMWikiNG includes a full backup management system under Settings โ Backups (Admin only). Backups are created as compressed .tar.xz archives and stored in the data/ directory.
Backups can also be managed programmatically via the API (see API section below).
All actions are available under /LLMWikiNG/api/v1 via the X-API-Key header or session cookie (automatic fallback for the web browser).
Download the official AI remote control skill (SKILL.md) for your Antigravity Agent to control this wiki.
| Method | Path | Description |
|---|---|---|
GET | /api/v1/wikis | List all wikis |
GET | /api/v1/wikis/<wiki>/pages | List pages in wiki |
GET | /api/v1/wikis/<wiki>/pages/<slug> | Get single page content |
GET | /api/v1/wikis/<wiki>/tags | List tags with page counts (optional filter via ?tag=) |
POST | /api/v1/wikis/<wiki>/pages | Create new page (scope write required) |
POST | /api/v1/wikis/<wiki>/pages/<slug>/export | Export page |
POST | /api/v1/wikis/<wiki>/ingest | Upload raw source file (to raw/) |
GET | /api/v1/wikis/<wiki>/pending | List pending uploads |
POST | /api/v1/wikis/<wiki>/ingest/process | Process ingest queue |
GET | /api/v1/search?q=&wiki= | Search across wiki (Supports wiki=all for Cross-Wiki search) |
GET | /api/v1/graph?wiki= | Get graph coordinates |
GET | /api/v1/stats?wiki= | Get statistics |
GET | /api/v1/lint?wiki= | Run system linter |
GET | /api/v1/status | Get basic server status |
GET | /api/v1/system/health | Full readiness check: sync state, source freshness, quality issues, tools, cache, and aggregate usage |
GET | /api/v1/wikis/<wiki>/usage | Local aggregate page-read statistics without query or content logging |
GET | /api/v1/system/status | System metrics & traffic logs (Admin only) |
POST | /api/v1/system/sync | Sync all wiki indexes (Admin only) |
GET | /api/v1/system/audit | Retrieve audit logs โ filterable by action, user, date range (Admin only) |
GET | /audit/export?fmt=json|csv | Export audit logs in JSON or CSV format (Admin only) |
GET | /api/v1/system/backups | List server-side backup files (Admin only) |
POST | /api/v1/system/backups | Create server-side backup (Admin only) |
POST | /api/v1/system/backups/<file>/restore | Restore server-side backup (Admin only) |
DELETE | /api/v1/system/backups/<file> | Delete server-side backup (Admin only) |
GET | /api/v1/system/update/check | Check if update is available (Admin only) |
POST | /api/v1/system/update/run | Run system update (Admin only) |
GET | /api/v1/users | List users (Admin only) |
POST | /api/v1/users | Create user (Admin only) |
DELETE | /api/v1/users/<id> | Delete user (Admin only) |
GET | /api/v1/api-keys | List API keys (Admin only) |
POST | /api/v1/api-keys | Create API key (Admin only) |
DELETE | /api/v1/api-keys/<id> | Revoke API key (Admin only) |
GET | /api/v1/mcp-keys | List Per-User MCP keys (Admin only) |
POST | /api/v1/mcp-keys | Create Per-User MCP key with tool permissions (Admin only) |
PUT | /api/v1/mcp-keys/<id> | Edit Per-User MCP key name, user, allowed tools or status (Admin only) |
DELETE | /api/v1/mcp-keys/<id> | Revoke Per-User MCP key (Admin only) |
POST | /wiki/<wiki>/api/ingest | Direct multi-wiki ingest endpoint (API key authorized) |
POST | /wiki/<wiki>/api/sync | Direct index synchronisation (API key authorized) |
GET | /mcp/sse | MCP SSE channel for AI agents (MCP API key) |
POST | /mcp/messages | MCP JSON-RPC message channel (MCP API key) |
Export variables to quickly test these queries:
export API_KEY="llmw_your_key"
export SERVER_URL="http://localhost:8082/LLMWikiNG"
export WIKI="main"
curl -H "X-API-Key: $API_KEY" "$SERVER_URL/api/v1/wikis"
curl -H "X-API-Key: $API_KEY" "$SERVER_URL/api/v1/wikis/$WIKI/pages"
curl -H "X-API-Key: $API_KEY" "$SERVER_URL/api/v1/wikis/$WIKI/pages/llm-wiki"
curl -X POST -H "X-API-Key: $API_KEY" -H "Content-Type: application/json" \
-d '{"slug":"api-test","content":"---\ntype: Concept\ntitle: API Test\ntimestamp: 2026-07-14T22:00:00Z\n---\n# API Test\nCreated successfully!"}' \
"$SERVER_URL/api/v1/wikis/$WIKI/pages"
# URL Ingest
curl -X POST -H "X-API-Key: $API_KEY" -d "url=https://de.wikipedia.org/wiki/Google" -d "title=Google" "$SERVER_URL/wiki/$WIKI/api/ingest"
# File upload
curl -X POST -H "X-API-Key: $API_KEY" -F "file=@/path/to/file.txt" "$SERVER_URL/wiki/$WIKI/api/ingest"
# Raw text paste
curl -X POST -H "X-API-Key: $API_KEY" -d "text=# Raw Text\nContent..." -d "title=Text-Paste" "$SERVER_URL/wiki/$WIKI/api/ingest"
curl -H "X-API-Key: $API_KEY" "$SERVER_URL/api/v1/search?q=SearchQuery&wiki=$WIKI"
curl -H "X-API-Key: $API_KEY" "$SERVER_URL/api/v1/wikis/$WIKI/graph"
curl -X POST -H "X-API-Key: $API_KEY" -H "Content-Type: application/json" \
-d '{"username":"new_user","password":"secure_password","role":"editor"}' \
"$SERVER_URL/api/v1/users"
# List active keys
curl -H "X-API-Key: $API_KEY" "$SERVER_URL/api/v1/api-keys"
# Generate new key (optional require_password toggle)
curl -X POST -H "X-API-Key: $API_KEY" -H "Content-Type: application/json" \
-d '{"name":"New Key","require_password":false,"scopes":["read","write"]}' \
"$SERVER_URL/api/v1/api-keys"
# List MCP keys
curl -H "X-API-Key: $API_KEY" "$SERVER_URL/api/v1/mcp-keys"
# Create new MCP key with tool permissions
curl -X POST -H "X-API-Key: $API_KEY" -H "Content-Type: application/json" \
-d '{"name":"Cursor Agent","user_id":1,"allowed_tools":["okf_list_wikis","okf_read_concept","okf_search"]}' \
"$SERVER_URL/api/v1/mcp-keys"
# Check if update is available:
curl -H "X-API-Key: $API_KEY" "$SERVER_URL/api/v1/system/update/check"
# Run the update:
curl -X POST -H "X-API-Key: $API_KEY" "$SERVER_URL/api/v1/system/update/run"
LLMWikiNG provides a native Model Context Protocol (MCP) server over HTTP-SSE. This allows AI assistants (like Cursor, OpenCode, and the Antigravity agy CLI) to access, read, write, and search the wiki via the Open Knowledge Format (OKF v0.2).
Configure the MCP server using environment variables before launching LLMWikiNG:
# Enable MCP (Default: true)
ENABLE_MCP_SERVER=true
# Secure your endpoints (X-API-Key required)
LLMWIKING_MCP_KEY="your_secure_mcp_key_2026"
This exposes the MCP endpoints at:
http://localhost:8080/LLMWikiNG/mcphttp://localhost:8080/LLMWikiNG/mcp/ssehttp://localhost:8080/LLMWikiNG/mcp/messagesGo to Settings โ Features โ MCP, click "+ Add New MCP Server":
LLMWikiNG-OKFSSEhttp://localhost:8080/LLMWikiNG/mcp/sse{"X-MCP-Key": "your_secure_mcp_key_2026", "X-API-Key": "your_database_api_key"}Add the server block to your global (~/.config/opencode/opencode.json) or project-specific (opencode.json) configuration:
{
"mcp": {
"llmwiking-okf": {
"type": "remote",
"url": "http://localhost:8080/LLMWikiNG/mcp/sse",
"enabled": true,
"headers": {
"X-MCP-Key": "your_secure_mcp_key_2026",
"X-API-Key": "your_database_api_key"
}
}
}
}
agy) & Antigravity IDE
Register the SSE server in your global config file at ~/.gemini/config/mcp_config.json (or in your project workspace under .agents/mcp_config.json):
{
"mcpServers": {
"llmwiking-okf": {
"type": "http",
"url": "http://localhost:8080/LLMWikiNG/mcp",
"headers": {
"X-MCP-Key": "your_secure_mcp_key_2026",
"X-API-Key": "your_database_api_key"
}
}
}
}
Usage in agy: Simply type / in the chat input. agy will autocomplete all 38 remote slash commands (e.g. /wikis, /search, /read, /write, /status, /update). You can also ask agy in plain language to read or update wiki pages.
If you see the message "Decryption failed. The cryptographic system secret differs..." when displaying/decrypting a key, this key was created before a change of the system secret (secret_key in config.json).
config.json and remain permanently decryptable.Once connected to LLMWikiNG via MCP, typing / in supporting clients (AGY, OpenCode, Cursor, Claude Code) opens the slash command menu:
/update
Check for and run system update
/ingest [wiki]
Process pending raw sources
/backup
Create full server backup
/search <query> [wiki]
Search wiki pages
/status
Show system status overview
/lint [wiki]
Execute wiki health check
/read <slug> [wiki]
Read complete wiki page
/sync [wiki]
Synchronize Matrix index
The MCP Tool Explorer under Settings โ MCP in the WebUI provides a categorized accordion view of all 47 tools with their descriptions, parameters, and ready-to-use prompts. The Interactive Client Configurator in the same panel lets you select a user and their keys to generate a ready-made config snippet for AGY, OpenCode, or Hermes with one click.
Copy and paste this prompt directly to your AI assistant (e.g., Cursor Chat, Claude Code, OpenCode, or agy) to instruct it to configure itself:
Please configure yourself to connect to the LLMWikiNG MCP server. The server uses SSE (Server-Sent Events) at URL: http://localhost:8080/LLMWikiNG/mcp/sse. You must include the headers 'X-MCP-Key' set to '<YOUR_MCP_SERVER_KEY>' and 'X-API-Key' set to '<YOUR_AGENT_API_KEY>'. In OpenCode, add it under the 'mcp' section in your config file. In Antigravity (agy), add it under the 'mcpServers' object in your ~/.gemini/config/mcp_config.json file.
The system uses a central key to sign browser session cookies and encrypt API keys. It is read from the LLMWIKI_SECRET environment variable or dynamically generated and persisted inside config.json (under the key "secret_key") upon the first launch.
"secret_key" value inside your config.json.The appearance theme (Dark/Light) is managed in the settings panel and saved in config.json ("theme": "dark" or "light"). Dark theme is activated by default and loaded server-side. There is no manual theme toggler in the navigation sidebar.
/LLMWikiNG/settings?tab=theme โ Update theme via the settings tab.POST /LLMWikiNG/theme/set โ directly set with value=dark|light (Authentication required)."theme" value in config.json back to "dark".The Docker configuration is explicitly optimized for UGreen NAS (UGOS) to guarantee out-of-the-box compatibility. The file structure is automatically set up under volume1/docker/llmwiking/.
When importing the image into the UGreen Container Manager, the following volumes are pre-defined:
/app/data โ /volume1/docker/llmwiking/data (User & API-Key DBs)/app/wikis โ /volume1/docker/llmwiking/wikis (Wiki directories)/app/raw โ /volume1/docker/llmwiking/raw (Raw sources)/app/output_docs โ /volume1/docker/llmwiking/output_docs (Document exports)To run the Docker setup locally or on another host without file-over-directory mount conflicts (specifically with config.json), use the DOCKER_VOLUME_BASE environment variable:
.env file in the project root:
DOCKER_VOLUME_BASE=.
docker compose up --build
The styling is built via a CSS-First compiler pipeline (using @theme directives with oklch values, Dark mode media-controls, and responsive parameters):
cd frontend && npm install && npm run build
base.html links to compiled static/css/tailwind-build.css. All active JavaScript logic is written as pure ES modules under static/js/.
/ โ Dashboard/login, /logout, /users, /api-keys/wikis/new, /wiki/<Name>/, /wiki/<Name>/<Page>/graph, /graph/data?wiki=, /search, /tags, /ingest/raw, /pending, /export, /lint, /status/settings, /briefings, /config, /about, /docs