Back to articles
AI & Cloud

Self-Hosting BookStack on VPS: Standardized Internal Technical Knowledge Management Solution in Book-Chapter-Page Style

A detailed guide on self-hosting BookStack on a VPS to build a standardized, secure, and accessible internal technical knowledge management system. Ideal for small businesses and...

DPTCloud Engineering4 min read
Self-Hosting BookStack on VPS: Standardized Internal Technical Knowledge Management Solution in Book-Chapter-Page Style

Self-Hosting BookStack on VPS: Standardized Internal Technical Knowledge Management Solution

BookStack is an open-source knowledge management platform that enables organizations to create and share technical content in a structured book-chapter-page format—similar to an e-book. With its clear organization and user-friendly interface, BookStack is ideal for building standardized internal technical knowledge systems, especially for tech companies, engineering teams, and organizations needing to store and share documentation efficiently.

Self-hosting BookStack on a VPS gives you full control over your data, security, and system customization. This guide walks you through the entire deployment process—from basic setup to security configuration and performance optimization—on a VPS environment.

Requirements and Prerequisites

To deploy BookStack on a VPS, you need:

  • A VPS (High-RAM Cloud VPS) with at least 2GB RAM and 2 vCPU.
  • Operating System: Ubuntu 20.04 or 22.04 LTS.
  • PHP 8.0 or higher, MySQL 8.0, Apache or Nginx.
  • SSL/TLS for secure access (Let's Encrypt recommended).
  • SSH access to the VPS (via PuTTY or terminal).

Deploying BookStack on VPS

Run the following commands on your VPS to install BookStack:

sudo apt update
sudo apt upgrade -y
sudo apt install -y apache2 mysql-server php php-mysql php-curl php-gd php-mbstring php-xml php-zip git

Create a MySQL database for BookStack:

sudo mysql -u root -p
CREATE DATABASE bookstack_db;
CREATE USER 'bookstack_user'@'localhost' IDENTIFIED BY 'your_secure_password';
GRANT ALL PRIVILEGES ON bookstack_db.* TO 'bookstack_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Clone and configure BookStack:

cd /var/www/html
sudo git clone https://github.com/BookStackApp/BookStack.git
sudo chown -R www-data:www-data BookStack/
sudo chmod -R 755 BookStack/

Configure Apache or Nginx to point to the BookStack public directory. For Apache, create a configuration file:

sudo nano /etc/apache2/sites-available/bookstack.conf

Content:

<VirtualHost *:80>
    ServerName your-domain.com
    DocumentRoot /var/www/html/BookStack/public
    <Directory /var/www/html/BookStack/public>
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

Enable and restart Apache:

sudo a2ensite bookstack.conf
sudo systemctl restart apache2

Completion and Verification

Access your VPS IP or configured domain in a browser. BookStack will guide you through web-based installation, including:

  • Filling in database details (MySQL).
  • Creating an admin account.
  • Setting up initial configurations (site name, theme, etc.).

To enhance security, enable HTTPS using Let's Encrypt:

sudo apt install certbot
sudo certbot certonly --webroot -w /var/www/html/BookStack/public -d your-domain.com

Update the Apache configuration to use HTTPS.

Standardized Internal Technical Knowledge Management Solution

BookStack allows you to organize technical content using books, chapters, and pages. For example:

Book Chapter Page
System Technical Guide Network Setup VLAN Configuration
Maintenance Procedures Data Recovery Restore from Backup

This structure enables technical teams to access accurate, consistent information quickly. You can share content with specific groups, assign access permissions, and track revision history.

Troubleshooting and Maintenance

  • Cannot access homepage: Check if Apache is running, verify the configuration file, and ensure the public directory has proper permissions.
  • MySQL connection error: Verify the database name, username, and password in the BookStack .env file.
  • Slow performance: Optimize MySQL, enable caching, and use Redis if needed.

To update BookStack, run:

cd /var/www/html/BookStack
git pull origin main
sudo composer install
sudo php artisan migrate

References

DPTCloud Tier III Infrastructure

High-RAM Cloud VPS Plans Optimized for AI, Databases & Cache

Enterprise RAID 10 NVMe SSDs, CMC & FPT District 9 uplinks with Anycast Anti-DDoS and 99.99% SLA.

View 22 VPS Plans
ECO · vn-02Recommended

VPS-4E

297.000 ₫ / mo

10% VAT included

  • CPU: 4 vCPU
  • RAM: 8 GB
  • SSD: 50 GB NVMe
ECO · vn-02

VPS-5E

614.900 ₫ / mo

10% VAT included

  • CPU: 8 vCPU
  • RAM: 16 GB
  • SSD: 100 GB NVMe
ADVANCED · vn-03Recommended

VPS-4T

548.900 ₫ / mo

10% VAT included

  • CPU: 4 vCPU
  • RAM: 8 GB
  • SSD: 50 GB NVMe

Related Articles

View all
ZaloZalo SupportDiscord0384 753 478