Migrating from storage_type local -> local_secure. Existing images aren't found. #3733

Closed
opened 2026-02-05 07:17:56 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @H-Toine on GitHub (Apr 7, 2023).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

I've been using Bookstack and have been very satisfied with it so far! I'm currently in the process of moving the bookstack docker container to another server (with a different URL), and changing the image storage from local to local_secure
Changing the url works fine, as I am able to use the php artisan update:url command to change the base urls of the images in the existing pages.

The issue arises when I'm trying to change the image storage to local_secure. I've tried following the steps in the documentation( https://www.bookstackapp.com/docs/admin/upload-config/#migrating-to-secure-images ), though the paths seem slightly different. I've moved the www/uploads folder contents to www/storage/uploads, but this leads to existing images not being visible.

Is there a way to change the existing images (local) to be stored as local_secure instead of reuploading every image and going through every page in bookstack?

Installation type: Docker
Version: BookStack v23.02.2

docker-compose.yml (simplified)

---
    version: "2"
    services:
      bookstack:
        image: lscr.io/linuxserver/bookstack
        container_name: bookstack
        environment:
          - PUID=1000
          - PGID=1000
          - APP_URL=https://myurl.mydomain.com/
          - DB_HOST=bookstack_db
          - DB_USER=dbuser
          - DB_PASS=dbpass
          - DB_DATABASE=bookstackapp
        volumes:
          - ./config:/config
        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=dbpass
          - TZ=Europe/Amsterdam
          - MYSQL_DATABASE=bookstackapp
          - MYSQL_USER=bookstack
          - MYSQL_PASSWORD=pass
        volumes:
          - ./mariadb:/config
        restart: unless-stopped

Exact BookStack Version

v23.02.2

Log Content

No response

PHP Version

8.1.17

Hosting Environment

Installation type: Docker (with docker-compose) using lscr.io/linuxserver/bookstack
Likely irrelevant, but the server uses an ISPConfig panel with Apache as a proxy to the docker container..

Originally created by @H-Toine on GitHub (Apr 7, 2023). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario I've been using Bookstack and have been very satisfied with it so far! I'm currently in the process of moving the bookstack docker container to another server (with a different URL), and changing the image storage from `local` to `local_secure` Changing the url works fine, as I am able to use the php artisan update:url command to change the base urls of the images in the existing pages. The issue arises when I'm trying to change the image storage to `local_secure`. I've tried following the steps in the documentation( https://www.bookstackapp.com/docs/admin/upload-config/#migrating-to-secure-images ), though the paths seem slightly different. I've moved the www/uploads folder contents to www/storage/uploads, but this leads to existing images not being visible. Is there a way to change the existing images (`local`) to be stored as `local_secure` instead of reuploading every image and going through every page in bookstack? Installation type: Docker Version: BookStack v23.02.2 docker-compose.yml (simplified) ```yaml --- version: "2" services: bookstack: image: lscr.io/linuxserver/bookstack container_name: bookstack environment: - PUID=1000 - PGID=1000 - APP_URL=https://myurl.mydomain.com/ - DB_HOST=bookstack_db - DB_USER=dbuser - DB_PASS=dbpass - DB_DATABASE=bookstackapp volumes: - ./config:/config 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=dbpass - TZ=Europe/Amsterdam - MYSQL_DATABASE=bookstackapp - MYSQL_USER=bookstack - MYSQL_PASSWORD=pass volumes: - ./mariadb:/config restart: unless-stopped ``` ### Exact BookStack Version v23.02.2 ### Log Content _No response_ ### PHP Version 8.1.17 ### Hosting Environment Installation type: Docker (with docker-compose) using lscr.io/linuxserver/bookstack Likely irrelevant, but the server uses an ISPConfig panel with Apache as a proxy to the docker container..
OVERLORD added the 🐕 Support label 2026-02-05 07:17:56 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Apr 7, 2023):

I've tried following the steps in the documentation ..., though the paths seem slightly different. I've moved the www/uploads folder contents to www/storage/uploads, but this leads to existing images not being visible.

Yeah, the linuxserver exposes the internal BookStack folders under different paths. Below is the current mapping:

  • Location within mounted /config folder => Normal BookStack filesystem location
  • www/files => storage/uploads/files
  • www/images => storage/uploads/images
  • www/themes => themes
  • www/uploads => public/uploads

So www/images is the correct images folder for local_secure (Instead of www/storage/uploads).

@ssddanbrown commented on GitHub (Apr 7, 2023): > I've tried following the steps in the documentation ..., though the paths seem slightly different. I've moved the www/uploads folder contents to www/storage/uploads, but this leads to existing images not being visible. Yeah, the linuxserver exposes the internal BookStack folders under different paths. Below is the current mapping: - **Location within mounted `/config` folder** => **Normal BookStack filesystem location** - `www/files` => `storage/uploads/files` - `www/images` => `storage/uploads/images` - `www/themes` => `themes` - `www/uploads` => `public/uploads` So `www/images` is the correct `images` folder for `local_secure` (Instead of `www/storage/uploads`).
Author
Owner

@H-Toine commented on GitHub (Apr 7, 2023):

Thank you Dan! After moving the images into the specified directories, every existing image was available again!

I'll close the issue, though it might be worth documenting this somewhere?

@H-Toine commented on GitHub (Apr 7, 2023): Thank you Dan! After moving the images into the specified directories, every existing image was available again! I'll close the issue, though it might be worth documenting this somewhere?
Author
Owner

@ssddanbrown commented on GitHub (Apr 7, 2023):

Good to hear that sorted things!

I'll close the issue, though it might be worth documenting this somewhere?

Yeah, probably is, but it's very specific to the linuxserver docker image, which is not under the scope of my responsibility, so is probably best suited to the linuxserver docker image readme if you were up for offering a PR.

@ssddanbrown commented on GitHub (Apr 7, 2023): Good to hear that sorted things! > I'll close the issue, though it might be worth documenting this somewhere? Yeah, probably is, but it's very specific to the linuxserver docker image, which is not under the scope of my responsibility, so is probably best suited to the [linuxserver docker image readme](https://github.com/linuxserver/docker-bookstack/blob/master/README.md) if you were up for offering a PR.
Author
Owner

@H-Toine commented on GitHub (Apr 7, 2023):

Yeah, probably is, but it's very specific to the linuxserver docker image, which is not under the scope of my responsibility, so is probably best suited to the linuxserver docker image readme if you were up for offering a PR.

Sure!

@H-Toine commented on GitHub (Apr 7, 2023): > Yeah, probably is, but it's very specific to the linuxserver docker image, which is not under the scope of my responsibility, so is probably best suited to the [linuxserver docker image readme](https://github.com/linuxserver/docker-bookstack/blob/master/README.md) if you were up for offering a PR. Sure!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#3733