Wiki.js is a modern, open-source wiki built on Node.js. It offers a visual and Markdown editor, page history, fine-grained permissions, many authentication options (local, OAuth, LDAP, SAML) and — a standout feature — Git synchronisation, which keeps every page as a Markdown file in a Git repository.
It suits team documentation, internal knowledge bases, runbooks and public docs sites.
1. Requirements
- Docker and Docker Compose (install guide).
- PostgreSQL (recommended database for Wiki.js 2.x).
- 1 GB RAM minimum; 2 GB is comfortable.
- A domain such as
wiki.example.com.
This guide uses Wiki.js 2.x, the stable line. Version 3 has been in long development; check the project’s status before choosing it.
2. Compose file
mkdir -p ~/wikijs && cd ~/wikijs
compose.yaml:
services:
db:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_DB: wiki
POSTGRES_USER: wikijs
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- db-data:/var/lib/postgresql/data
wiki:
image: ghcr.io/requarks/wiki:2
restart: unless-stopped
depends_on:
- db
environment:
DB_TYPE: postgres
DB_HOST: db
DB_PORT: 5432
DB_USER: wikijs
DB_PASS: ${DB_PASSWORD}
DB_NAME: wiki
ports:
- "127.0.0.1:3000:3000"
volumes:
db-data:
echo "DB_PASSWORD=$(openssl rand -base64 24)" > .env
chmod 600 .env
docker compose up -d
docker compose logs -f wiki
3. HTTPS reverse proxy
server {
listen 80;
server_name wiki.example.com;
client_max_body_size 50M;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
sudo nginx -t && sudo systemctl reload nginx
sudo certbot --nginx -d wiki.example.com
4. Setup wizard
Open https://wiki.example.com:
- Administrator email and password.
- Site URL:
https://wiki.example.com. - Telemetry: your choice.
Then create the home page and start writing.
5. Authentication and permissions
Administration → Authentication adds login strategies: Google, Microsoft, GitHub, generic OAuth2/OIDC (e.g. Keycloak or Authentik), LDAP and more. Disable self-registration on the local strategy unless you want open sign-ups.
Administration → Groups controls what each group can read or edit, with page rules by path (e.g. /internal/* only for staff). Keep the Guests group read-only, or remove read access entirely for a private wiki.
6. Git storage: content backup and version control
Administration → Storage → Git:
- Point it at a private repository (GitHub, GitLab, or your own Gitea).
- Authenticate with an SSH deploy key (paste the private key; add the public key to the repo with write access).
- Sync direction: bi-directional (edit in the wiki or in Git) or push only (Git as backup).
Every page becomes a Markdown file with front matter. You get an off-server copy of all content and full history — and you can edit docs in your IDE.
7. Search
The built-in database search works for small wikis. For better results, switch to the PostgreSQL search engine (Administration → Search Engine), which uses Postgres full-text search, or to Elasticsearch for very large wikis.
8. Backups
Git storage covers page content, but back up the database too — it holds users, groups, settings, comments and uploaded assets metadata:
docker compose exec db pg_dump -U wikijs wiki | gzip > wiki-$(date +%F).sql.gz
Assets (uploaded images and files) can also be synced via a storage module (Git, S3, local disk). See pg_dump.
9. Updates
docker compose pull && docker compose up -d
Within 2.x, updates are straightforward. Back up before upgrading.
Wiki.js vs BookStack vs others
- Wiki.js — flexible structure, Git sync, many auth options.
- BookStack — opinionated shelves → books → chapters → pages structure; very easy for non-technical teams.
- Outline — Notion-like, collaborative real-time editing.
- MediaWiki — the Wikipedia engine, powerful for large public wikis.
A small Docker VPS runs Wiki.js with PostgreSQL easily — and gives your team documentation a home you control.