Setting Up BookStack for Documentation Management

Why Choose BookStack Over Confluence?

BookStack is an open-source documentation platform designed to be simple, self-hosted, and effective as a knowledge base or wiki. It offers an organized approach to documentation, using a familiar book-based structure that makes it easy to categorize and find information.

Unlike Confluence, which requires a subscription, BookStack is free, lightweight, and easy to deploy on your own server, making it ideal for any budget-conscious teams or those looking to control their own documentation environment.

Key features include a user-friendly interface, Markdown support, advanced permissions, and integrations with popular tools through the BookStack API.

How to Install BookStack

Below are the installation instructions for BookStack on a Linux server (e.g., Ubuntu 20.04). For other operating systems, refer to the BookStack installation documentation.

Step 1: Update System Packages

sudo apt update && sudo apt upgrade -y

Step 2: Install Dependencies

BookStack requires PHP, MySQL/MariaDB, and Apache or Nginx. Use the following commands to install these:

sudo apt install apache2 mysql-server php libapache2-mod-php php-mysql php-xml php-mbstring git unzip -y

Step 3: Clone the BookStack Repository

cd /var/www
sudo git clone https://github.com/BookStackApp/BookStack.git --branch release --single-branch bookstack

Step 4: Configure BookStack

Move to the BookStack directory and copy the environment configuration file:

cd /var/www/bookstack
cp .env.example .env

Edit the .env file to set your database credentials and other settings:

sudo nano .env

Step 5: Set Up the Database

sudo mysql
CREATE DATABASE bookstack;
CREATE USER 'bookstackuser'@'localhost' IDENTIFIED BY 'yourpassword';
GRANT ALL PRIVILEGES ON bookstack.* TO 'bookstackuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Step 6: Install Composer Dependencies

Composer is used to install PHP dependencies. Run the following command:

curl -sS https://getcomposer.org/installer | php
php composer.phar install

Step 7: Set Permissions and Start Apache

sudo chown -R www-data:www-data /var/www/bookstack
sudo systemctl restart apache2

Step 8: Access BookStack

Visit your server's IP address in a browser to access BookStack. The default login credentials are:

Email: admin@admin.com

Password: password

Remember to change these credentials after logging in.

Configuring BookStack

After installation, configure BookStack settings to meet your team’s needs.

Step 1: General Settings

Go to Settings > App Settings to adjust the application name, theme, and logo.

Step 2: User Permissions

BookStack allows you to set detailed permissions. You can create roles with specific access levels and assign them to users based on their needs.

Step 3: Organizing Documentation

Organize documentation into books, chapters, and pages, or create shelves for larger projects. This hierarchy helps keep content well-organized and easily searchable.

Using BookStack

BookStack provides a flexible environment for creating and managing documentation.