Install and Configure BookStack Using Docker and LDAP


Documenting is quite a chore and since leaving Evernote, I’ve been searching for a good tool to help me structure my stuff. I did turn to blogging just keep the information handy but I can only publish cleansed articles. Which means I have quite a few unpublished articles that either contain secrets, are poorly structured and written or just half-finished.

Many have recommended to use BookStack to act like an internal wiki. I do run Confluence, I feel it is good but just not a perfect fit for my purposes. The basics of BookStack are really appealing since I come from a similar type of structure from ScreenSteps, with books and chapters. It does feel a bit rough around the edges but the basics are there and actively developed.

Since I just can’t write Markdown in any sensible way, I will still be using ClarifyIt or ScreenSteps for the actual authoring and then export the results via Markdown files. This is the same workflow I have for the blog using the static website framework Hexo. Next step is to tinker with a BookStack compatible Markdown template for ClarifyIt.


Docker host volume folders

I’m using the Synology to act as my Docker host so I create a folder structure and map out the different folders from the container image.

I chose to externalize the database structure and the uploads folders.

Most settings are set via environment variables defined in the docker-compose.yml file.



  1. Map an existing folder from the host to house the database files
  2. Map existing folders for the upload files
  3. Ensure the URL is correct as this is used everywhere.
  4. Enable and configure LDAP. This is for Active Directory which means the identifier for the username is special.
  5. Note the double $ signs as this had me stumped for such along time. Since we run BookStack within a container and this should be evaluated as a PHP variable, two are required since one is lost in translation ;)

Reverse proxy

Since I use the Synology feature of Web App Proxy, I renew and install a fresh SNI certificate on the Synology and then map up a new reverse proxy for the given url. Since I’m using a split DNS, I need to create the DNS entry in both my internal and external DNS servers.