English
Get started

← All templates · Notes and wikis

Deploy BookStack in one click

A wiki organised as shelves, books, chapters and pages

A self-hosted alternative to Confluence.

What is BookStack?

BookStack is an open-source wiki for documentation and team knowledge, an alternative to Confluence. Content lives in books, split into chapters and pages, and books sit on shelves, so a manual or a runbook reads like a book rather than a pile of links. Pages are written in a WYSIWYG editor, keep a revision history you can compare and restore, and can hold diagrams drawn in diagrams.net. Search covers one book or the whole wiki, and any paragraph can be linked to directly.

People self-host BookStack to keep internal docs on a server they control. Roles set what people can see and do, and permissions can be overridden on any shelf, book, chapter or page. Sign-in can go through LDAP, SAML2 or OIDC, and multi-factor authentication can be required per role. The catch: user invites and password resets go out by email, so BookStack needs a mail server, usually over SMTP.

Hosting BookStack on Pethost

  1. You sign in to Pethost with a passkey, GitHub or Google. No machine yet? You pick a plan, and the link waits until it is ready.
  2. New project opens at BookStack. You fill in what it asks for and click Create project: Email, Admin password.
  3. In a minute or two BookStack is live at its own address with HTTPS. Its secrets are made at random, and its data is in the nightly backup.
  4. It is a project like any other: you or your agent can change it, roll it back or restore it.

Questions about BookStack

Is BookStack free and open source?

Yes. BookStack is free under the MIT license, and its source code is on Codeberg. Paid support plans are offered, but the software itself costs nothing to download and run.

How do I migrate from Confluence to BookStack?

By hand, for now: BookStack's site says there is no automated way to move content from Confluence yet. Its REST API can script parts of the move.

Does BookStack support Markdown?

Yes. BookStack has a Markdown editor with a live preview beside its WYSIWYG one, and a page written in Markdown exports as its original Markdown.

Can I export BookStack to PDF?

Yes. A book, chapter or page exports as a Contained Web File, PDF File, Plain Text File, Markdown File or Portable ZIP, and a Portable ZIP can be imported back into BookStack. Exports are not meant as backups.

What is the default BookStack login?

A manual install starts with [email protected] and the password "password". This template sets that first admin account to the email and password you enter when you deploy, so the default pair never works.

How much memory and disk does BookStack need?

BookStack is light: about 150 MB with MariaDB, and thousands of pages with their images take a few gigabytes. On Pethost the Starter plan is enough for it, with room for other apps beside it.

BookStack Docker Compose file

The template is this compose.yaml and the variables written into the project’s .env as it is created. Pethost runs the file as it is written.

Containers: bookstack (lscr.io/linuxserver/bookstack:v26.09.1-ls288), mariadb (lscr.io/linuxserver/mariadb:11.8.8-r0-ls235).

Volumes, in the nightly backup: config, db.

services:
  bookstack:
    image: lscr.io/linuxserver/bookstack:v26.09.1-ls288
    restart: unless-stopped
    environment:
      PUID: "1000"
      PGID: "1000"
      APP_URL: ${URL}
      APP_KEY: ${APP_KEY}
      DB_HOST: mariadb
      DB_PORT: "3306"
      DB_DATABASE: bookstack
      DB_USERNAME: bookstack
      DB_PASSWORD: ${DB_PASSWORD}
      ADMIN_EMAIL: ${ADMIN_EMAIL}
      ADMIN_PASSWORD: ${ADMIN_PASSWORD}
    # BookStack's migrations make [email protected] with the password "password". A script of the
    # image's custom-init step, which runs after the migrations and before the web server starts,
    # gives that account the email and password given; once it is changed, the command leaves it.
    entrypoint:
      - sh
      - -c
      - |
        mkdir -p /custom-cont-init.d
        cat > /custom-cont-init.d/10-admin <<'SH'
        #!/usr/bin/with-contenv sh
        cd /app/www && php artisan bookstack:create-admin --initial --no-interaction --name=Admin --email="$$ADMIN_EMAIL" --password="$$ADMIN_PASSWORD"
        SH
        chmod 755 /custom-cont-init.d/10-admin
        exec /init
    depends_on:
      mariadb:
        condition: service_healthy
    volumes:
      - config:/config
  mariadb:
    image: lscr.io/linuxserver/mariadb:11.8.8-r0-ls235
    restart: unless-stopped
    environment:
      PUID: "1000"
      PGID: "1000"
      MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
      MYSQL_DATABASE: bookstack
      MYSQL_USER: bookstack
      MYSQL_PASSWORD: ${DB_PASSWORD}
    healthcheck:
      test: ["CMD-SHELL", "mariadb-admin ping -h 127.0.0.1 -u bookstack -p\"$$MYSQL_PASSWORD\" --silent"]
      interval: 5s
      retries: 30
    volumes:
      - db:/config
volumes:
  config:
  db:

More in Notes and wikis