Cette page est affichée en anglais. Une traduction française est en cours.
ConfigsApr 10, 2026·3 min de lecture

BookStack — Simple Self-Hosted Documentation & Wiki Platform

BookStack is a simple, self-hosted documentation platform organized by Shelves, Books, Chapters, and Pages. WYSIWYG/Markdown editor, LDAP, and powerful search.

Introduction

BookStack is a simple, self-hosted platform for organizing and storing information. It uses an intuitive book-like hierarchy — Shelves contain Books, Books contain Chapters, Chapters contain Pages — making it natural to organize large amounts of documentation.

With 18.6K+ GitHub stars and MIT license, BookStack is popular among teams, organizations, and individuals who need a straightforward, no-nonsense documentation platform without the complexity of enterprise wikis.

What BookStack Does

  • Book-Like Organization: Shelves → Books → Chapters → Pages hierarchy
  • WYSIWYG Editor: Rich text editor with drag-and-drop images and formatting
  • Markdown Editor: Full Markdown support as an alternative editor
  • Full-Text Search: Search across all content with highlighted results
  • Diagrams: Built-in drawing tool (diagrams.net) for creating diagrams inline
  • LDAP/SAML/OIDC: Enterprise authentication support
  • Roles & Permissions: Granular role-based access at shelf, book, chapter, and page level
  • Comments: Page-level comments for discussions
  • Revision History: Full page history with diff view and restore
  • API: Complete REST API for integration and automation
  • Multi-Language: Interface available in 30+ languages
  • Export: PDF, HTML, and Markdown export per page, chapter, or book

Content Hierarchy

📚 Shelf: Engineering Documentation
├── 📕 Book: Backend Services
│   ├── 📑 Chapter: API Design
│   │   ├── 📄 Page: REST Conventions
│   │   ├── 📄 Page: Authentication
│   │   └── 📄 Page: Error Handling
│   ├── 📑 Chapter: Database
│   │   ├── 📄 Page: Schema Design
│   │   └── 📄 Page: Migration Guide
│   └── 📄 Page: Architecture Overview (direct page)
│
├── 📗 Book: Frontend Guide
│   ├── 📑 Chapter: Components
│   └── 📑 Chapter: State Management
│
└── 📘 Book: DevOps Runbooks
    ├── 📑 Chapter: Deployment
    └── 📑 Chapter: Incident Response

Self-Hosting

Docker Compose

services:
  bookstack:
    image: lscr.io/linuxserver/bookstack:latest
    ports:
      - "6875:80"
    environment:
      APP_URL: http://localhost:6875
      DB_HOST: db
      DB_PORT: 3306
      DB_DATABASE: bookstack
      DB_USERNAME: bookstack
      DB_PASSWORD: bookstack
      PUID: 1000
      PGID: 1000
      TZ: Asia/Shanghai
    volumes:
      - bookstack-config:/config
    depends_on:
      - db

  db:
    image: mariadb:11
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: bookstack
      MYSQL_USER: bookstack
      MYSQL_PASSWORD: bookstack
    volumes:
      - db-data:/var/lib/mysql

volumes:
  bookstack-config:
  db-data:

Key Features

WYSIWYG Editor

Rich text editor with:

  • Text formatting (bold, italic, strikethrough, headings)
  • Tables with merge and resize
  • Code blocks with syntax highlighting (50+ languages)
  • Image upload with drag-and-drop
  • File attachments
  • Callout blocks (info, warning, danger)
  • Drawing tool (diagrams.net integration)
  • Include tags (embed content from other pages)

Permissions System

Roles:
├── Admin — Full access to everything
├── Editor — Create, edit, delete content
├── Viewer — Read-only access
└── Custom — Per-entity permissions

Per-entity permissions (override role defaults):
├── Shelf: Engineering Docs → Only Engineering team
├── Book: HR Policies → Only HR + Management
└── Page: Salary Bands → Only HR Admin

API

# List all books
curl http://localhost:6875/api/books 
  -H "Authorization: Token YOUR_TOKEN_ID:YOUR_TOKEN_SECRET"

# Create a page
curl -X POST http://localhost:6875/api/pages 
  -H "Authorization: Token YOUR_TOKEN_ID:YOUR_TOKEN_SECRET" 
  -H "Content-Type: application/json" 
  -d '{"book_id": 1, "name": "New Page", "html": "<p>Page content</p>"}'

# Search
curl "http://localhost:6875/api/search?query=deployment+guide" 
  -H "Authorization: Token YOUR_TOKEN_ID:YOUR_TOKEN_SECRET"

Export Options

Format Scope
PDF Page, Chapter, Book
HTML Page, Chapter, Book
Markdown Page
Plain Text Page

BookStack vs Alternatives

Feature BookStack Wiki.js Outline Confluence
Open Source Yes (MIT) Yes (AGPL) BSL No
Organization Book hierarchy Flat pages Collections Spaces
Editor WYSIWYG + MD MD + WYSIWYG + HTML Slash commands WYSIWYG
Auth LDAP/SAML/OIDC 20+ providers SSO required LDAP/SSO
Diagrams Built-in (draw.io) Mermaid + PlantUML Mermaid Draw.io
API Full REST GraphQL Full REST REST
Stack PHP/Laravel Node.js Node.js Java
Learning curve Very low Low Low Medium

FAQ

Q: Should I pick BookStack or Wiki.js? A: BookStack's book-oriented hierarchy suits structured technical documentation (product manuals, ops handbooks). Wiki.js is more flexible and works better for flat knowledge bases. BookStack's WYSIWYG editor is friendlier for non-technical users; Wiki.js's Markdown experience is better for developers.

Q: Does it support Chinese search? A: Yes. BookStack uses MySQL/MariaDB full-text search, which works with Chinese. For better Chinese word segmentation, you can configure MySQL's Chinese full-text index plugin.

Q: Can I share documents publicly? A: Yes. BookStack supports a public guest role that lets unauthenticated users view specified content. You can also share individual pages via share links.

Sources & Credits

Discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires