Bookstack

th-2324090029.jpg

BookStack is a simple, self-hosted, easy-to-use platform for organising and storing information.

I rebranded my Bookstack instance to MyWiki and originally intended to use it only for my personal reference and possibly some journalling. I still use it for referencing but I am building it out as a "knowledge-base library" so others may benefit. If you're here, you probably figured that out already 🙂

Screenshot from 2023-03-29 02-08-15.png


Installation

To install Bookstack, you will need Docker installed at a minimum and optimally Docker Compose as well. This installation guide assumes you are installing Bookstack on Ubuntu 22.04 and you have both Docker and Docker Compose installed.

If you do not have Docker and Docker Compose installed, you can follow my guides for doing so by clicking these links:

You don't have to install Bookstack using containers. It's just my preference. You can see all the installation methods by going to Bookstack's official installation web page.

I am using a pre-built container from LinuxServer.io

You gain access to the relevant container images via a Docker Compose YAML file. You will need to edit various parameters to configure Bookstack and your Bookstack database.

Container images are configured using parameters passed at runtime. These parameters are separated by a colon and indicate <external>:<internal> respectively. For example, -p 8080:80 would expose port 80 from inside the container to be accessible from the host's IP on port 8080 outside the container.

Step 1 - Create a directory to store your docker-compose.yml file.

sudo mkdir /docker/bookstack

Step 2 - Create and open your docker-compose.yml for editing

cd /docker/bookstack
touch docker-compose.yml
nano docker-compose.yml

Step 3 - Copy and paste the following Docker Compose file template into your docker-compose.yml file.

---
version: "2"
services:
  bookstack:
    image: lscr.io/linuxserver/bookstack
    container_name: bookstack
    environment:
      - PUID=1000
      - PGID=1000
      - APP_URL=
      - DB_HOST=bookstack_db
      - DB_PORT=3306
      - DB_USER=bookstack
      - DB_PASS=<yourdbpass>
      - DB_DATABASE=bookstackapp
    volumes:
      - /path/to/data:/config
    ports:
      - 6875:80
    restart: unless-stopped
    depends_on:
      - bookstack_db
  bookstack_db:
    image: lscr.io/linuxserver/mariadb
    container_name: bookstack_db
    environment:
      - PUID=1000
      - PGID=1000
      - MYSQL_ROOT_PASSWORD=<yourdbpass>
      - TZ=Europe/London
      - MYSQL_DATABASE=bookstackapp
      - MYSQL_USER=bookstack
      - MYSQL_PASSWORD=<yourdbpass>
    volumes:
      - /path/to/data:/config
    restart: unless-stopped

Step 4 - Edit the file, changing the relevant portions of the template as outlined below:

Go HERE to find your timezone

Make sure the user and group you specified in your PUID & GUID has read and write permissions to the path and directory you specify.

Once you have your docker-compose.yml configured and saved, you can start your Bookstack instance by typing:

docker compose up -d

or, if using an older version of Docker Compose:

docker-compose up -d

You must run the command from the directory where you saved your docker-compose.yml file.

Access to Bookstack

From a web browser on the computer where you installed Bookstack, enter the following URL:

http://localhost:6875

If you changed the default port from 6875 to something else, you will need to specify it in your URL

If you are on a different computer than the one where you installed bookstack. change localhost to reflect the IP address or domain name of the computer where Bookstack is installed.


Revision #32
Created 2023-03-15 04:23:06 UTC by Tim
Updated 2023-04-17 16:06:22 UTC by Tim