Docker bookstack installation is not loading properly and causing no css issues #3366

Closed
opened 2026-02-05 06:30:03 +03:00 by OVERLORD · 11 comments
Owner

Originally created by @9ieR on GitHub (Nov 26, 2022).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

I followed all the steps from the recommended docker-compose installation of linuxserver docker-bookstack github .

I used the docker-compose file there which is

version: "2"
services:
  bookstack:
    image: lscr.io/linuxserver/bookstack
    container_name: bookstack
    environment:
      - PUID=1000
      - PGID=1000
      - APP_URL=docs.something.com #my own app_url added
      - DB_HOST=bookstack_db
      - DB_USER=bookstack
      - DB_PASS=<yourdbpass> #my own password added
      - DB_DATABASE=bookstackapp
    volumes:
      - /path/to/data:/config #my own path added
    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> #my own password added
      - TZ=Europe/London#my own timezone
      - MYSQL_DATABASE=bookstackapp
      - MYSQL_USER=bookstack
      - MYSQL_PASSWORD=<yourdbpass> #my own password added
    volumes:
      - /path/to/data:/config #my own path added
    restart: unless-stopped

After running docker-compose up -d, everything went well but when I connect to APP_URL (docs.something.com), I get the 'cannot find this page' error. I haven't used any reversed proxy. I'm also not sure where to pin point the errors since I'm not very familiar with php and apache stuffs. It is a completely clean install. I haven't done anything to the containers yet.

I've also tried adding http:// and https:// in front of my app_url environmental variable but they didn't work.

Another weird thing is that the url changed into http://X.X.X.X:6875/docs.something.com/docs.something.com/login when I just used X.X.X.X:6875 instead of app_url. https://X.X.X.X:6875 doesn't work. Only http:// does.

This weird long url works and the page shows but there is no css in the page. I've found some closed issues here similar to that no css loading problem but they are on host installations and seemed to be caused by something entirely different from mine.

Can you help me?

Exact BookStack Version

v22.10.2-ls50

Log Content

No response

PHP Version

8.0.25

Hosting Environment

installed using official installation script(no proxies used for docker containers)

Originally created by @9ieR on GitHub (Nov 26, 2022). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario I followed all the steps from the recommended docker-compose installation of [linuxserver docker-bookstack github ](https://github.com/linuxserver/docker-bookstack). I used the docker-compose file there which is ```--- version: "2" services: bookstack: image: lscr.io/linuxserver/bookstack container_name: bookstack environment: - PUID=1000 - PGID=1000 - APP_URL=docs.something.com #my own app_url added - DB_HOST=bookstack_db - DB_USER=bookstack - DB_PASS=<yourdbpass> #my own password added - DB_DATABASE=bookstackapp volumes: - /path/to/data:/config #my own path added 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> #my own password added - TZ=Europe/London#my own timezone - MYSQL_DATABASE=bookstackapp - MYSQL_USER=bookstack - MYSQL_PASSWORD=<yourdbpass> #my own password added volumes: - /path/to/data:/config #my own path added restart: unless-stopped ``` After running `docker-compose up -d`, everything went well but when I connect to APP_URL (docs.something.com), I get the 'cannot find this page' error. I haven't used any reversed proxy. I'm also not sure where to pin point the errors since I'm not very familiar with php and apache stuffs. It is a completely clean install. I haven't done anything to the containers yet. I've also tried adding http:// and https:// in front of my app_url environmental variable but they didn't work. Another weird thing is that the url changed into `http://X.X.X.X:6875/docs.something.com/docs.something.com/login` when I just used `X.X.X.X:6875` instead of app_url. `https://X.X.X.X:6875` doesn't work. Only `http://` does. This weird long url works and the page shows but there is no css in the page. I've found some closed issues here similar to that no css loading problem but they are on host installations and seemed to be caused by something entirely different from mine. Can you help me? ### Exact BookStack Version v22.10.2-ls50 ### Log Content _No response_ ### PHP Version 8.0.25 ### Hosting Environment installed using official installation script(no proxies used for docker containers)
OVERLORD added the 🐕 Support label 2026-02-05 06:30:03 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Nov 26, 2022):

Hi @9ieR,
APP_URL must be the exact base URL used to access your BookStack instance in the browser, so http://X.X.X.X:6875 unless you're using a domain/host name when accessing in browser. Also ensure you are re-upping the compose stack, rather than just restarting, to ensure env changes are used.

@ssddanbrown commented on GitHub (Nov 26, 2022): Hi @9ieR, `APP_URL` must be the exact base URL used to access your BookStack instance in the browser, so `http://X.X.X.X:6875` unless you're using a domain/host name when accessing in browser. Also ensure you are re-upping the compose stack, rather than just restarting, to ensure env changes are used.
Author
Owner

@9ieR commented on GitHub (Nov 26, 2022):

Hi @ssddanbrown
Yep, I've done that. When I up the yaml compose file, I made sure that I deleted the existing containers, images, volumes and even networks related to the compose file.

I've also just tried using IP address in place of URL. Still no luck though. The url just changed into
http://X.X.X.X:6875/X.X.X.X:6875/X.X.X.X:6875/login. And css still missing.

@9ieR commented on GitHub (Nov 26, 2022): Hi @ssddanbrown Yep, I've done that. When I up the yaml compose file, I made sure that I deleted the existing containers, images, volumes and even networks related to the compose file. I've also just tried using IP address in place of URL. Still no luck though. The url just changed into `http://X.X.X.X:6875/X.X.X.X:6875/X.X.X.X:6875/login`. And css still missing.
Author
Owner

@ssddanbrown commented on GitHub (Nov 26, 2022):

I've also just tried using IP address in place of URL. Still no luck though.

Just to confirm, does the current value definitely start with http:// or https://. The only times I've seen the IP/host duplication, as you describe, is specifically when the APP_URL does not start with the protocol.

@ssddanbrown commented on GitHub (Nov 26, 2022): > I've also just tried using IP address in place of URL. Still no luck though. Just to confirm, does the current value definitely start with `http://` or `https://`. The only times I've seen the IP/host duplication, as you describe, is specifically when the `APP_URL` does not start with the protocol.
Author
Owner

@9ieR commented on GitHub (Nov 26, 2022):

http://

https:// doesn't work. It causes the page to not load up at all. I'm also wondering why it's working with https but with http. Seems like I can't also call apache's default index.html of my host with https but only with http.

@9ieR commented on GitHub (Nov 26, 2022): `http://` `https://` doesn't work. It causes the page to not load up at all. I'm also wondering why it's working with https but with http. Seems like I can't also call apache's default index.html of my host with https but only with http.
Author
Owner

@ssddanbrown commented on GitHub (Nov 26, 2022):

I would not expect https:// to work unless you've done specific setup to support it.

So you currently have APP_URL=http://X.X.X.X:6875 defined for the bookstack container? Where are you setting this? Via the environment of the docker-compose.yaml or via an .env file?

@ssddanbrown commented on GitHub (Nov 26, 2022): I would not expect `https://` to work unless you've done specific setup to support it. So you currently have `APP_URL=http://X.X.X.X:6875` defined for the bookstack container? Where are you setting this? Via the `environment` of the docker-compose.yaml or via an `.env` file?
Author
Owner

@9ieR commented on GitHub (Nov 26, 2022):

Yep! I changed it in the docker-compose.yaml file. I don't try to change environmental variables after the containers are up and running.

Whenever I want to test something different, I just delete everything about the current containers/images and go back making changes to compose file and up it again.

Currently, the environment variable APP_URL in the docker-compose.yml is APP_URL=http://X.X.X.X:6875

@9ieR commented on GitHub (Nov 26, 2022): Yep! I changed it in the docker-compose.yaml file. I don't try to change environmental variables after the containers are up and running. Whenever I want to test something different, I just delete everything about the current containers/images and go back making changes to compose file and up it again. Currently, the environment variable APP_URL in the docker-compose.yml is `APP_URL=http://X.X.X.X:6875`
Author
Owner

@ssddanbrown commented on GitHub (Nov 26, 2022):

Okay, in that configuration, can you load BookStack (In its broken design state).
View the page source (Right click page > View source).
Find the lines towards the top (About 20 lines down) that look something like this:

<!-- Styles and Fonts -->
<link rel="stylesheet" href="URL_HERE">

Look at the href value in the second line of that part, and compare exactly to the URL you've used for APP_URL. Do these differ?

@ssddanbrown commented on GitHub (Nov 26, 2022): Okay, in that configuration, can you load BookStack (In its broken design state). View the page source (Right click page > View source). Find the lines towards the top (About 20 lines down) that look something like this: ```html <!-- Styles and Fonts --> <link rel="stylesheet" href="URL_HERE"> ``` Look at the `href` value in the second line of that part, and compare exactly to the URL you've used for `APP_URL`. Do these differ?
Author
Owner

@9ieR commented on GitHub (Nov 26, 2022):

Oh hey! It worked. But I'm still not satisfied because it's still not working in the way I wanted it to. I also want to know what's the cause of it.

When I changed the APP_URL in the compose file to http://X.X.X.X:6875, it started working normally. But what if I just to use the domain name? Like docs.something.com. How can I make it so?

@9ieR commented on GitHub (Nov 26, 2022): Oh hey! It worked. But I'm still not satisfied because it's still not working in the way I wanted it to. I also want to know what's the cause of it. When I changed the APP_URL in the compose file to `http://X.X.X.X:6875`, it started working normally. But what if I just to use the domain name? Like `docs.something.com`. How can I make it so?
Author
Owner

@ssddanbrown commented on GitHub (Nov 26, 2022):

@9ieR From the perspective of the BookStack, and the linuxserver.io image, you just need to set your APP_URL to be http://docs.something.com, but networking would need to be in place so requests to the domain on port 80 are routed to the container as expected.

It it helps, I created a full end-to-end video for using the linuxserver image and setting it up on a domain with HTTPS:
https://www.youtube.com/watch?v=dbDzPIv8Cf8

@ssddanbrown commented on GitHub (Nov 26, 2022): @9ieR From the perspective of the BookStack, and the linuxserver.io image, you just need to set your `APP_URL` to be `http://docs.something.com`, but networking would need to be in place so requests to the domain on port 80 are routed to the container as expected. It it helps, I created a full end-to-end video for using the linuxserver image and setting it up on a domain with HTTPS: https://www.youtube.com/watch?v=dbDzPIv8Cf8
Author
Owner

@9ieR commented on GitHub (Nov 26, 2022):

@ssddanbrown
Thanks a ton. I'm checking it out.

By the way, am I supposed to close this issue now? This is my first time creating an issue on github. I'll just open a new one if something isn't working. I can right?

@9ieR commented on GitHub (Nov 26, 2022): @ssddanbrown Thanks a ton. I'm checking it out. By the way, am I supposed to close this issue now? This is my first time creating an issue on github. I'll just open a new one if something isn't working. I can right?
Author
Owner

@ssddanbrown commented on GitHub (Nov 26, 2022):

Yeah, If there's nothing further to discuss here this can be closed off, I'll go ahead and do this.
If preferred, there's also a help/support channel in our discord server. Can be a little easier to request support there and often more people active there to help out.

@ssddanbrown commented on GitHub (Nov 26, 2022): Yeah, If there's nothing further to discuss here this can be closed off, I'll go ahead and do this. If preferred, there's also a help/support channel [in our discord server](https://discord.gg/ztkBqR2). Can be a little easier to request support there and often more people active there to help out.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#3366