Independent testing Updated April 2026 387 self-hosting guides 5 VPS providers tested

guide

How to Self-Host BookStack on a VPS (Complete Guide)

Learn how to self-host BookStack on a VPS with a step-by-step 2026 guide covering install, configuration, and securing BookStack for reliable daily use.

How to Self-Host BookStack on a VPS (Complete Guide)

BookStack is a simple, self-hosted platform for organizing and storing documentation. If youโ€™re a developer or a homelabber looking to self host BookStack on a VPS, this guide will take you through the installation process step-by-step. We will explore the installation using Docker, which simplifies the deployment and management of applications.

Why Use BookStack?

BookStack enables you to create wiki-style documentation easily, with features such as:

This makes BookStack an ideal choice for anyone looking to build and maintain documentation for projects or personal use.

Choosing a VPS Provider

There are several VPS providers to choose from based on your budget and requirements. Below is a quick comparison of popular providers:

ProviderPrice (EUR/USD)Features
Contabo VPS5.99 EUR/moSSD storage, high performance
Hetzner Cloud4.15 EUR/moScalable resources, easy management
DigitalOcean6 USD/moUser-friendly interface, extensive documentation
Vultr6 USD/moGlobal data centers, additional add-on services
Linode (Akamai Cloud)5 USD/moSolid performance, good documentation

When selecting a VPS provider, consider factors such as pricing, performance, and ease of use. If youโ€™re uncertain, check out our full VPS comparison for more options.

Preparing Your VPS

  1. Deploy Your VPS: Choose a provider from the table and set up your VPS. Select your preferred Linux distribution (Ubuntu/Debian is recommended).

  2. Access Your Server: Use SSH to connect to your server. You can use a terminal application like PuTTY or your systemโ€™s terminal.

    ssh username@your_vps_ip
  3. Update Your System: Always keep your system up to date.

    sudo apt update && sudo apt upgrade -y

Installing Docker

BookStack can be easily run using Docker. Install Docker by running the following commands:

sudo apt install apt-transport-https ca-certificates curl software-properties-common -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt update
sudo apt install docker-ce -y

You can verify the installation by checking the Docker version:

docker --version

Installing Docker Compose

Docker Compose is a tool for defining and running multi-container Docker applications. Install Docker Compose with the following commands:

sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

Verify that Docker Compose is installed:

docker-compose --version

Deploying BookStack

  1. Create a Directory for BookStack:

    mkdir ~/bookstack
    cd ~/bookstack
  2. Create a docker-compose.yml File:

    Use your preferred text editor to create the file:

    nano docker-compose.yml

    Add the following configuration:

    version: '2'
    services:
      bookstack:
        image: solidnerd/bookstack
        ports:
          - "80:80"
        environment:
          - DB_HOST=db
          - DB_USER=bookstack
          - DB_PASS=bookstackpassword
          - DB_DATABASE=bookstack
        depends_on:
          - db
    
      db:
        image: mysql:5.7
        environment:
          - MYSQL_ROOT_PASSWORD=rootpassword
          - MYSQL_DATABASE=bookstack
          - MYSQL_USER=bookstack
          - MYSQL_PASSWORD=bookstackpassword
        volumes:
          - db_data:/var/lib/mysql
    
    volumes:
      db_data:

    Modify the database passwords as necessary.

  3. Start the Containers:

    Run the following command to start BookStack:

    docker-compose up -d

    This command will download the necessary images and start them in detached mode.

  4. Access BookStack:

    Open your web browser and go to http://your_vps_ip. You should see the BookStack setup page. Follow the on-screen instructions to finish the installation.

Managing BookStack

You can manage BookStack through the web interface. You can add users, create different books, chapters, and pages according to your needs.

Frequently Asked Questions

Q1: Can I run BookStack without Docker?

Yes, you can install BookStack without Docker, but it requires more manual setup, including configuring PHP, MariaDB, and a web server like Apache or Nginx. Docker simplifies the process significantly, allowing for easier deployment and updates.

Q2: How do I back up my BookStack installation?

To back up your BookStack installation, you will need to back up both the database and the application files. You can achieve this by using Docker commands to copy the database files and save the data from your BookStack directory. Automating this via scripts can further streamline the backup process.

Q3: Is BookStack secure for self-hosting?

BookStack is relatively secure, especially when self-hosted. It is crucial to use strong passwords, keep the software updated, and configure appropriate firewall rules. Additionally, using SSL (via Letโ€™s Encrypt or similar) helps ensure secure access to your BookStack instance over the web.

Conclusion

Self hosting BookStack on a VPS provides a powerful way to manage your documentation needs. With the steps outlined in this guide, you can efficiently deploy and manage your own instance of BookStack. Donโ€™t forget to explore the various features of BookStack and customize it to meet your requirements as you grow your knowledge base. For other options and comparisons of VPS providers, take a look at our full VPS comparison. Happy hosting!