Skip to content

Some logo paths are not being updated, when changing APP_URL #5744

@Tomblarom

Description

@Tomblarom

Describe the Bug

I set up Bookstack using docker and found out, that I'd need https for using SAML with Microsoft Azure. I set up a reverse proxy, with valid https. But when I switched the APP_URL in my docker-compose.yaml from http://example.com:1000 to https://book.example.com, it broke the paths of some media files:

Image
Logo: <img class="logo-image" src="http://example.com:1000/uploads/images/system/2025-07/XJpfavicon.png" alt="Logo">

Favicons: <link rel="icon" type="image/png" sizes="256x256" href="http://example.com:1000/uploads/images/system/2025-07/Pzmfavicon.png">

docker-compose.yaml

version: "3.8"
services:
  bookstack:
    image: lscr.io/linuxserver/bookstack:latest
    container_name: bookstack
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Zurich
      - APP_URL=https://book.example.com
      - APP_KEY=xxxx
      - APP_LANG=de_informal
      - DB_HOST=xxxx
      - DB_PORT=3306
      - DB_USERNAME=xxxx
      - DB_PASSWORD=xxxx
      - DB_DATABASE=bookstack_db
      - AUTH_METHOD=ldap # standard / ldap / saml2
      - LDAP_SERVER=example.com:389
      - LDAP_BASE_DN=xxxx
      - LDAP_DN=xxxx
      - LDAP_PASS=xxxx
      - LDAP_USER_FILTER=(&(mail={user}))
      - LDAP_VERSION=3
      - LDAP_ID_ATTRIBUTE=uid
      - LDAP_EMAIL_ATTRIBUTE=mail
      - LDAP_DISPLAY_NAME_ATTRIBUTE=givenname|sn
      - LDAP_THUMBNAIL_ATTRIBUTE=thumbnailPhoto # jpegphoto / thumbnailPhoto
      - LDAP_START_TLS=false
      - LDAP_USER_TO_GROUPS=true
      - LDAP_GROUP_ATTRIBUTE="memberOf"
      - LDAP_REMOVE_FROM_GROUPS=false
    volumes:
      - /home/user/bookstack/config:/config
    ports:
      - 1000:80
    restart: unless-stopped
    depends_on:
      - mariadb

  mariadb:
    image: mariadb:11.3
    container_name: bookstack_db
    environment:
      - MYSQL_ROOT_PASSWORD=xxxx
      - MYSQL_DATABASE=xxxx
      - MYSQL_USER=xxxx
      - MYSQL_PASSWORD=xxxx
    volumes:
      - /home/user/bookstack/db_data:/var/lib/mysql
    restart: unless-stopped

Steps to Reproduce

  1. Setup Bookstack using Docker and deploy
  2. Change APP_URL from http://example.com:1000 to https://book.example.com
  3. Redeploy
  4. Open view-source:https://book.example.com

Expected Behaviour

Update the path of the new APP_URL on every existing occurrence.

Browser Details

Google Chrome 138.0.7204.101 (Official Build) (64-bit)

Exact BookStack Version

v25.07

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions