Deployment guide

Host BookStack on your own VPS

Deploy on a VPS Cloud →

Self-hosting6 min read

Host BookStack on your own VPS

BookStack is an open source documentation and knowledge base platform, organized into books, chapters and pages. Self-hosted on a VPS, it becomes the ideal internal wiki for a team or an agency. Here is how to deploy it with Docker, MySQL and an SSL certificate.

Why self-host BookStack on a VPS

BookStack stands out for its simplicity: where other wikis drown the user in options, it imposes a clear hierarchy of shelves, books, chapters and pages, which makes the documentation immediately navigable. Built on the Laravel framework, it is lightweight and easy to maintain. Self-hosted on a VPS, it keeps all your internal documentation — procedures, runbooks, customer knowledge base — on your own infrastructure, with no per-user subscription. For an agency documenting its projects or a technical team centralizing its procedures, it is a private wiki that you control end to end, with full-text search, fine-grained permission management and a WYSIWYG or Markdown editor.

Concrete benefits of a self-hosted BookStack

  • Clear structure of shelves/books/chapters/pages: effortlessly navigable documentation.
  • WYSIWYG and Markdown editor of your choice, with integrated Draw.io diagrams.
  • Granular permissions by role and by book to partition sensitive content.
  • Fast full-text search across the entire knowledge base.
  • LDAP, SAML or OAuth authentication to integrate with your enterprise directory.
  • Lightweight footprint: a modest VPS is enough for team documentation.

Hardware and software prerequisites

BookStack is undemanding. A VPS with 1 to 2 vCPU and 2 GB of RAM comfortably hosts a team's documentation; consumption climbs mainly with the volume of uploaded images. It relies on MySQL or MariaDB. Plan for 15 to 25 GB of SSD depending on the amount of attachments. On the software side: Docker and Docker Compose, a wiki.yourdomain.com subdomain with an A record, and an SMTP server for sending invitations and email notifications.

Deploy BookStack with Docker and SSL

01

Prepare the VPS

Install Docker and the Compose plugin, then create /opt/bookstack. The community image lscr.io/linuxserver/bookstack is the most widespread and best maintained for a containerized deployment.

02

Declare MySQL and BookStack

In the docker-compose.yml, add a mariadb service with a dedicated database and user, plus the bookstack service. Set the APP_URL variable to https://wiki.yourdomain.com — an incorrect URL breaks internal links and uploads.

03

Launch the stack

Run docker compose up -d, then watch docker compose logs -f bookstack. On first startup, BookStack automatically runs the Laravel migrations to create the database schema.

04

Configure reverse proxy and SSL

With Caddy: wiki.yourdomain.com { reverse_proxy localhost:6875 }, the certificate is handled on its own. With Nginx, proxy to 127.0.0.1:6875 and obtain the certificate via certbot --nginx.

05

First login and SMTP

Log in with the default account [email protected] then immediately change the password. Configure the SMTP variables (MAIL_HOST, MAIL_USERNAME...) to enable user invitations and password resets.

Take care with your backup strategy: a BookStack instance is restored from three elements — the MySQL/MariaDB database dump, the uploads folder (images and attachments) and the configuration file containing the APP_KEY key. Without this Laravel application key, encrypted content cannot be decrypted after restoration. Automate a daily mysqldump plus a copy of the uploads volume to external storage, and carefully keep the APP_KEY off the server.

Host your BookStack wiki on a ServOrbit Cloud VPS

With a lightweight Cloud VPS and Docker preconfigured, set up BookStack and its MariaDB database in a few commands, SSL included. Your knowledge base stays private and under your control.

Need help?

Browse our help center and FAQ, or write to our team — support in French, English and Arabic.