# BookStack •

[BookStack](https://www.bookstackapp.com/) is a simple platform for storing and sharing information. Search through your library and build links between your resources.

# Overview

[![Screen Shot 2025-03-09 at 20.32.07.png](https://hub.subspace.services/uploads/images/gallery/2025-03/scaled-1680-/screen-shot-2025-03-09-at-20-32-07.png)](https://hub.subspace.services/uploads/images/gallery/2025-03/screen-shot-2025-03-09-at-20-32-07.png)

[BookStack](https://www.bookstackapp.com/) is a simple platform for storing and sharing information. Search through your library and build links between your resources.

<p class="callout success">Tryout an [BookStack demo](https://demo.bookstackapp.com/).</p>

- Intuitive design that makes it easy to quickly create a knowledge sharing platform.
- Built-in diagram editor makes it simple to build in-depth documentation.
- Secure accounts with two-factor authentication or use your own like [Authelia](https://hub.subspace.services/books/authelia "Authelia").

# Media

## Screenshots

<p class="callout info">Bookstack v25.02</p>

<table border="1" id="bkmrk-" style="border-collapse: collapse; width: 100%; border-width: 1px; height: 59.6px; border-color: rgb(88, 110, 117);"><colgroup><col style="width: 33.3333%;"></col><col style="width: 33.3333%;"></col><col style="width: 33.3333%;"></col></colgroup><tbody><tr style="height: 29.8px;"><td style="border-width: 1px; height: 29.8px; border-color: rgb(88, 110, 117);">[![Screen Shot 2025-03-09 at 20.31.59.png](https://hub.subspace.services/uploads/images/gallery/2025-03/scaled-1680-/screen-shot-2025-03-09-at-20-31-59.png)](https://hub.subspace.services/uploads/images/gallery/2025-03/screen-shot-2025-03-09-at-20-31-59.png)</td><td style="border-width: 1px; height: 29.8px; border-color: rgb(88, 110, 117);">[![Screen Shot 2025-03-09 at 20.32.07.png](https://hub.subspace.services/uploads/images/gallery/2025-03/scaled-1680-/screen-shot-2025-03-09-at-20-32-07.png)](https://hub.subspace.services/uploads/images/gallery/2025-03/screen-shot-2025-03-09-at-20-32-07.png)</td><td style="border-width: 1px; height: 29.8px; border-color: rgb(88, 110, 117);">[![Screen Shot 2025-03-09 at 20.31.49.png](https://hub.subspace.services/uploads/images/gallery/2025-03/scaled-1680-/screen-shot-2025-03-09-at-20-31-49.png)](https://hub.subspace.services/uploads/images/gallery/2025-03/screen-shot-2025-03-09-at-20-31-49.png)</td></tr><tr style="height: 29.8px;"><td style="border-width: 1px; height: 29.8px; border-color: rgb(88, 110, 117);">[![Screen Shot 2025-03-09 at 20.32.15.png](https://hub.subspace.services/uploads/images/gallery/2025-03/scaled-1680-/screen-shot-2025-03-09-at-20-32-15.png)](https://hub.subspace.services/uploads/images/gallery/2025-03/screen-shot-2025-03-09-at-20-32-15.png)</td><td style="border-width: 1px; height: 29.8px; border-color: rgb(88, 110, 117);">[![Screen Shot 2025-03-09 at 20.33.31.png](https://hub.subspace.services/uploads/images/gallery/2025-03/scaled-1680-/screen-shot-2025-03-09-at-20-33-31.png)](https://hub.subspace.services/uploads/images/gallery/2025-03/screen-shot-2025-03-09-at-20-33-31.png)</td><td style="border-width: 1px; height: 29.8px; border-color: rgb(88, 110, 117);">[![Screen Shot 2025-03-09 at 20.32.29.png](https://hub.subspace.services/uploads/images/gallery/2025-03/scaled-1680-/screen-shot-2025-03-09-at-20-32-29.png)](https://hub.subspace.services/uploads/images/gallery/2025-03/screen-shot-2025-03-09-at-20-32-29.png)</td></tr><tr><td style="border-width: 1px; border-color: rgb(88, 110, 117);">[![Screen Shot 2025-03-09 at 20.33.48.png](https://hub.subspace.services/uploads/images/gallery/2025-03/scaled-1680-/screen-shot-2025-03-09-at-20-33-48.png)](https://hub.subspace.services/uploads/images/gallery/2025-03/screen-shot-2025-03-09-at-20-33-48.png)</td><td style="border-width: 1px; border-color: rgb(88, 110, 117);">  
</td><td style="border-width: 1px; border-color: rgb(88, 110, 117);">  
</td></tr></tbody></table>

# Setup & Configuration

We need to install the service through Portainer and configure any necessary settings.

# Preparation

There are some things we need to do in preparation to install this service.

## Volumes

<details id="bkmrk-media-folders-radarr"><summary>Persistent Data</summary>

This is where the service will store its own application data and ensures we can quickly update the service image.

<p class="callout warning">Ensure your user has permissions to access the folder.</p>

</details>## Environment

<details id="bkmrk-tz-this-is-the-curre"><summary>TZ</summary>

This is the current time zone formatted using the [tz database.](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)

<p class="callout info">*For example:* America/Vancouver</p>

</details><details id="bkmrk-gid-%C2%A0"><summary>PUID</summary>

This is the numeric ID of the user account on Debian. If you are unsure, open a terminal and run:

```bash
id -u
```

</details><details id="bkmrk-pgid-this-is-the-num"><summary>PGID</summary>

This is the numeric ID of the user account's group on Debian. If you are unsure, open a terminal and run:

```bash
id -g
```

</details><details id="bkmrk-media-folders-this-s"><summary>DB\_USER</summary>

This is the username to be used for logging into the database.

<p class="callout info">*For example: bookstack*\_admin</p>

</details><details id="bkmrk-app_url-this-is-the-"><summary>APP\_URL</summary>

This is the URL you will be accessing the service through. This can be the local address or the domain name.

</details><details id="bkmrk-allowed_iframe_sourc"><summary>ALLOWED\_IFRAME\_SOURCES</summary>

This configures which websites can be embedded with your BookStack.

<p class="callout info">*Recommended:* "https://\*.draw.io https://\*.youtube.com https://\*.youtube-nocookie.com https://\*.vimeo.com"</p>

</details>### Passwords

<p class="callout danger">Keep these securely stored in a password manager, such as [VaultWarden](https://hub.subspace.services/books/vaultwarden "VaultWarden").</p>

<details id="bkmrk-db_root_pass-this-is"><summary>DB\_PASS</summary>

This is the password that will be used for root access to the database.

<p class="callout warning">It is important to use secure, randomly generated password.</p>

You can use a random alphanumeric string from a password manager, or open the terminal and run the command:

```
tr -dc 'A-Za-z0-9!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' </dev/urandom | head -c 32; echo
```

This pulls a random string from the '[urandom](https://en.wikipedia.org/wiki//dev/random)' device, removes unwanted characters and trim it to an appropriate length.

</details>

# Installation

The service can be installed through the Portainer web interface.

<p class="callout info">Learn about [creating a new stack](https://hub.subspace.services/books/portainer/page/creating-a-new-stack "Creating a New Stack").</p>

## Docker Compose

Use the following code to install the service:

```yaml
---
services:
  bookstack:
    image: lscr.io/linuxserver/bookstack
    container_name: bookstack
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
      - APP_URL=${APP_URL}
      - DB_HOST=${DB_HOST}
      - DB_PORT=3306
      - DB_USER=${DB_USER}
      - DB_PASS=${DB_PASS}
      - DB_DATABASE=${DB_NAME}
      - ALLOWED_IFRAME_SOURCES=${ALLOWED_IFRAME_SOURCES}
      - ALLOWED_IFRAME_HOSTS=${ALLOWED_IFRAME_HOSTS}
    volumes:
      - /srv/bookstack/data:/config
    ports:
      - 6877:80
    restart: unless-stopped
    depends_on:
      - bookstack-db

  bookstack-db:
    image: lscr.io/linuxserver/mariadb
    container_name: bookstack-db
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
      - MYSQL_ROOT_PASSWORD=${DB_PASS}
      - MYSQL_DATABASE=${DB_NAME}
      - MYSQL_USER=${DB_USER}
      - MYSQL_PASSWORD=${DB_PASS}
    volumes:
      - /srv/bookstack/db:/config
    restart: unless-stopped
```

## Environment

Use the following environment to configure the service using the values prepared earlier:

```bash
TZ=
PUID=
PGID=
APP_URL=bookstack.example.com
DB_HOST=bookstack-db
DB_USER=bookstack_admin
DB_PASS=
DB_NAME=bookstackapp
ALLOWED_IFRAME_SOURCES="https://*.draw.io https://*.youtube.com https://*.youtube-nocookie.com https://*.vimeo.com"
```

# Updating

<p class="callout success">Re-Deploy the Stack</p>

This service has been optimized for running in Docker.

This allows you to [re-deploy the stack through Portainer](https://hub.subspace.services/books/portainer/page/updating-a-stack "Updating a Stack") to download the latest updates.

# User Manual

# Development

<p class="callout info">This software is released under the [MIT license](https://opensource.org/license/mit). </p>

You can learn more about how to contribute to BookStack through their [blog](https://www.bookstackapp.com/blog/contributing-to-open-source/).

The development team also accepts [donations](https://www.bookstackapp.com/donate/).

# Resources

## Official

- [Official Documentation](https://www.bookstackapp.com/docs)
- [Official Discord](https://discord.gg/ztkBqR2)
- [Official GitHub Repository](https://github.com/BookStackApp/BookStack)
- [Official Website](https://www.bookstackapp.com/)
- [Wikipedia Entry](https://en.m.wikipedia.org/wiki/BookStack)
- [Installation Guide](https://www.bookstackapp.com/docs/admin/installation)
- [Frequently Asked Questions](https://www.bookstackapp.com/about/project-faq/)
- [General Troubleshooting](https://www.bookstackapp.com/docs/admin/debugging/)