← All articles
PRODUCTIVITY Self-Hosting BookStack: A Wiki That Actually Gets Used 2026-02-09 · bookstack · wiki · documentation

Self-Hosting BookStack: A Wiki That Actually Gets Used

Productivity 2026-02-09 bookstack wiki documentation knowledge-base self-hosted

Every team starts with good intentions about documentation. Then the wiki becomes a graveyard of half-finished pages, outdated procedures, and documents that nobody can find because the folder structure makes sense only to the person who created it three years ago.

BookStack is a self-hosted wiki that tackles this with an opinionated organizational structure: Shelves contain Books, Books contain Chapters, and Chapters contain Pages. This hierarchy is rigid on purpose — it forces your documentation into a navigable structure instead of a flat pile of pages.

Why BookStack?

The trade-off compared to wikis like Wiki.js or Outline: BookStack's organizational structure is more rigid. You can't create free-floating pages or build arbitrary hierarchies. For most teams, this constraint produces better documentation.

CONTENT HIERARCHY Shelves Books Chapters Pages BookStack WYSIWYG + Markdown Full-text search Permissions & auth REST API MySQL/MariaDB Content storage Team Members Read, write, manage Authentication LDAP / SAML / OIDC

Docker Deployment

# docker-compose.yml
services:
  bookstack:
    image: lscr.io/linuxserver/bookstack:latest
    ports:
      - "6875:80"
    volumes:
      - bookstack_config:/config
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Los_Angeles
      - APP_URL=https://wiki.yourdomain.com
      - DB_HOST=db
      - DB_PORT=3306
      - DB_USER=bookstack
      - DB_PASS=bookstackpass
      - DB_DATABASE=bookstack
    depends_on:
      - db
    restart: unless-stopped

  db:
    image: mariadb:11
    volumes:
      - bookstack_db:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=rootpassword
      - MYSQL_DATABASE=bookstack
      - MYSQL_USER=bookstack
      - MYSQL_PASSWORD=bookstackpass
    restart: unless-stopped

volumes:
  bookstack_config:
  bookstack_db:
docker compose up -d

BookStack is available at http://your-server:6875. Default login: [email protected] / password. Change this immediately.

Important: Set APP_URL to your actual public URL. BookStack uses this for generating links, redirects, and email content. Getting this wrong breaks navigation.

Organizing Your Documentation

BookStack's hierarchy maps well to how most teams think about documentation:

Shelves = Departments or top-level categories

Books = Major topics within a shelf

Chapters = Sections within a book

Pages = Individual documents

This structure means every page has a clear location. When someone asks "where's the deploy documentation?", the answer is obvious.

Editor Features

BookStack offers two editors:

WYSIWYG editor (default)

The rich text editor supports:

Markdown editor

Switch to Markdown in your user profile settings. The Markdown editor provides:

Permissions and Access Control

BookStack has a granular permission system:

Roles

Create roles with specific capabilities:

Per-item permissions

Override default permissions at any level:

  1. Navigate to the shelf, book, chapter, or page
  2. Click Permissions
  3. Enable Custom Permissions
  4. Set per-role access (View, Create, Update, Delete)

This lets you have public documentation (visible to all staff) alongside restricted areas (HR policies visible only to managers, for example).

SSO Authentication

OIDC (works with Keycloak, Authelia, Authentik)

In BookStack's .env or environment variables:

AUTH_METHOD=oidc
OIDC_NAME="SSO Login"
OIDC_DISPLAY_NAME_CLAIMS=name
OIDC_CLIENT_ID=bookstack
OIDC_CLIENT_SECRET=your-client-secret
OIDC_ISSUER=https://auth.yourdomain.com/realms/yourrealm
OIDC_ISSUER_DISCOVER=true

LDAP

AUTH_METHOD=ldap
LDAP_SERVER=ldap://ldap.yourdomain.com:389
LDAP_BASE_DN="dc=yourdomain,dc=com"
LDAP_DN="cn=admin,dc=yourdomain,dc=com"
LDAP_PASS=ldappassword
LDAP_USER_FILTER="(&(uid=${user}))"
LDAP_VERSION=3

API Usage

BookStack has a full REST API for automation. Generate an API token in your user profile.

# List all books
curl 'https://wiki.yourdomain.com/api/books' \
  -H 'Authorization: Token your-token-id:your-token-secret'

# Create a new page
curl 'https://wiki.yourdomain.com/api/pages' \
  -X POST \
  -H 'Authorization: Token your-token-id:your-token-secret' \
  -H 'Content-Type: application/json' \
  -d '{
    "book_id": 1,
    "name": "Automated Report",
    "markdown": "## Weekly Metrics\n\nGenerated automatically."
  }'

# Search content
curl 'https://wiki.yourdomain.com/api/search?query=deployment' \
  -H 'Authorization: Token your-token-id:your-token-secret'

The API is useful for:

BookStack vs Other Wiki Platforms

Feature BookStack Wiki.js Outline Confluence
Structure Shelves/Books/Chapters/Pages Flat with folders Documents/collections Spaces/pages
Editor WYSIWYG + Markdown Markdown + WYSIWYG + more Block-based WYSIWYG
Search Full-text Full-text Full-text Full-text
Auth integrations LDAP, SAML, OIDC Many OIDC, SAML Atlassian SSO
Diagrams Built-in drawing tool draw.io integration Basic draw.io plugin
API Yes Yes Yes Yes
Resource usage Low (~100 MB RAM) Medium (~300 MB) Medium (~300 MB) High (1+ GB)
Self-hosted cost Free Free Free (limited) $10/user/month

When to choose BookStack

When to choose alternatives

Backup Strategy

BookStack stores data in two places:

# Database backup
docker exec bookstack-db-1 mariadb-dump -u bookstack -pbookstackpass bookstack > bookstack-backup.sql

# File backup (uploads, images, config)
docker cp bookstack-bookstack-1:/config ./bookstack-config-backup

The Bottom Line

BookStack works because it's opinionated about the one thing most wikis get wrong: organization. The Shelves > Books > Chapters > Pages hierarchy isn't flexible by design. It forces documentation into a structure that other people can navigate without a map. If your team's documentation has devolved into a flat list of pages that nobody can find anything in, BookStack's rigid structure is exactly the constraint you need.