Cant figure this out #5033

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

Originally created by @PJTharpeNoob on GitHub (Oct 30, 2024).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

I have been working on this the past week, and my limited experience is the problem I know, but I'm stumped.

I purchased a VPS, installed ubuntu 22.04, docker, aaPanel with LEMP stack.
I've been attempting to install bookstack through docker with a reverse proxy for nginx. Couldn't figure it out so I wiped my VPS and started over with just Ubuntu and Docker.

This is the exact docker-compose.yml file below.

Basically my biggest confusion is if the APP_KEY is required or not? I generated this app key by using the command docker run -it --rm --entrypoint /bin/bash lscr.io/linuxserver/bookstack:latest appkey

I have attempted this at least 10 times and sometimes I can get the page to load but everything is formatted weird and I get a failure when I click log in.

Any help would be appreciated.
Thank you! - PJ

version: '2'
services:
  mysql:
    image: mysql:8.3
    environment:
    - MYSQL_ROOT_PASSWORD=bookstackroot
    - MYSQL_DATABASE=bookstack
    - MYSQL_USER=bookstack
    - MYSQL_PASSWORD= bookstackpw
    volumes:
    - mysql-data:/var/lib/mysql

  bookstack:
    image: solidnerd/bookstack:24.10.0
    depends_on:
    - mysql
    environment:
    - DB_HOST=mysql:3306
    - DB_DATABASE=bookstack
    - DB_USERNAME=bookstack
    - DB_PASSWORD=bookstackpw
    #set the APP_ to the URL of bookstack without without a trailing slash APP_URL=https://example.com
    - APP_URL=http://147.79.78.208
    # APP_KEY is used for encryption where needed, so needs to be persisted to
    # preserve decryption abilities.
    # Can run `php artisan key:generate` to generate a key
    - APP_KEY=3733e2b9a99f15b7d343e7b59d7baeffddbb564890b7f2179b65044c1c8f0769
    volumes:
    - uploads:/var/www/bookstack/public/uploads
    - storage-uploads:/var/www/bookstack/storage/uploads
    ports:
    - "8080:8080"

volumes:
 mysql-data:
 uploads:
 storage-uploads:

--------

### Exact BookStack Version

24.10

### Log Content

_No response_

### Hosting Environment

Ubuntu 22.04, PHP 8.1
Originally created by @PJTharpeNoob on GitHub (Oct 30, 2024). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario I have been working on this the past week, and my limited experience is the problem I know, but I'm stumped. I purchased a VPS, installed ubuntu 22.04, docker, aaPanel with LEMP stack. I've been attempting to install bookstack through docker with a reverse proxy for nginx. Couldn't figure it out so I wiped my VPS and started over with just Ubuntu and Docker. This is the exact docker-compose.yml file below. Basically my biggest confusion is if the APP_KEY is required or not? I generated this app key by using the command **docker run -it --rm --entrypoint /bin/bash lscr.io/linuxserver/bookstack:latest appkey** I have attempted this at least 10 times and sometimes I can get the page to load but everything is formatted weird and I get a failure when I click log in. Any help would be appreciated. Thank you! - PJ ``` version: '2' services: mysql: image: mysql:8.3 environment: - MYSQL_ROOT_PASSWORD=bookstackroot - MYSQL_DATABASE=bookstack - MYSQL_USER=bookstack - MYSQL_PASSWORD= bookstackpw volumes: - mysql-data:/var/lib/mysql bookstack: image: solidnerd/bookstack:24.10.0 depends_on: - mysql environment: - DB_HOST=mysql:3306 - DB_DATABASE=bookstack - DB_USERNAME=bookstack - DB_PASSWORD=bookstackpw #set the APP_ to the URL of bookstack without without a trailing slash APP_URL=https://example.com - APP_URL=http://147.79.78.208 # APP_KEY is used for encryption where needed, so needs to be persisted to # preserve decryption abilities. # Can run `php artisan key:generate` to generate a key - APP_KEY=3733e2b9a99f15b7d343e7b59d7baeffddbb564890b7f2179b65044c1c8f0769 volumes: - uploads:/var/www/bookstack/public/uploads - storage-uploads:/var/www/bookstack/storage/uploads ports: - "8080:8080" volumes: mysql-data: uploads: storage-uploads: -------- ### Exact BookStack Version 24.10 ### Log Content _No response_ ### Hosting Environment Ubuntu 22.04, PHP 8.1
OVERLORD added the 🐕 Support label 2026-02-05 09:35:17 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Oct 30, 2024):

Basically my biggest confusion is if the APP_KEY is required or not?

Yeah, it's required and should be set. The value doesn't look what you'd get from the mentioned command so not sure where that value has come from. From the command the value should start with base64:.

I can get the page to load but everything is formatted weird and I get a failure when I click log in.

Typically, that occurs when the APP_URL is not set, or it does not full align with the URL you're using to access BookStack via in the browser.

@ssddanbrown commented on GitHub (Oct 30, 2024): > Basically my biggest confusion is if the APP_KEY is required or not? Yeah, it's required and should be set. The value doesn't look what you'd get from the mentioned command so not sure where that value has come from. From the command the value should start with `base64:`. > I can get the page to load but everything is formatted weird and I get a failure when I click log in. Typically, that occurs when the `APP_URL` is not set, or it does not full align with the URL you're using to access BookStack via in the browser.
Author
Owner

@ssddanbrown commented on GitHub (Nov 7, 2024):

Since there's been no further follow up I'll go ahead and close this off.

@ssddanbrown commented on GitHub (Nov 7, 2024): Since there's been no further follow up I'll go ahead and 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#5033