Need Help setting up bookstack on Portainer #5137

Closed
opened 2026-02-05 09:42:36 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @gttech2025 on GitHub (Jan 21, 2025).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

so i ran the set up correctly still need further help my bookstack

this is the docker - Compose.yml i used to set up on portainer

Details


version: "2"

services:
  # Service definition for BookStack
  bookstack:
    image: lscr.io/linuxserver/bookstack # The Docker image for BookStack
    container_name: bookstack # Name of the container
    environment: # Environment variables for the BookStack service
      - PUID=1000 # User ID for the process
      - PGID=1000 # Group ID for the process
      - APP_URL=http://172.25.189.2:6875 # URL for accessing BookStack
      - DB_HOST=bookstack_db # Hostname of the database service
      - DB_PORT=3306 # Port for the database service
      - DB_USER=bookstack # Database user
      - DB_PASS=secret # Database password
      - DB_DATABASE=bookstackapp # Database name
      - APP_DEFAULT_DARK_MODE=true # Enable dark mode by default
    volumes:
      - bookstack_config:/config # Mount the volume for BookStack configuration
    ports:
      - 6875:80 # Map port 6875 on the host to port 80 in the container
    restart: unless-stopped # Restart policy
    depends_on:
      - bookstack_db # This service depends on the bookstack_db service
    networks:
      - bookstack-network # Connect to the bookstack-network

  # Service definition for the database (MariaDB)
  bookstack_db:
    image: lscr.io/linuxserver/mariadb # The Docker image for MariaDB
    container_name: bookstack_db # Name of the container
    environment: # Environment variables for the MariaDB service
      - MYSQL_ROOT_PASSWORD=your_root_password # Root password for MariaDB
      - MYSQL_DATABASE=bookstackapp # Database name
      - MYSQL_USER=bookstack # Database user
      - MYSQL_PASSWORD=secret # Database password
    volumes:
      - bookstack_db_data:/var/lib/mysql # Mount the volume for MariaDB data
    restart: unless-stopped # Restart policy
    networks:
      - bookstack-network # Connect to the bookstack-network

volumes:
  bookstack_config: # Volume for storing BookStack configuration
    driver: local
  bookstack_db_data: # Volume for storing MariaDB data
    driver: local

# Define the network configuration
networks:
  bookstack-network: # Custom network for inter-container communication
    driver: bridge # Use the bridge driver for the network

Exact BookStack Version

2

Log Content

logs say im missing this info " using keys found in /config/keys The application key is missing, halting init! You can generate a key with: docker run -it --rm --entrypoint /bin/bash lscr.io/linuxserver/bookstack:latest appkey
And apply it to the APP_KEY environment variable. "
Any help will be great .

Hosting Environment

Ubuntu and Portainer

Originally created by @gttech2025 on GitHub (Jan 21, 2025). ### Attempted Debugging - [x] I have read the debugging page ### Searched GitHub Issues - [x] I have searched GitHub for the issue. ### Describe the Scenario so i ran the set up correctly still need further help my bookstack this is the docker - Compose.yml i used to set up on portainer <details><summary>Details</summary> <p> ```yml version: "2" services: # Service definition for BookStack bookstack: image: lscr.io/linuxserver/bookstack # The Docker image for BookStack container_name: bookstack # Name of the container environment: # Environment variables for the BookStack service - PUID=1000 # User ID for the process - PGID=1000 # Group ID for the process - APP_URL=http://172.25.189.2:6875 # URL for accessing BookStack - DB_HOST=bookstack_db # Hostname of the database service - DB_PORT=3306 # Port for the database service - DB_USER=bookstack # Database user - DB_PASS=secret # Database password - DB_DATABASE=bookstackapp # Database name - APP_DEFAULT_DARK_MODE=true # Enable dark mode by default volumes: - bookstack_config:/config # Mount the volume for BookStack configuration ports: - 6875:80 # Map port 6875 on the host to port 80 in the container restart: unless-stopped # Restart policy depends_on: - bookstack_db # This service depends on the bookstack_db service networks: - bookstack-network # Connect to the bookstack-network # Service definition for the database (MariaDB) bookstack_db: image: lscr.io/linuxserver/mariadb # The Docker image for MariaDB container_name: bookstack_db # Name of the container environment: # Environment variables for the MariaDB service - MYSQL_ROOT_PASSWORD=your_root_password # Root password for MariaDB - MYSQL_DATABASE=bookstackapp # Database name - MYSQL_USER=bookstack # Database user - MYSQL_PASSWORD=secret # Database password volumes: - bookstack_db_data:/var/lib/mysql # Mount the volume for MariaDB data restart: unless-stopped # Restart policy networks: - bookstack-network # Connect to the bookstack-network volumes: bookstack_config: # Volume for storing BookStack configuration driver: local bookstack_db_data: # Volume for storing MariaDB data driver: local # Define the network configuration networks: bookstack-network: # Custom network for inter-container communication driver: bridge # Use the bridge driver for the network ``` </p> </details> ### Exact BookStack Version 2 ### Log Content logs say im missing this info " using keys found in /config/keys The application key is missing, halting init! You can generate a key with: docker run -it --rm --entrypoint /bin/bash lscr.io/linuxserver/bookstack:latest appkey And apply it to the APP_KEY environment variable. " Any help will be great . ### Hosting Environment Ubuntu and Portainer
OVERLORD added the 🐕 Support label 2026-02-05 09:42:36 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Jan 21, 2025):

Please see the readme for the linuxserver image for details on what env options are needed for the current image version:

https://github.com/linuxserver/docker-bookstack?tab=readme-ov-file#parameters

Specifically:

  • DB_USER should now be DB_USERNAME.
  • DB_PASS should now be DB_PASSWORD.
  • You need to set an APP_KEY, which is generated as per the logged output and linuxserver readme. I'm not familiar enough with portainer to know how to run the one-off command via portainer though.

Also, the volume mapping for that mariadb container looks wrong, See: https://docs.linuxserver.io/images/docker-mariadb/#volume-mappings-v

@ssddanbrown commented on GitHub (Jan 21, 2025): Please see the readme for the linuxserver image for details on what env options are needed for the current image version: https://github.com/linuxserver/docker-bookstack?tab=readme-ov-file#parameters Specifically: - `DB_USER` should now be `DB_USERNAME`. - `DB_PASS` should now be `DB_PASSWORD`. - You need to set an `APP_KEY`, which is generated as per the logged output and linuxserver readme. I'm not familiar enough with portainer to know how to run the one-off command via portainer though. Also, the volume mapping for that mariadb container looks wrong, See: https://docs.linuxserver.io/images/docker-mariadb/#volume-mappings-v
Author
Owner

@ssddanbrown commented on GitHub (Sep 3, 2025):

Since there's been no further follow-up I'm going to close this off.

@ssddanbrown commented on GitHub (Sep 3, 2025): Since there's been no further follow-up I'm going to close this off.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5137