Installation manual
This manual explains how to install, configure and run NeuraWiki (backend + web interface), locally or with Docker.
1. Prerequisites
- Python 3.12 and
uv - Node.js 22 and
npm - PostgreSQL 16 with the
pgvectorextension (or Docker) - A Groq API key (
GROQ_API_KEY)
2. Quick start (single script)
From the project root:
./start.sh
The script starts the database via Docker (if available), launches the backend in the background, waits for the API to be ready, then starts the web interface in the foreground. Stop with Ctrl+C.
To stop everything:
./stop.sh
3. Get the code and configure
git clone <repository-url> neurawiki
cd neurawiki
cp .env.example .env
Edit .env and set at least:
GROQ_API_KEY=...
GROQ_MODEL=qwen/qwen3.8-27b
DATABASE_URL=postgresql://neurawiki:neurawiki@localhost:5432/neurawiki
4. Database
Option A — Docker (recommended):
docker compose up -d db
Option B — Local PostgreSQL: create the user and database, then enable the extension:
CREATE USER neurawiki WITH PASSWORD 'neurawiki';
CREATE DATABASE neurawiki OWNER neurawiki;
\c neurawiki
CREATE EXTENSION IF NOT EXISTS vector;
5. Backend (FastAPI API)
cd /home/dominique/neurawiki
uv sync
uv run neurawiki
The API is available at http://localhost:8000 (Swagger docs at /docs). On first start the database schema is created automatically and the default teams are inserted.
6. Web interface (Next.js)
In another terminal:
cd /home/dominique/neurawiki/frontend
npm install
npm run dev
The interface is available at http://localhost:3000. The frontend proxies /api/* to the backend, making the API same-origin so the authentication cookie is sent automatically.
7. Ingesting documents
- Place documents in
data/knowledge/<Team>/(md, txt, pdf, xlsx). Metadata can be specified in YAML frontmatter for md/txt files. - Run ingestion:
uv run neurawiki-ingest
8. First administrator account
The /auth/register endpoint is open. Create an admin account:
curl -X POST http://localhost:8000/auth/register \
-H "Content-Type: application/json" \
-d '{"username":"admin","password":"StrongPassword1","team":"Linux","role":"admin","teams":["Linux"]}'
Then sign in at http://localhost:3000 with those credentials.
9. All-in-one (Docker Compose)
For a complete start (database + API + interface + monitoring):
cd /home/dominique/neurawiki
# set GROQ_API_KEY in .env
docker compose up --build
Exposed services:
- Interface (Next.js):
http://localhost:3000 - API (FastAPI):
http://localhost:8000 - Prometheus:
http://localhost:9090 - Grafana:
http://localhost:3001(admin / admin)
10. Useful commands
| Action | Command |
|---|---|
| Start the API | uv run neurawiki |
| Start the UI (dev) | cd frontend && npm run dev |
| Build the UI (prod) | cd frontend && npm run build && npm run start |
| Ingest | uv run neurawiki-ingest |
| Python tests | uv run pytest -q |
| Frontend lint | cd frontend && npm run lint |
| End-to-end tests | cd frontend && npm run test:e2e |
11. Stopping
# Local: Ctrl+C in each terminal
# Docker:
docker compose down
To also remove persisted data:
docker compose down -v