BookStack Documentation
Simple, self-hosted wiki platform for organizing and storing information.
Overview
BookStack is a modern, self-hosted wiki platform designed to organize and store information in a structured, searchable format. Developed in PHP and built with simplicity in mind, BookStack offers an intuitive hierarchical structure using Shelves, Books, Chapters, and Pages to organize documentation, knowledge bases, and collaborative content. The platform emphasizes ease of use while providing powerful features like real-time collaborative editing, comprehensive search capabilities, and flexible user permission systems.
This deployment combines BookStack with MariaDB to create a robust documentation platform where MariaDB's enhanced MySQL compatibility and performance optimizations provide reliable data storage for wiki content, user accounts, and revision histories. MariaDB's Aria storage engine offers improved crash recovery for BookStack's frequent content updates, while its enhanced JSON functions support BookStack's metadata and configuration storage requirements.
This stack is ideal for teams, organizations, and individuals who need a professional wiki solution without the complexity of enterprise platforms like Confluence. Small to medium businesses can deploy this for internal documentation, software development teams can maintain technical wikis, and educational institutions can create collaborative knowledge repositories with full control over their data and customization options.
Key Features
- WYSIWYG and markdown editor with real-time collaborative editing and revision tracking
- Hierarchical content organization with Shelves containing Books, Chapters, and Pages structure
- Advanced search functionality with full-text search across all content and attachments
- Flexible role-based permissions with granular control down to individual pages and books
- Multiple authentication methods including LDAP, SAML, and OpenID Connect integration
- File attachment system with image galleries and drawing tools for diagrams
- MariaDB's Aria storage engine providing enhanced crash recovery for wiki content
- BookStack's API integration with MariaDB's JSON functions for metadata management
Common Use Cases
- 1Internal company wikis and knowledge bases for employee onboarding and procedures
- 2Software development teams maintaining technical documentation and API references
- 3Educational institutions creating collaborative learning resources and course materials
- 4IT departments documenting infrastructure, troubleshooting guides, and system procedures
- 5Project management teams organizing project documentation and meeting notes
- 6Personal knowledge management for researchers and content creators
- 7Community organizations maintaining member resources and organizational information
Prerequisites
- Minimum 1GB RAM for MariaDB optimal performance with BookStack's content storage
- Available port 6875 for BookStack web interface access
- Docker and Docker Compose installed with support for bridge networks
- Environment variables configured for TZ, APP_URL, DB_PASSWORD, and DB_ROOT_PASSWORD
- Basic understanding of wiki concepts and content organization hierarchy
- SSL certificate and reverse proxy knowledge for production HTTPS deployment
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: lscr.io/linuxserver/bookstack:latest4 container_name: bookstack5 environment: 6 - PUID=10007 - PGID=10008 - TZ=${TZ}9 - APP_URL=${APP_URL}10 - DB_HOST=db11 - DB_PORT=330612 - DB_USER=bookstack13 - DB_PASS=${DB_PASSWORD}14 - DB_DATABASE=bookstack15 volumes: 16 - bookstack-data:/config17 ports: 18 - "6875:80"19 depends_on: 20 - db21 networks: 22 - bookstack-network23 restart: unless-stopped2425 db: 26 image: mariadb:10.1127 container_name: bookstack-db28 environment: 29 - MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}30 - MYSQL_DATABASE=bookstack31 - MYSQL_USER=bookstack32 - MYSQL_PASSWORD=${DB_PASSWORD}33 volumes: 34 - mariadb-data:/var/lib/mysql35 networks: 36 - bookstack-network37 restart: unless-stopped3839volumes: 40 bookstack-data: 41 mariadb-data: 4243networks: 44 bookstack-network: 45 driver: bridge.env Template
.env
1# BookStack2TZ=UTC3APP_URL=http://localhost:68754DB_PASSWORD=secure_bookstack_password5DB_ROOT_PASSWORD=secure_root_passwordUsage Notes
- 1Web UI at http://localhost:6875
- 2Default login: admin@admin.com / password
- 3Change default password immediately
- 4Organize with Shelves > Books > Chapters > Pages
- 5Supports LDAP, SAML, OIDC auth
Individual Services(2 services)
Copy individual services to mix and match with your existing compose files.
bookstack
bookstack:
image: lscr.io/linuxserver/bookstack:latest
container_name: bookstack
environment:
- PUID=1000
- PGID=1000
- TZ=${TZ}
- APP_URL=${APP_URL}
- DB_HOST=db
- DB_PORT=3306
- DB_USER=bookstack
- DB_PASS=${DB_PASSWORD}
- DB_DATABASE=bookstack
volumes:
- bookstack-data:/config
ports:
- "6875:80"
depends_on:
- db
networks:
- bookstack-network
restart: unless-stopped
db
db:
image: mariadb:10.11
container_name: bookstack-db
environment:
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
- MYSQL_DATABASE=bookstack
- MYSQL_USER=bookstack
- MYSQL_PASSWORD=${DB_PASSWORD}
volumes:
- mariadb-data:/var/lib/mysql
networks:
- bookstack-network
restart: unless-stopped
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 bookstack:5 image: lscr.io/linuxserver/bookstack:latest6 container_name: bookstack7 environment:8 - PUID=10009 - PGID=100010 - TZ=${TZ}11 - APP_URL=${APP_URL}12 - DB_HOST=db13 - DB_PORT=330614 - DB_USER=bookstack15 - DB_PASS=${DB_PASSWORD}16 - DB_DATABASE=bookstack17 volumes:18 - bookstack-data:/config19 ports:20 - "6875:80"21 depends_on:22 - db23 networks:24 - bookstack-network25 restart: unless-stopped2627 db:28 image: mariadb:10.1129 container_name: bookstack-db30 environment:31 - MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}32 - MYSQL_DATABASE=bookstack33 - MYSQL_USER=bookstack34 - MYSQL_PASSWORD=${DB_PASSWORD}35 volumes:36 - mariadb-data:/var/lib/mysql37 networks:38 - bookstack-network39 restart: unless-stopped4041volumes:42 bookstack-data:43 mariadb-data:4445networks:46 bookstack-network:47 driver: bridge48EOF4950# 2. Create the .env file51cat > .env << 'EOF'52# BookStack53TZ=UTC54APP_URL=http://localhost:687555DB_PASSWORD=secure_bookstack_password56DB_ROOT_PASSWORD=secure_root_password57EOF5859# 3. Start the services60docker compose up -d6162# 4. View logs63docker 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-wiki/run | bashTroubleshooting
- BookStack shows database connection error: Verify DB_PASSWORD matches MYSQL_PASSWORD and ensure MariaDB container is running
- Login page shows 'Application key not set': Check APP_URL environment variable matches your actual domain and restart BookStack container
- File uploads failing with permission errors: Ensure PUID and PGID match your host user permissions for bookstack-data volume
- MariaDB container exits with 'Can't connect to server': Check mariadb-data volume permissions and verify MYSQL_ROOT_PASSWORD is set
- BookStack performance slow with large wikis: Increase MariaDB memory allocation and enable query cache in MariaDB configuration
- Authentication integration failing: Verify APP_URL uses HTTPS for SAML/OIDC and check BookStack logs for certificate validation errors
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
#wiki#documentation#bookstack#knowledge-base
Category
Productivity & CollaborationAd Space
Shortcuts: C CopyF FavoriteD Download