BookStack
Docker Compose deployment guide for BookStack on Ubuntu.
BookStack is a free and open-source wiki and documentation platform designed for organising information into books, chapters, and pages. It is particularly useful for homelab documentation, procedures, notes, and knowledge management.
Official project:
What I Use BookStack For
I use BookStack as my primary documentation platform for:
- Homelab notes
- Docker deployment documentation
- Troubleshooting procedures
- Network diagrams
- Project planning
- Personal reference material
BookStack's organisation into Books, Chapters, and Pages makes it easy to keep large collections of notes structured and searchable.
Create the project folder
mkdir -p /opt/docker/bookstack
cd /opt/docker/bookstack
Create the Docker Compose file
Create:
/opt/docker/bookstack/docker-compose.yml
Paste the following:
services:
bookstack:
image: lscr.io/linuxserver/bookstack:latest
container_name: bookstack
stop_grace_period: 90s
environment:
- PUID=1000
- PGID=1000
- APP_KEY=base64:REPLACE_WITH_YOUR_APP_KEY
- APP_URL=https://your-domain.com
- DB_HOST=bookstack_db
- DB_PORT=3306
- DB_USERNAME=bookstack
- DB_PASSWORD=REPLACE_WITH_DB_PASSWORD
- DB_DATABASE=bookstackapp
- APP_DEFAULT_DARK_MODE=true
volumes:
- /opt/docker/bookstack/bookstackdata:/config
ports:
- 6875:80
restart: unless-stopped
depends_on:
- bookstack_db
bookstack_db:
image: lscr.io/linuxserver/mariadb
container_name: bookstack_db
stop_grace_period: 90s
environment:
- PUID=1000
- PGID=1000
- MYSQL_ROOT_PASSWORD=REPLACE_WITH_ROOT_PASSWORD
- TZ=America/Santo_Domingo
- MYSQL_DATABASE=bookstackapp
- MYSQL_USER=bookstack
- MYSQL_PASSWORD=REPLACE_WITH_DB_PASSWORD
volumes:
- /opt/docker/bookstack/bookstackdbdata:/config
restart: unless-stopped
Generate an APP_KEY
BookStack requires an application key.
One easy method is:
openssl rand -base64 32
Example:
base64:qW8a6K7Rr0U7v9Yx1V4kQ0M5fP2nL8cD3aT9mX6hJ1Y=
Replace the APP_KEY value in the Docker Compose file with your generated key.
Start BookStack
From the project directory:
docker compose up -d
Verify the containers are running:
docker ps
You should see:
bookstack
bookstack_db
Initial Access
Open:
http://SERVER-IP:6875
Default login credentials:
Email: [email protected]
Password: password
Change these immediately after logging in.
Reverse Proxy Configuration
I strongly recommend placing BookStack behind a reverse proxy such as Caddy.
Example Caddy configuration:
bookstack.yourdomain.com {
reverse_proxy 192.168.1.100:6875
}
If you are new to reverse proxies, see the Topic page:
Updating BookStack
Pull the latest images:
docker compose pull
Recreate the containers:
docker compose up -d
Remove unused images:
docker image prune -f
Backups
The important folders to back up are:
/opt/docker/bookstack/bookstackdata
/opt/docker/bookstack/bookstackdbdata
These contain:
- Application configuration
- Uploaded files
- Database data
- User accounts
- Books and pages
If you already back up your Docker folders, BookStack can be included in the same backup process.
For details, see:
Folder Structure
My BookStack deployment uses:
/opt/docker/bookstack
├── docker-compose.yml
├── bookstackdata/
└── bookstackdbdata/
This keeps application data and database data separated while keeping everything self-contained inside a single project directory.
Why I Like BookStack
BookStack has become one of my most-used self-hosted applications.
Advantages include:
- Clean and simple interface
- Excellent search functionality
- Easy organisation of documentation
- Markdown support
- Image uploads
- User and permission management
- Active development
- Reliable Docker deployment
For homelab documentation, it strikes a good balance between simplicity and functionality.
Final Thoughts
BookStack is an excellent self-hosted documentation platform for homelab users.
Whether you are documenting Docker deployments, network configurations, troubleshooting notes, or project plans, BookStack provides a structured and easy-to-use knowledge base that is far more organised than keeping notes scattered across text files.
I have found it particularly useful for recording deployment procedures and maintaining reference documentation for my homelab infrastructure.