BookStack Installation on Ubuntu 24.04
This page documents the complete process for installing BookStack, a self-hosted wiki and knowledge base, on a fresh Ubuntu 24.04 server. BookStack is used as my primary knowledge repository.
Reference: BookStack Official Installation Guide
Prerequisites
- Fresh Ubuntu 24.04 LTS server (minimal install, recommended as LXC or VM)
- Root or sudo access
- Static IP address
Ubuntu 24.04 Installation Script
A script is available to install BookStack on a fresh Ubuntu 24.04 instance.
Warning
This script is for a clean OS only and will install Apache, MySQL 8.0, and PHP 8.3. It may overwrite existing web setup and does not configure mail or server security. You are responsible for those steps separately.
Running the Script
# Download the installation script
wget https://codeberg.org/bookstack/devops/raw/branch/main/scripts/installation-ubuntu-24.04.sh
# Make the script executable
chmod a+x installation-ubuntu-24.04.sh
# Run the script with admin permissions
sudo ./installation-ubuntu-24.04.sh
Change BookStack Instance URL
1. Set Domain Name
Set up a DNS record (e.g., wiki.example.com) to point to your server’s public IP. You may use a service like Cloudflare Tunnel.
2. Configure the BookStack .env file
Edit the environment file to use your domain name:
Change the following line to match your domain:
Then restart Apache:
Set Up HTTPS with Let’s Encrypt (Optional but Recommended)
Install Certbot and request a certificate for your domain:
Certbot will handle obtaining and installing your SSL certificate.Mail Setup (Recommended)
1. Edit .env for Mail Settings Open your environment config:
Add or edit the following section:
MAIL_DRIVER=smtp
MAIL_HOST=smtp.example.com
MAIL_PORT=587
[email protected]
MAIL_PASSWORD=your_password
MAIL_ENCRYPTION=tls
[email protected]
MAIL_FROM_NAME="BookStack"
Note
Replace values with those from your email provider.
2. Clear Config Cache (recommended after changing .env):
First Login
Once installation and setup are complete, access BookStack in your browser at:
http(s)://your-domain-or-server-ip
Follow the on-screen prompts to finish setup.
For more details and troubleshooting, consult the BookStack installation documentation.