How to Install BookStack on Your Synology NAS

How to Install Bookstack on Your Synology NAS

From now on you can become the author of your own book! Bookstack is a free and open source Wiki designed for creating beautiful documentation. Featuring a simple, but powerful WYSIWYG editor, it allows for teams to create detailed and useful documentation with ease. Bookstack is a great alternative for DokuWiki for storing and organizing information and documentation. In this step by step guide I will show you how to install BookStack on your Synology NAS using Docker & Portainer.

Note: This guide works perfectly with the latest version of Bookstack v21.08.2

  • STEP 1

Please Support My Work by Making a Donation.

  • STEP 2

Install Docker via Synology “Package Center”.

Install Docker Synology DSM 7

  • STEP 3

Install Portainer using my step by step guide. If you already have Portainer installed on your Synology NAS, skip this STEP.

  • STEP 4

Go to File Station and open the docker folder. Inside the docker folder, create one new folder and name it bookstack. Follow the instructions in the image below.
Note: Be careful enter only lowercase, not uppercase letters.

Bookstack Synology NAS Set up 1

  • STEP 5

Log into Portainer using your username and password. On the Portainer left sidebar click on Stacks then + Add stack. Follow the instructions in the image below.

Bookstack Synology NAS Set up 2

  • STEP 6

In the Name field type in Bookstack. Follow the instructions in the image below.

Note: In the Portainer Stacks Web editor Copy Paste the code below.

version: "2"
services:
  bookstack:
    image: ghcr.io/linuxserver/bookstack
    container_name: bookstack
    environment:
      - PUID=1026
      - PGID=100 
      - APP_URL=http://YourNASIP:6875
      - DB_HOST=bookstack_db
      - DB_USER=bookstack
      - DB_PASS=yourdbpass
      - DB_DATABASE=bookstackapp
    volumes:
      - /volume1/docker/bookstack:/config
    ports:
      - 6875:80
    restart: always
    depends_on:
      - bookstack_db
  bookstack_db:
    image: ghcr.io/linuxserver/mariadb
    container_name: bookstack_db
    environment:
      - PUID=1026
      - PGID=100
      - TZ=Europe/Bucharest
      - MYSQL_ROOT_PASSWORD=yourdbpass
      - MYSQL_DATABASE=bookstackapp
      - MYSQL_USER=bookstack
      - MYSQL_PASSWORD=yourdbpass
    volumes:
      - /volume1/docker/bookstack:/config
    restart: always

Note: After you paste the code in the Web editor, change the value numbers for PUID and PGID with your own values. (Follow my step by step guide on how to do this.)
Note: After you paste the code in the Web editor, change the value for TZ (Select your current Time Zone from this list).
Note: After you paste the code in the Web editor, change the value for APP_URL with your NAS local ip http://yourNASIP followed by :6875
Note
: http://192.168.1.135 is my own NAS local IP you should use your NAS local IP.

Bookstack Synology NAS Set up 3

  • STEP 7

Scroll down on the page until you see a button named Deploy the stack. Click on it. Follow the instructions in the image below. The installation process can take up to a few minutes. It will depend on your Internet speed connection.

Bookstack Synology NAS Set up 4

  • STEP 8

If everything goes right, you will see this message at the top right of your screen: “Stack successfully deployed“.

Bookstack Synology NAS Set up 5

  • STEP 9

Go back to STEP 1 or you will deal with karma 🙂

  • STEP 10

The installation process can take up to a few seconds/minutes. It will depend on your Internet speed connection. Now open your browser and type in http://Synology-ip-address:6875 Type in the default Email and Password, then click LOG IN.

Warning: the default email is admin@admin.com and the default password is password

Bookstack Synology NAS Set up 6

  • STEP 11

Edit your profile and change the default email, password, avatar etc. Follow the instructions in the images below.

Bookstack Synology NAS Set up 7

After that, click SAVE.

Bookstack Synology NAS Set up 8

  • STEP 12

You can start writing your book with Dark Mode option active.

Bookstack Synology NAS Set up 9

  • STEP 13 Run Bookstack over HTTPS

Follow my step by step guide on how to activate your synology.me DDNS on DSM 7
Follow my step by step guide on how to activate your synology.me DDNS on DSM 6.2.4
Note: If you already own a synology.me DDNS, skip this STEP.

  • STEP 14

Activate Synology Wildcard.

  • STEP 15

Log into Portainer using your username and password. On the Portainer left sidebar click on Stacks then bookstack. Follow the instructions in the image below.

Bookstack Synology NAS Set up 10

  • STEP 16

After you click bookstack at STEP 15, click the Editor tab and in the APP_URL section type in bookstack.yourname.synology.me then click Update the stack. Change yourname with the Synology DDNS name you have choose at STEP 13. Follow the instructions in the image below.

Bookstack Synology NAS Set up 11

  • STEP 17

If everything goes right, you will see this message at the top right of your screen: “Stack successfully deployed“.

Bookstack Synology NAS Set up 12

  • STEP 18

Go to Control Panel / Login Portal / Advanced Tab / click Reverse Proxy. Follow the instructions in the image below.

Bookstack Synology NAS Set up 13

  • STEP 19

Now click the “Create” button. Follow the instructions in the image below.

Bookstack Synology NAS Set up 14

  • STEP 20

After you click the Create button, the window below will open. Follow the instructions in the image below.

On General area, set the Reverse Proxy Name description: type in Bookstack. After that, add the following instructions:

Source:
Protocol: HTTPS
Hostname: bookstack.yourname.synology.me
Port: 443

Destination:
Protocol: HTTP
Hostname: localhost
Port: 6875

Bookstack Synology NAS Set up 15

Enjoy your BookStack over HTTPS!

Bookstack Synology NAS Set up 16

Note: Find out how to update Bookstack container with the latest image.
Note: Can I run Docker on my Synology NAS? See the supported models.
Note: How to Free Disk Space on Your NAS if You Run Docker.

This post was updated on Sunday / September 5th, 2021 at 12:22 AM