Tutorial to run Bookstack under Windows using Docker Desktop
- Go to the Docker Desktop Webpage and download
Docker Desktop for Windows
. - Go to the installation instructions of Bookstack. Under the Docker section click on the corresponding GitHub Repository of LinuxServer.io. There you find the following
docker-compose information
:
---
version: "2"
services:
bookstack:
image: lscr.io/linuxserver/bookstack
container_name: bookstack
environment:
- PUID=1000
- PGID=1000
- APP_URL=https://bookstack.example.com
- DB_HOST=bookstack_db
- DB_PORT=3306
- DB_USER=bookstack
- DB_PASS=<yourdbpass>
- DB_DATABASE=bookstackapp
volumes:
- ./bookstack_app_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:
- ./bookstack_db_data:/config
restart: unless-stopped
- Navigate to a location where you want to store
bookstack-docker
(e.g.F:\bookstack-docker
) and create adocker-compose.yml
file (i.e.F:\bookstack-docker\docker-compose.yml
) with the contents of thedocker-compose information
shown above. - In
docker-compose.yml
change the value ofAPP_URL
toAPP_URL=http://<Local IP>:6875
(For instanceAPP_URL=http://192.168.1.125:6875
where192.168.1.125
is your local ip address). You can useipconfig
to determine the local ip address (i.e. the value of theIPv4 Address
entry). It is absolutely crucial to provide thehttp://
prefix and the port6875
. Do not usehttps
. - Replace
image: lscr.io/linuxserver/mariadb
withimage: mysql
and add forbookstack_db
a new volume pointing to/var/lib/mysql
. This is required to backup the database data.
volumes:
- ./bookstack_db_data:/config
- ./bookstack_sql_db_data:/var/lib/mysql
- In
docker-compose.yml
adjust the values ofDB_PASS=<yourdbpass>
,MYSQL_ROOT_PASSWORD=<yourdbpass>
andMYSQL_PASSWORD=<yourdbpass>
- Good practice: provide a fixed version for bookstack (e.g.
image: lscr.io/linuxserver/bookstack:23.05.2
) and mysql (e.g.image: mysql:8.0.33
). Available versions are listed here and here. - Save the file.
- In the
Windows Powershell
rundocker-compose up -d
(no admin rights required).
- Open the
Docker Desktop GUI
and click on the link6875:80
of thebookstack container
. This opens the corresponding ip address in the browser (e.g. http://192.168.1.125:6875/login). - Be patient! It might take a while until the containers can be accessed! (~30 seconds after
docker-compose up -d
has finished its execution). - Login into bookstack with the default email
admin@admin.com
and the default passwordpassword
as mentioned in the bookstack installation instructions.
Add %ProgramFiles%\Docker\Docker\resources\com.docker.backend.exe
to the windows firewall. The corresponding information can be found when clicking under Control Panel\All Control Panel Items\Windows Defender Firewall
on Allow an app or feature through Windows Defender Firewall
).
Docker Desktop
:v4.20.1
bookstack
container:ef5500acb1c2c6f830da1509b7d844e555f24f548cd329ffef0cb56c89b92d43
bookstack_db
container:fd8c7020d2239059feb4f06769fac9009bc5da57f9d28409fdd60f265120044b
lscr.io/linuxserver/bookstack
image:26d9a2577846
mysql
image:91b53e2624b4
If you experience any problems you might want to have a look at this issue.