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

Closed
opened 2026-02-05 10:01:40 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @Tomblarom on GitHub (Jul 31, 2025).

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

Originally created by @Tomblarom on GitHub (Jul 31, 2025). ### 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: <img width="528" height="378" alt="Image" src="https://github.com/user-attachments/assets/4e64034a-9435-4da5-a5f3-41a4dc66d711" /> ``` 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 <details> ``` 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 ``` </details> ### 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
OVERLORD added the 🐛 Bug label 2026-02-05 10:01:40 +03:00
Author
Owner

@Tomblarom commented on GitHub (Jul 31, 2025):

Ok solved.. RTFM 🤦🏻‍♂️ Admin Documentation -> Commands -> Update System URL

user@server:~ $ sudo docker exec -it bookstack php /app/www/artisan bookstack:update-url "http://example.com:1000" "https://book.example.com"
 This will search for "http://example.com:1000" in your database and replace it with  "https://book.example.com.
Are you sure you want to proceed? (yes/no) [no]:
 > yes

 This operation could cause issues if used incorrectly. Have you made a backup of your existing database? (yes/no) [no]:
 > yes

Updated 0 rows in attachments->path
Updated 0 rows in pages->html
Updated 0 rows in pages->text
Updated 0 rows in pages->markdown
Updated 0 rows in chapters->description_html
Updated 0 rows in books->description_html
Updated 0 rows in bookshelves->description_html
Updated 0 rows in page_revisions->html
Updated 0 rows in page_revisions->text
Updated 0 rows in page_revisions->markdown
Updated 15 rows in images->url
Updated 6 rows in settings->value
Updated 0 rows in comments->html
Updated 0 rows in comments->text
Updated 0 JSON encoded rows in settings->value
URL update procedure complete.
============================================================================
Be sure to run "php artisan cache:clear" to clear any old URLs in the cache.
============================================================================
user@server:~ $ sudo docker exec -it bookstack php /app/www/artisan cache:clear

   INFO  Application cache cleared successfully.

user@server:~ $ 

@Tomblarom commented on GitHub (Jul 31, 2025): Ok solved.. RTFM 🤦🏻‍♂️ [Admin Documentation -> Commands -> Update System URL](https://www.bookstackapp.com/docs/admin/commands/#update-system-url) ``` user@server:~ $ sudo docker exec -it bookstack php /app/www/artisan bookstack:update-url "http://example.com:1000" "https://book.example.com" This will search for "http://example.com:1000" in your database and replace it with "https://book.example.com. Are you sure you want to proceed? (yes/no) [no]: > yes This operation could cause issues if used incorrectly. Have you made a backup of your existing database? (yes/no) [no]: > yes Updated 0 rows in attachments->path Updated 0 rows in pages->html Updated 0 rows in pages->text Updated 0 rows in pages->markdown Updated 0 rows in chapters->description_html Updated 0 rows in books->description_html Updated 0 rows in bookshelves->description_html Updated 0 rows in page_revisions->html Updated 0 rows in page_revisions->text Updated 0 rows in page_revisions->markdown Updated 15 rows in images->url Updated 6 rows in settings->value Updated 0 rows in comments->html Updated 0 rows in comments->text Updated 0 JSON encoded rows in settings->value URL update procedure complete. ============================================================================ Be sure to run "php artisan cache:clear" to clear any old URLs in the cache. ============================================================================ user@server:~ $ sudo docker exec -it bookstack php /app/www/artisan cache:clear INFO Application cache cleared successfully. user@server:~ $ ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5387