KnowledgebaseSelf-Hosting › BookStack on a LYLIX VPS — self-hosted wiki for teams

BookStack on a LYLIX VPS — self-hosted wiki for teams

BookStack is a self-hosted wiki organized into Books → Chapters → Pages. PHP-based (Laravel), MariaDB for storage, sensible defaults, sane theme. The right choice when you want internal documentation tooling without Confluence's price tag or Notion's cloud dependency. Runs on a 1-2 GB VPS comfortably.

Install

Two paths: native PHP stack (cleaner, more work) or Docker (lazier, opinionated). For most operators, Docker:

# /opt/bookstack/docker-compose.yml
services:
  bookstack:
    image: lscr.io/linuxserver/bookstack:latest
    container_name: bookstack
    restart: unless-stopped
    environment:
      APP_URL: https://wiki.example.com
      DB_HOST: bookstack_db
      DB_PORT: 3306
      DB_USERNAME: bookstack
      DB_PASSWORD: STRONG_DB_PW
      DB_DATABASE: bookstackapp
    volumes:
      - /opt/bookstack/config:/config
    ports:
      - "127.0.0.1:6875:80"
    depends_on:
      - bookstack_db

  bookstack_db:
    image: lscr.io/linuxserver/mariadb:latest
    container_name: bookstack_db
    restart: unless-stopped
    environment:
      MYSQL_ROOT_PASSWORD: ROOT_DB_PW
      TZ: America/New_York
      MYSQL_DATABASE: bookstackapp
      MYSQL_USER: bookstack
      MYSQL_PASSWORD: STRONG_DB_PW
    volumes:
      - /opt/bookstack/db:/config
cd /opt/bookstack
docker compose up -d
docker compose logs -f bookstack

Reverse proxy:

# Caddyfile
wiki.example.com {
    reverse_proxy localhost:6875
}

First-run admin: admin@admin.com / password. Change immediately via Settings → Users.

SMTP for password reset / invitations

Edit the env vars to add SMTP:

MAIL_DRIVER: smtp
MAIL_HOST: smtp.example.com
MAIL_PORT: 587
MAIL_USERNAME: wiki@example.com
MAIL_PASSWORD: SMTP_PASS
MAIL_ENCRYPTION: tls
MAIL_FROM: wiki@example.com

Restart the container; test by inviting a user.

Auth integrations

Built-in: SAML 2.0, OIDC (Authentik, Keycloak, Okta), LDAP. For small teams the default email/password is fine; for organizations with SSO, BookStack plays nicely with the standard identity providers.

WYSIWYG editor vs Markdown

BookStack supports both per-user (Settings → Editor). Markdown is the right default for technical teams; WYSIWYG works better for less-technical authors. Mixed teams: let people pick.

Backups

Two volumes: /opt/bookstack/config (uploads, themes, app data) and the MariaDB volume /opt/bookstack/db. Stop the containers for a clean snapshot, or use docker compose exec bookstack_db mysqldump for online DB backup.

Diagrams.net integration

BookStack ships with native drawio integration. Hit "Insert Diagram" in the editor; embedded drawio UI lets you build flowcharts, network diagrams, architecture sketches inline. No additional services to run.

Upgrades

For Docker:

cd /opt/bookstack
docker compose pull
docker compose up -d

The container handles DB migrations automatically on first startup of a new version. Backup before major version bumps.

Also Read

« « Back

Powered by WHMCompleteSolution