BookStack
Simple, self-hosted platform for organising documentation and knowledge
Alternative to: confluence, notion, gitbook
BookStack is an opinionated documentation platform, organised around books, chapters and pages, that gives new users a pleasant, intuitive experience requiring only basic word-processing skills. It offers advanced features such as page revisions, permissions, tagging and full-text search for those who need them, without complicating the simple core experience. Built on Laravel, it suits team wikis, personal notes and product documentation alike.
BookStack Docker Compose example
Self-host BookStack on your own server, homelab, or VPS starting from this Docker Compose example.
It runs BookStack in Docker containers using the official lscr.io/linuxserver/bookstack:latest, mariadb:lts images, with persistent volumes and automatic restarts preconfigured.
Review the environment variables and adjust them to your setup, save the file as compose.yml (or docker-compose.yml), and start the stack with docker compose up -d.
services:
bookstack:
image: lscr.io/linuxserver/bookstack:latest
restart: unless-stopped
environment:
# User ID the application runs as (owns files on the config volume).
PUID: "1000"
# Group ID the application runs as.
PGID: "1000"
# Timezone for the application (IANA name, e.g. "Europe/London").
TZ: "UTC"
# Full public URL (protocol, host, and port if non-standard) where BookStack is reached. Must be correct or assets and links break.
APP_URL: "http://localhost:6875"
# Laravel session/encryption key. Must be a valid "base64:..." value. Generate a unique one per install: echo "base64:$(openssl rand -base64 32)"
APP_KEY: "base64:DJMNiSZPxtq3MijlcpJjHR2iJQ7mC0MmIF1VqmfbmqE="
DB_HOST: "mariadb"
DB_PORT: "3306"
DB_USERNAME: "bookstack"
DB_PASSWORD: "bookstackDbPassword"
DB_DATABASE: "bookstackapp"
# Set to "database" to enable async actions (email, webhooks). Leave empty for synchronous handling.
QUEUE_CONNECTION: ""
volumes:
- config:/config
depends_on:
mariadb:
condition: service_healthy
mariadb:
image: mariadb:lts
restart: unless-stopped
environment:
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
MYSQL_DATABASE: "bookstackapp"
MYSQL_USER: "bookstack"
MYSQL_PASSWORD: "bookstackDbPassword"
volumes:
- db:/var/lib/mysql
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 10s
timeout: 5s
retries: 10
volumes:
config:
db: Prefer a managed setup? WinterFlow installs, configures, and updates BookStack for you using this same Docker Compose configuration.