User Tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
services:bookstack [2024/06/03 12:47] willyservices:bookstack [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1
Line 1: Line 1:
-====== BookStack ====== 
- 
-[[https://www.bookstackapp.com|BookStack]] is a very cool kind of Wiki / knowledge / publishing tool. It's Open Source, very polished and also very simple to use.  
- 
- 
- 
-===== Installation ===== 
- 
-Installing BookStack can be done on bare-metal with your existing PHP / MariaDB stack or use a pre-built container. I choose to go with the container because i find it easier than properly segregate yet another PHP installation. 
- 
-BookStack do not provide container images themselves, but they rely on external providers and i choose the [[https://github.com/linuxserver/docker-bookstack|Linux Server guys]] because they have a great reputation and maintain lots of well polished images. 
- 
-Of course i will show you how to install it via [[gentoo:containers|Podman on Gentoo]] instead of Docker, to go fully rootless and secure. 
- 
-As usual, you need to create a dedicated user and create the data folder: 
-<code bash> 
-useradd -d /data/daemons/bookstack -m bookstack 
-mkdir /data/bookstack 
-chown bookstack:bookstack /data/bookstack 
-</code> 
- 
-As user **bookstack** create the compose yaml file: 
-<file docker-compose.yml> 
---- 
-services: 
-  bookstack: 
-    image: lscr.io/linuxserver/bookstack 
-    container_name: bookstack 
-    environment: 
-#      - PUID=1050 
-#      - PGID=1050 
-      - TZ=Europe/Rome 
-      - APP_URL=https://mydomain.com/bookstack 
-      - DB_HOST=bookstack_db 
-      - DB_PORT=3306 
-      - DB_USER=bookstack 
-      - DB_PASS=<your password> 
-      - DB_DATABASE=bookstackapp 
-    volumes: 
-      - /deposito/bookstack:/config 
-    ports: 
-      - 6875:80 
-    depends_on: 
-      - bookstack_db 
-    networks: 
-      - bookstack-net 
- 
-  bookstack_db: 
-    image: lscr.io/linuxserver/mariadb 
-    container_name: bookstack_db 
-    environment: 
-#      - PUID=1050 
-#      - PGID=1050 
-      - TZ=Europe/London 
-      - MYSQL_ROOT_PASSWORD=<random root password> 
-      - MYSQL_DATABASE=bookstackapp 
-      - MYSQL_USER=bookstack 
-      - MYSQL_PASSWORD=<your password> 
-    volumes: 
-      - /data/bookstack:/config 
-    networks: 
-      - bookstack-net 
- 
-networks: 
-  bookstack-net: {} 
-</file> 
- 
- 
-A few notes: you //could// use PUID / PGID but it's not really working, so i commented them out. They work for docker anyway, but podman is rootless by default, so there is no real reason to use them. 
- 
-Of course choose  proper available port (6875) and set the correct URL under APP_URL as well. 
- 
-===== Reverse Proxy ===== 
- 
-As usual, you should access the service only via Reverse Proxy (see [[selfhost:nginx|The Reverse Proxy concept]]), the following NGINX configuration file will be enough: 
-<file - bookstack.conf> 
- 
-location = /bookstack {  
-        return 301 https://$host/bookstack/; 
-} 
- 
-location /bookstack/ { 
-    proxy_pass         http://127.0.0.1:6875/; 
-    proxy_redirect     off; 
-    proxy_set_header   Host $host; 
-    proxy_set_header   X-Real-IP $remote_addr; 
-    proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for; 
-    proxy_set_header   X-Forwarded-Host $server_name; 
-} 
-</file> 
- 
-==== Autostart ==== 
- 
-If you follow my [[gentoo:locald|Custom User Services]] guide, just create, as root, the following links: 
-<code bash> 
-cd /etc/local.d 
-ln -s _servicer.sh 62-bookstack--podman.start 
-ln -s _servicer.sh 62-bookstack--podman.stop 
-</code> 
- 
-==== First Access ==== 
- 
-Login to **https://mydomain.com/bookstack/** as user //admin@admin.org// with **password** as password. 
  

This website uses technical cookies only. No information is shared with anybody or used in any way but provide the website in your browser.

More information