bookstack
Intro
As an alternative to confluence-server that is no longer available one might consider bookstack
Screenshots
Page edit example
Page View
changing table row cell color
Install
using docker compose
mkdir bookstack
mkdir -p /docker/bookstack
vi docker-compose.yml
docker compose up -d
docker compose file example
---
# This is an example complete example docker-compose.yml
# file for a linuxserver.io based BookStack setup
# using the linuxserver.io MariaDB conatiner.
# ENSURE YOU PAY ATTENTION TO ALL COMMENTS BELOW.
# Many of the values are just examples, and you WILL
# have to make changes to suit your environment.
# These containers are maintained by the linuxserver.io
# team, not the official BookStack project.
# For non-commented options, refer to the linuxserver documentation:
# https://docs.linuxserver.io/images/docker-bookstack/#environment-variables-e
services:
# The container for BookStack itself
bookstack:
# You should update the version here to match the latest
# release of BookStack: https://github.com/BookStackApp/BookStack/releases
# You'll change this when wanting to update the version of BookStack used.
image: lscr.io/linuxserver/bookstack:25.05.2
container_name: bookstack-app
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Kyiv
# APP_URL must be set as the base URL you'd expect to access BookStack
# on via the browser. The default shown here is what you might use if accessing
# direct from the browser on the docker host, hence the use of the port as configured below.
- APP_URL=https://kb.liutyi.info
# APP_KEY must be a unique key. Generate your own by running
# docker run -it --rm --entrypoint /bin/bash lscr.io/linuxserver/bookstack:latest appkey
# You should keep the "base64:" part for the option value.
- APP_KEY=base64:In890XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX=
# The below database details are purposefully aligned with those
# configuted for the "mariadb" service below:
- DB_HOST=mariadb
- DB_PORT=3306
- DB_DATABASE=bookstack
- DB_USERNAME=bookstack
- DB_PASSWORD=Xn890XXXX
volumes:
# You generally only ever need to map this one volume.
# This maps it to a "bookstack_app_data" folder in the same
# directory as this compose config file.
- /docker/bookstack/app_data:/config
ports:
# This exposes port 6875 for general web access.
# Commonly you'd have a reverse proxy in front of this,
# redirecting incoming requests to this port.
- 6875:80
- 6443:443
restart: unless-stopped
# The container for the database which BookStack will use to store
# most of its core data/content.
mariadb:
# You should update the version here to match the latest
# main version of the linuxserver mariadb container version:
# https://github.com/linuxserver/docker-mariadb/pkgs/container/mariadb/versions?filters%5Bversion_type%5D=tagged
image: lscr.io/linuxserver/mariadb:11.4.4
container_name: bookstack-db
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Kyiv
# You may want to change the credentials used below,
# but be aware the latter three options need to align
# with the DB_* options for the BookStack container.
- MYSQL_ROOT_PASSWORD=Xn890XxXx
- MYSQL_DATABASE=bookstack
- MYSQL_USER=bookstack
- MYSQL_PASSWORD=Xn890XXXX
volumes:
# You generally only ever need to map this one volume.
# This maps it to a "bookstack_db_data" folder in the same
# directory as this compose config file.
- /docker/bookstack/db_data:/config
# These ports are commented out as you don't really need this port
# exposed for normal use, mainly only if connecting direct the the
# database externally. Otherwise, this risks exposing access to the
# database when not needed.
# ports:
# - 3306:3306
restart: unless-stopped
Start example
root@server6:~/bookstack# rm -Rf /docker/bookstack/*
root@server6:~/bookstack# docker compose up -d; docker compose logs --follow
[+] Running 21/21
✔ mariadb Pulled 7.4s
✔ 2b1d751b68e0 Pull complete 2.7s
✔ e5627bac0b8e Pull complete 2.9s
✔ 485b9fca31f5 Pull complete 3.0s
✔ d78faf20d9d2 Pull complete 3.4s
✔ 9fea649eb927 Pull complete 4.5s
✔ f9427200a252 Pull complete 4.5s
✔ ba0f42056615 Pull complete 5.8s
✔ d288d3b5823c Pull complete 5.9s
✔ bookstack Pulled 7.3s
✔ a5e3ea2009e2 Pull complete 0.7s
✔ e1cde46db0e1 Pull complete 2.7s
✔ 46f2d9bbcff7 Pull complete 0.7s
✔ f2d94bf0c7ba Pull complete 0.8s
✔ 0469477658fc Pull complete 1.1s
✔ 35e63de34f77 Pull complete 1.4s
✔ 681cde493f59 Pull complete 1.4s
✔ cd2567bb740c Pull complete 1.9s
✔ d74af1267e43 Pull complete 1.9s
✔ ab2b57391f0b Pull complete 5.7s
✔ a55b94016c65 Pull complete 5.8s
[+] Running 3/3
✔ Network bookstack_default Created 0.0s
✔ Container bookstack-db Started 4.6s
✔ Container bookstack-app Started 4.6s
bookstack-db | [migrations] started
bookstack-db | [migrations] no migrations found
bookstack-db | ───────────────────────────────────────
bookstack-db |
bookstack-db | ██╗ ███████╗██╗ ██████╗
bookstack-db | ██║ ██╔════╝██║██╔═══██╗
bookstack-db | ██║ ███████╗██║██║ ██║
bookstack-db | ██║ ╚════██║██║██║ ██║
bookstack-db | ███████╗███████║██║╚██████╔╝
bookstack-db | ╚══════╝╚══════╝╚═╝ ╚═════╝
bookstack-db |
bookstack-db | Brought to you by linuxserver.io
bookstack-db | ───────────────────────────────────────
bookstack-db |
bookstack-db | To support LSIO projects visit:
bookstack-db | https://www.linuxserver.io/donate/
bookstack-db |
bookstack-db | ───────────────────────────────────────
bookstack-db | GID/UID
bookstack-db | ───────────────────────────────────────
bookstack-db |
bookstack-db | User UID: 1000
bookstack-db | User GID: 1000
bookstack-db | ───────────────────────────────────────
bookstack-db | Linuxserver.io version: 11.4.4-r1-ls174
bookstack-db | Build-date: 2025-02-18T07:42:37+00:00
bookstack-db | ───────────────────────────────────────
bookstack-db |
bookstack-app | [migrations] started
bookstack-app | [migrations] 01-nginx-site-confs-default: executing...
bookstack-app | [migrations] 01-nginx-site-confs-default: succeeded
bookstack-app | [migrations] 02-default-location: executing...
bookstack-app | [migrations] 02-default-location: succeeded
bookstack-app | [migrations] done
bookstack-db | Setting Up Initial Databases
bookstack-app | ───────────────────────────────────────
bookstack-app |
bookstack-app | ██╗ ███████╗██╗ ██████╗
bookstack-app | ██║ ██╔════╝██║██╔═══██╗
bookstack-app | ██║ ███████╗██║██║ ██║
bookstack-app | ██║ ╚════██║██║██║ ██║
bookstack-app | ███████╗███████║██║╚██████╔╝
bookstack-app | ╚══════╝╚══════╝╚═╝ ╚═════╝
bookstack-app |
bookstack-app | Brought to you by linuxserver.io
bookstack-app | ───────────────────────────────────────
bookstack-app |
bookstack-app | To support LSIO projects visit:
bookstack-app | https://www.linuxserver.io/donate/
bookstack-app |
bookstack-app | ───────────────────────────────────────
bookstack-app | GID/UID
bookstack-app | ───────────────────────────────────────
bookstack-db | Installing MariaDB/MySQL system tables in '/config/databases' ...
bookstack-app |
bookstack-app | User UID: 1000
bookstack-app | User GID: 1000
bookstack-app | ───────────────────────────────────────
bookstack-app | Linuxserver.io version: v25.05.2-ls210
bookstack-app | Build-date: 2025-07-07T14:47:54+00:00
bookstack-app | ───────────────────────────────────────
bookstack-app |
bookstack-app | Setting resolver to 127.0.0.11
bookstack-app | Setting worker_processes to 22
bookstack-app | generating self-signed keys in /config/keys, you can replace these with your own keys if required
bookstack-app | ...+......+...+.....+++++++++++++++++++++++++++++++++++++++*...+.+...+.........+.....+.+..+.......+........+...+.+........+++++++++++++++++++++++++++++++++++++++*..+....+..+...+.......+...+..+...+.........+.+.....+......+.+..+.+......+...+...+..............+.............+..+...+...............+.+..+...+.......+..+.......+.....+...+................+..+....+.....++++++
bookstack-app | .................+.+..+++++++++++++++++++++++++++++++++++++++*...+.....+...+...+......+......+.......+......+........................+...+...+.........+..+++++++++++++++++++++++++++++++++++++++*.......+...+...+...+...............+......+.....+....+......+...+...+.........+......+...+.....+..........+............+.....+.......+..+.............+.................+...+.+..+...+.......+..+.+.........+.....++++++
bookstack-app | -----
bookstack-app | Waiting for DB to be available
bookstack-db | OK
bookstack-db |
bookstack-db | To start mariadbd at boot time you have to copy
bookstack-db | support-files/mariadb.service to the right place for your system
bookstack-db |
bookstack-db |
bookstack-db | PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
bookstack-db | To do so, start the server, then issue the following command:
bookstack-db |
bookstack-db | '/usr/bin/mariadb-secure-installation'
bookstack-db |
bookstack-db | which will also give you the option of removing the test
bookstack-db | databases and anonymous user created by default. This is
bookstack-db | strongly recommended for production servers.
bookstack-db |
bookstack-db | See the MariaDB Knowledgebase at https://mariadb.com/kb
bookstack-db |
bookstack-db | You can start the MariaDB daemon with:
bookstack-db | cd '/usr' ; /usr/bin/mariadbd-safe --datadir='/config/databases'
bookstack-db |
bookstack-db | You can test the MariaDB daemon with mariadb-test-run.pl
bookstack-db | cd '/usr/mariadb-test' ; perl mariadb-test-run.pl
bookstack-db |
bookstack-db | Please report any problems at https://mariadb.org/jira
bookstack-db |
bookstack-db | The latest information about MariaDB is available at https://mariadb.org/.
bookstack-db |
bookstack-db | Consider joining MariaDB's strong and vibrant community:
bookstack-db | https://mariadb.org/get-involved/
bookstack-db |
bookstack-db | 2025-07-13 13:32:46 0 [Note] Starting MariaDB 11.4.4-MariaDB source revision e9a502df08bad16aa8a354e854f3c014b1380e32 server_uid edoGJ5xHg4MamMe/BhNZRJ1nVm4= as process 186
bookstack-db | 2025-07-13 13:32:46 0 [Note] InnoDB: Compressed tables use zlib 1.3.1
bookstack-db | 2025-07-13 13:32:46 0 [Note] InnoDB: Number of transaction pools: 1
bookstack-db | 2025-07-13 13:32:46 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
bookstack-db | 2025-07-13 13:32:46 0 [Note] InnoDB: Using Linux native AIO
bookstack-db | 2025-07-13 13:32:46 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
bookstack-db | 2025-07-13 13:32:46 0 [Note] InnoDB: Completed initialization of buffer pool
bookstack-db | 2025-07-13 13:32:46 0 [Note] InnoDB: Buffered log writes (block size=512 bytes)
bookstack-db | 2025-07-13 13:32:46 0 [Note] InnoDB: End of log at LSN=46300
bookstack-db | 2025-07-13 13:32:46 0 [Note] InnoDB: Opened 3 undo tablespaces
bookstack-db | 2025-07-13 13:32:46 0 [Note] InnoDB: 128 rollback segments in 3 undo tablespaces are active.
bookstack-db | 2025-07-13 13:32:46 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
bookstack-db | 2025-07-13 13:32:46 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
bookstack-db | 2025-07-13 13:32:46 0 [Note] InnoDB: log sequence number 46300; transaction id 14
bookstack-db | 2025-07-13 13:32:46 0 [Note] Plugin 'FEEDBACK' is disabled.
bookstack-db | 2025-07-13 13:32:46 0 [Note] InnoDB: Loading buffer pool(s) from /config/databases/ib_buffer_pool
bookstack-db | 2025-07-13 13:32:46 0 [Note] Plugin 'wsrep-provider' is disabled.
bookstack-db | 2025-07-13 13:32:46 0 [Note] InnoDB: Buffer pool(s) load completed at 250713 13:32:46
bookstack-db | 2025-07-13 13:32:46 0 [Note] mariadbd: Event Scheduler: Loaded 0 events
bookstack-db | 2025-07-13 13:32:46 0 [Note] mariadbd: ready for connections.
bookstack-db | Version: '11.4.4-MariaDB' socket: '/run/mysqld/mysqld.sock' port: 0 Alpine Linux
bookstack-db | 2025-07-13 13:32:48 0 [Note] mariadbd (initiated by: root[root] @ localhost []): Normal shutdown
bookstack-db | 2025-07-13 13:32:48 0 [Note] InnoDB: FTS optimize thread exiting.
bookstack-db | 2025-07-13 13:32:48 0 [Note] InnoDB: Starting shutdown...
bookstack-db | 2025-07-13 13:32:48 0 [Note] InnoDB: Dumping buffer pool(s) to /config/databases/ib_buffer_pool
bookstack-db | 2025-07-13 13:32:48 0 [Note] InnoDB: Buffer pool(s) dump completed at 250713 13:32:48
bookstack-db | 2025-07-13 13:32:48 0 [Note] InnoDB: Removed temporary tablespace data file: "./ibtmp1"
bookstack-db | 2025-07-13 13:32:48 0 [Note] InnoDB: Shutdown completed; log sequence number 47875; transaction id 16
bookstack-db | 2025-07-13 13:32:48 0 [Note] mariadbd: Shutdown complete
bookstack-db |
bookstack-db | Database Setup Completed
bookstack-db | [custom-init] No custom files found, skipping...
bookstack-db | 250713 13:32:49 mysqld_safe Logging to '/config/log/mysql/mariadb-error.log'.
bookstack-db | 250713 13:32:49 mysqld_safe Starting mariadbd daemon with databases from /config/databases
bookstack-db | Connection to localhost (::1) 3306 port [tcp/mysql] succeeded!
bookstack-db | Logrotate is enabled
bookstack-db | [ls.io-init] done.
bookstack-app |
bookstack-app | INFO Preparing database.
bookstack-app |
bookstack-app | Creating migration table ....................................... 7.55ms DONE
bookstack-app |
bookstack-app | INFO Running migrations.
bookstack-app |
bookstack-app | 2014_10_12_000000_create_users_table ......................... 172.81ms DONE
bookstack-app | 2014_10_12_100000_create_password_resets_table ................ 23.44ms DONE
bookstack-app | 2015_07_12_114933_create_books_table ........................... 5.03ms DONE
bookstack-app | 2015_07_12_190027_create_pages_table ........................... 5.33ms DONE
bookstack-app | 2015_07_13_172121_create_images_table .......................... 4.95ms DONE
bookstack-app | 2015_07_27_172342_create_chapters_table ........................ 5.40ms DONE
bookstack-app | 2015_08_08_200447_add_users_to_entities ....................... 76.63ms DONE
bookstack-app | 2015_08_09_093534_create_page_revisions_table .................. 5.26ms DONE
bookstack-app | 2015_08_16_142133_create_activities_table ...................... 5.03ms DONE
bookstack-app | 2015_08_29_105422_add_roles_and_permissions .................. 119.36ms DONE
bookstack-app | 2015_08_30_125859_create_settings_table ........................ 4.84ms DONE
bookstack-app | 2015_08_31_175240_add_search_indexes ........................... 0.02ms DONE
bookstack-app | 2015_09_04_165821_create_social_accounts_table ................ 22.27ms DONE
bookstack-app | 2015_09_05_164707_add_email_confirmation_table ................ 30.09ms DONE
bookstack-app | 2015_11_21_145609_create_views_table ........................... 5.01ms DONE
bookstack-app | 2015_11_26_221857_add_entity_indexes ......................... 185.47ms DONE
bookstack-app | 2015_12_05_145049_fulltext_weighting ........................... 0.05ms DONE
bookstack-app | 2015_12_07_195238_add_image_upload_types ...................... 30.97ms DONE
bookstack-app | 2015_12_09_195748_add_user_avatars ............................. 6.91ms DONE
bookstack-app | 2016_01_11_210908_add_external_auth_to_users .................. 16.63ms DONE
bookstack-app | 2016_02_25_184030_add_slug_to_revisions ....................... 33.88ms DONE
bookstack-app | 2016_02_27_120329_update_permissions_and_roles ................ 59.52ms DONE
bookstack-app | 2016_02_28_084200_add_entity_access_controls .................. 95.20ms DONE
bookstack-app | 2016_03_09_203143_add_page_revision_types ..................... 16.53ms DONE
bookstack-app | 2016_03_13_082138_add_page_drafts ............................. 17.37ms DONE
bookstack-app | 2016_03_25_123157_add_markdown_support ........................ 15.12ms DONE
bookstack-app | 2016_04_09_100730_add_view_permissions_to_roles ............... 17.78ms DONE
bookstack-app | 2016_04_20_192649_create_joint_permissions_table ............. 113.46ms DONE
bookstack-app | 2016_05_06_185215_create_tags_table ........................... 42.19ms DONE
bookstack-app | 2016_07_07_181521_add_summary_to_page_revisions ................ 7.59ms DONE
bookstack-app | 2016_09_29_101449_remove_hidden_roles ......................... 29.30ms DONE
bookstack-app | 2016_10_09_142037_create_attachments_table .................... 22.89ms DONE
bookstack-app | 2017_01_21_163556_create_cache_table .......................... 15.17ms DONE
bookstack-app | 2017_01_21_163602_create_sessions_table ....................... 15.83ms DONE
bookstack-app | 2017_03_19_091553_create_search_index_table ................... 44.02ms DONE
bookstack-app | 2017_04_20_185112_add_revision_counts ......................... 23.98ms DONE
bookstack-app | 2017_07_02_152834_update_db_encoding_to_ut8mb4 ................. 0.04ms DONE
bookstack-app | 2017_08_01_130541_create_comments_table ....................... 36.61ms DONE
bookstack-app | 2017_08_29_102650_add_cover_image_display ...................... 7.80ms DONE
bookstack-app | 2018_07_15_173514_add_role_external_auth_id ................... 16.73ms DONE
bookstack-app | 2018_08_04_115700_create_bookshelves_table ................... 135.46ms DONE
bookstack-app | 2019_07_07_112515_add_template_support ........................ 18.99ms DONE
bookstack-app | 2019_08_17_140214_add_user_invites_table ...................... 24.32ms DONE
bookstack-app | 2019_12_29_120917_add_api_auth ................................ 33.77ms DONE
bookstack-app | 2020_08_04_111754_drop_joint_permissions_id ................... 31.18ms DONE
bookstack-app | 2020_08_04_131052_remove_role_name_field ....................... 9.36ms DONE
bookstack-app | 2020_09_19_094251_add_activity_indexes ........................ 18.29ms DONE
bookstack-app | 2020_09_27_210059_add_entity_soft_deletes ..................... 30.40ms DONE
bookstack-app | 2020_09_27_210528_create_deletions_table ...................... 31.55ms DONE
bookstack-app | 2020_11_07_232321_simplify_activities_table ................... 50.10ms DONE
bookstack-app | 2020_12_30_173528_add_owned_by_field_to_entities .............. 78.89ms DONE
bookstack-app | 2021_01_30_225441_add_settings_type_column ..................... 7.29ms DONE
bookstack-app | 2021_03_08_215138_add_user_slug ............................... 19.82ms DONE
bookstack-app | 2021_05_15_173110_create_favourites_table ..................... 22.01ms DONE
bookstack-app | 2021_06_30_173111_create_mfa_values_table ..................... 22.29ms DONE
bookstack-app | 2021_07_03_085038_add_mfa_enforced_to_roles_table .............. 7.93ms DONE
bookstack-app | 2021_08_28_161743_add_export_role_permission ................... 2.62ms DONE
bookstack-app | 2021_09_26_044614_add_activities_ip_column ..................... 7.98ms DONE
bookstack-app | 2021_11_26_070438_add_index_for_user_ip ........................ 9.41ms DONE
bookstack-app | 2021_12_07_111343_create_webhooks_table ....................... 45.94ms DONE
bookstack-app | 2021_12_13_152024_create_jobs_table ........................... 14.55ms DONE
bookstack-app | 2021_12_13_152120_create_failed_jobs_table .................... 14.75ms DONE
bookstack-app | 2022_01_03_154041_add_webhooks_timeout_error_columns .......... 29.38ms DONE
bookstack-app | 2022_04_17_101741_add_editor_change_field_and_permission ....... 9.64ms DONE
bookstack-app | 2022_04_25_140741_update_polymorphic_types ..................... 6.95ms DONE
bookstack-app | 2022_07_16_170051_drop_joint_permission_type .................. 46.41ms DONE
bookstack-app | 2022_08_17_092941_create_references_table ..................... 42.40ms DONE
bookstack-app | 2022_09_02_082910_fix_shelf_cover_image_types .................. 1.00ms DONE
bookstack-app | 2022_10_07_091406_flatten_entity_permissions_table ............ 36.85ms DONE
bookstack-app | 2022_10_08_104202_drop_entity_restricted_field ................ 38.51ms DONE
bookstack-app | 2023_01_24_104625_refactor_joint_permissions_storage .......... 64.80ms DONE
bookstack-app | 2023_01_28_141230_copy_color_settings_for_dark_mode ............ 0.93ms DONE
bookstack-app | 2023_02_20_093655_increase_attachments_path_length ............ 11.60ms DONE
bookstack-app | 2023_02_23_200227_add_updated_at_index_to_pages ................ 9.06ms DONE
bookstack-app | 2023_06_10_071823_remove_guest_user_secondary_roles ............ 1.26ms DONE
bookstack-app | 2023_06_25_181952_remove_bookshelf_create_entity_permissions ... 0.03ms DONE
bookstack-app | 2023_07_25_124945_add_receive_notifications_role_permissions ... 2.25ms DONE
bookstack-app | 2023_07_31_104430_create_watches_table ........................ 31.11ms DONE
bookstack-app | 2023_08_21_174248_increase_cache_size ......................... 14.03ms DONE
bookstack-app | 2023_12_02_104541_add_default_template_to_books ................ 8.17ms DONE
bookstack-app | 2023_12_17_140913_add_description_html_to_entities ............ 24.37ms DONE
bookstack-app | 2024_01_01_104542_add_default_template_to_chapters ............. 9.11ms DONE
bookstack-app | 2024_02_04_141358_add_views_updated_index ...................... 8.93ms DONE
bookstack-app | 2024_05_04_154409_rename_activity_relation_columns ............ 14.77ms DONE
bookstack-app | 2024_09_29_140340_ensure_editor_value_set ...................... 1.68ms DONE
bookstack-app | 2024_10_29_114420_add_import_role_permission ................... 2.62ms DONE
bookstack-app | 2024_11_02_160700_create_imports_table ........................ 13.84ms DONE
bookstack-app | 2024_11_27_171039_add_instance_id_setting ...................... 4.53ms DONE
bookstack-app | 2025_01_29_180933_create_sort_rules_table ...................... 4.80ms DONE
bookstack-app | 2025_02_05_150842_add_sort_rule_id_to_books .................... 8.25ms DONE
bookstack-app | 2025_04_18_215145_add_content_refs_and_archived_to_comments ... 25.44ms DONE
bookstack-app |
bookstack-app | [custom-init] No custom files found, skipping...
bookstack-app | [ls.io-init] done.
Default password
The default username is admin@admin.com
with the password of password
No comments to display
No comments to display