BookStack
Simple wiki and documentation platform.
Overview
BookStack is a self-hosted documentation and wiki platform built with PHP and Laravel, designed to organize information in an intuitive hierarchical structure. Created by Dan Brown in 2016, BookStack emphasizes simplicity and user-friendliness while providing powerful documentation features like WYSIWYG editing, page templates, and comprehensive search functionality. The platform uses a logical organizational system of Shelves containing Books, which contain Chapters and Pages, making it easy for teams to structure their knowledge base naturally. This deployment pairs BookStack with MariaDB 11, which serves as the primary database backend for storing all documentation content, user accounts, and application metadata. MariaDB's enhanced MySQL compatibility ensures optimal performance for BookStack's Laravel framework while providing additional features like improved connection handling through thread pooling and better storage engine options. The combination delivers a robust documentation solution that can handle everything from personal note-taking to enterprise-wide knowledge management, with MariaDB's reliability ensuring your documentation remains highly available and performant even under heavy usage.
Key Features
- Hierarchical content organization with Shelves, Books, Chapters, and Pages structure for logical documentation flow
- Dual editing modes supporting both WYSIWYG visual editor and Markdown syntax for different user preferences
- Multi-format export capabilities including PDF generation, HTML export, and Markdown conversion for content portability
- Advanced search functionality with full-text indexing powered by MariaDB's enhanced search capabilities
- Role-based permission system with granular access controls at shelf, book, chapter, and page levels
- Drawing and diagramming tools with built-in image annotation and markup features
- Page templates and custom HTML support for standardized documentation formats
- MariaDB's Aria storage engine providing crash-safe operations and improved performance for BookStack's data
Common Use Cases
- 1Technical documentation hubs for software development teams managing API docs, deployment guides, and coding standards
- 2IT knowledge bases storing troubleshooting procedures, network diagrams, and infrastructure documentation
- 3Project wikis for tracking requirements, specifications, and collaborative planning documents
- 4Educational institutions creating course materials, student handbooks, and research documentation
- 5Small business operations manuals documenting processes, procedures, and training materials
- 6Personal knowledge management systems for researchers and professionals organizing notes and references
- 7Client documentation portals for agencies and consultants sharing guides and project information
Prerequisites
- Minimum 1GB RAM for optimal MariaDB performance with BookStack's database operations
- Docker and Docker Compose installed with support for environment variable substitution
- Port 6875 available for BookStack web interface access
- Environment variables configured for DB_USER, DB_PASSWORD, DB_NAME, and DB_ROOT_PASSWORD
- Basic understanding of user permission systems for configuring BookStack access controls
- Storage space planning for document uploads, images, and database growth over time
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 bookstack: 3 image: linuxserver/bookstack:latest4 container_name: bookstack5 restart: unless-stopped6 environment: 7 PUID: 10008 PGID: 10009 APP_URL: http://localhost:687510 DB_HOST: mariadb11 DB_USER: ${DB_USER}12 DB_PASS: ${DB_PASSWORD}13 DB_DATABASE: ${DB_NAME}14 volumes: 15 - bookstack_config:/config16 ports: 17 - "6875:80"18 depends_on: 19 - mariadb20 networks: 21 - bookstack2223 mariadb: 24 image: mariadb:1125 container_name: bookstack-mariadb26 environment: 27 MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}28 MARIADB_DATABASE: ${DB_NAME}29 MARIADB_USER: ${DB_USER}30 MARIADB_PASSWORD: ${DB_PASSWORD}31 volumes: 32 - mariadb_data:/var/lib/mysql33 networks: 34 - bookstack3536volumes: 37 bookstack_config: 38 mariadb_data: 3940networks: 41 bookstack: 42 driver: bridge.env Template
.env
1DB_ROOT_PASSWORD=rootpassword2DB_NAME=bookstack3DB_USER=bookstack4DB_PASSWORD=changemeUsage Notes
- 1Docs: https://www.bookstackapp.com/docs/
- 2Access at http://localhost:6875 - default: admin@admin.com / password
- 3Hierarchy: Shelves > Books > Chapters > Pages
- 4WYSIWYG and Markdown editors available
- 5Export to PDF, HTML, plaintext, or Markdown
- 6LDAP/SAML/OAuth authentication supported for enterprise
Individual Services(2 services)
Copy individual services to mix and match with your existing compose files.
bookstack
bookstack:
image: linuxserver/bookstack:latest
container_name: bookstack
restart: unless-stopped
environment:
PUID: 1000
PGID: 1000
APP_URL: http://localhost:6875
DB_HOST: mariadb
DB_USER: ${DB_USER}
DB_PASS: ${DB_PASSWORD}
DB_DATABASE: ${DB_NAME}
volumes:
- bookstack_config:/config
ports:
- "6875:80"
depends_on:
- mariadb
networks:
- bookstack
mariadb
mariadb:
image: mariadb:11
container_name: bookstack-mariadb
environment:
MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MARIADB_DATABASE: ${DB_NAME}
MARIADB_USER: ${DB_USER}
MARIADB_PASSWORD: ${DB_PASSWORD}
volumes:
- mariadb_data:/var/lib/mysql
networks:
- bookstack
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 bookstack:5 image: linuxserver/bookstack:latest6 container_name: bookstack7 restart: unless-stopped8 environment:9 PUID: 100010 PGID: 100011 APP_URL: http://localhost:687512 DB_HOST: mariadb13 DB_USER: ${DB_USER}14 DB_PASS: ${DB_PASSWORD}15 DB_DATABASE: ${DB_NAME}16 volumes:17 - bookstack_config:/config18 ports:19 - "6875:80"20 depends_on:21 - mariadb22 networks:23 - bookstack2425 mariadb:26 image: mariadb:1127 container_name: bookstack-mariadb28 environment:29 MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}30 MARIADB_DATABASE: ${DB_NAME}31 MARIADB_USER: ${DB_USER}32 MARIADB_PASSWORD: ${DB_PASSWORD}33 volumes:34 - mariadb_data:/var/lib/mysql35 networks:36 - bookstack3738volumes:39 bookstack_config:40 mariadb_data:4142networks:43 bookstack:44 driver: bridge45EOF4647# 2. Create the .env file48cat > .env << 'EOF'49DB_ROOT_PASSWORD=rootpassword50DB_NAME=bookstack51DB_USER=bookstack52DB_PASSWORD=changeme53EOF5455# 3. Start the services56docker compose up -d5758# 4. View logs59docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/bookstack/run | bashTroubleshooting
- BookStack shows database connection error: Verify MariaDB container is running and DB_HOST matches the MariaDB service name
- Login fails with default credentials: Check if BookStack has fully initialized by viewing logs with docker logs bookstack
- File uploads not working: Ensure bookstack_config volume has proper write permissions for PUID/PGID 1000
- MariaDB container exits with code 1: Check that all required environment variables (MARIADB_ROOT_PASSWORD, MARIADB_DATABASE) are properly set
- BookStack interface loads but images/assets missing: Verify APP_URL environment variable matches your actual access URL
- Performance issues with large wikis: Increase MariaDB memory allocation using innodb_buffer_pool_size configuration
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Components
bookstackmariadb
Tags
#bookstack#wiki#documentation#knowledge
Category
Productivity & CollaborationAd Space
Shortcuts: C CopyF FavoriteD Download