Skip to content

A complete containerized bookstack, using traefik as a reverse proxy and letsencrypt to provide the certificates you need.

License

Notifications You must be signed in to change notification settings

symnixhq/traefik-bookstack

Repository files navigation


This repository contains a fully usable BookStack with Traefik as a reverse proxy. Additionally, Traefik uses Let's Encrypt as an ACME provider to automate certificate generation.


⚡️ Installation

  1. Make sure you've installed Docker including docker compose support on your target system. You can install docker compose following this instruction: https://docs.docker.com/compose/install/

  1. Clone this repository:

    sudo git clone https://github.com/symnixhq/traefik-bookstack.git

  1. Open the file called traefik-letsencrypt-bookstack-docker compose.yml

  1. Adjust the variables for your configuration. Edit the following values:

    1. Passwords (declared as "MODIFY_ME")
    2. E-Mail address (declared as "example.mail@examplemailservice.com")
    3. Domain (declared as "example.url.com")
    4. PGID and PUID of the user who owns the database data directory

    Edit and Encode the password you want to use in the .env file 5. It is declared as "${BASICAUTH_PASSWORD}" but needs to be changed in the .env file

Note: You can hash your password with the following line, assuming you installed htpasswdbefore.

echo $(htpasswd -nb user password) | sed -e s/\\$/\\$\\$/g

After you've decrypted your password you need to escape every "$" sign with another "$".

Tip: You can use:

docker compose convert

to resolve your configuration file into the terminal.


  1. Adjust the data volumes

In our example we use:

volumes:
  - /data/bookstack/database:/config

as the volume that we mount into the container. If you want to use the exact same volumes, you need to create them on your system before. You can do this like this for example:

sudo mkdir -p /data/bookstack/database

  1. Start the project

    sudo docker compose -f <name_of_the_docker_file> up -d

  1. Check the application logs and verify that everything is running appropriatly

    sudo docker compose logs -f

  1. Enjoy your new Bookstack installation!

    Note: If you have questions regarding bookstack, have a look at https://www.bookstackapp.com/docs/.


👍 Contribute

See Contributing.

⚠️ License

GPLv3

About

A complete containerized bookstack, using traefik as a reverse proxy and letsencrypt to provide the certificates you need.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published