missing images #3720

Closed
opened 2026-02-05 07:14:01 +03:00 by OVERLORD · 14 comments
Owner

Originally created by @rgkirch on GitHub (Mar 31, 2023).

Describe the Bug

I had previously uploaded two images to a page via ctrl+v paste. Now, they're gone.
image
Page Revisions shows this
image
and if I click on changes I just see this
image
If I click on one I'm taken to this url http://bookstack.server.local/uploads/images/gallery/2023-03/VUI7BkxJT7HeMXiQ-image.png
And searching the filesystem gives me:

find . -iname VUI7BkxJT7HeMXiQ-image.png
./public/images/gallery/2023-03/thumbs-150-150/VUI7BkxJT7HeMXiQ-image.png
./public/images/gallery/2023-03/scaled-1680-/VUI7BkxJT7HeMXiQ-image.png
./public/images/gallery/2023-03/VUI7BkxJT7HeMXiQ-image.png

Steps to Reproduce

umm. upload images. come back later. idk.

Expected Behaviour

see my pictures

Screenshots or Additional Context

No response

Browser Details

chrome 111.0.5563.65 windows 10

Exact BookStack Version

BookStack v23.02.1

PHP Version

8.2.3

Hosting Environment

solidnerd/bookstack:23.2.1

Originally created by @rgkirch on GitHub (Mar 31, 2023). ### Describe the Bug I had previously uploaded two images to a page via ctrl+v paste. Now, they're gone. ![image](https://user-images.githubusercontent.com/6143833/229119831-8ff6052e-b537-4f8c-8479-6089a6c94552.png) Page Revisions shows this ![image](https://user-images.githubusercontent.com/6143833/229119935-299427df-721c-44a5-9c56-a3f37b294a76.png) and if I click on _changes_ I just see this ![image](https://user-images.githubusercontent.com/6143833/229120126-ea819608-d5fd-460b-b0af-b0abc3fbfc0f.png) If I click on one I'm taken to this url `http://bookstack.server.local/uploads/images/gallery/2023-03/VUI7BkxJT7HeMXiQ-image.png` And searching the filesystem gives me: ``` find . -iname VUI7BkxJT7HeMXiQ-image.png ./public/images/gallery/2023-03/thumbs-150-150/VUI7BkxJT7HeMXiQ-image.png ./public/images/gallery/2023-03/scaled-1680-/VUI7BkxJT7HeMXiQ-image.png ./public/images/gallery/2023-03/VUI7BkxJT7HeMXiQ-image.png ``` ### Steps to Reproduce umm. upload images. come back later. idk. ### Expected Behaviour see my pictures ### Screenshots or Additional Context _No response_ ### Browser Details chrome 111.0.5563.65 windows 10 ### Exact BookStack Version BookStack v23.02.1 ### PHP Version 8.2.3 ### Hosting Environment solidnerd/bookstack:23.2.1
OVERLORD added the 🐛 Bug label 2026-02-05 07:14:01 +03:00
Author
Owner

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

Hi @rgkirch,
How are you managing docker in this environment? Do you perhaps have a docker-compose.yml you can share to show how everything is configured?

Additionally, have you at all set any file storage options for BookStack (as a docker environment variable or set in an .env file)?

@ssddanbrown commented on GitHub (Apr 1, 2023): Hi @rgkirch, How are you managing docker in this environment? Do you perhaps have a `docker-compose.yml` you can share to show how everything is configured? Additionally, have you at all set any file storage options for BookStack (as a docker environment variable or set in an `.env` file)?
Author
Owner

@rgkirch commented on GitHub (Apr 2, 2023):

    "bookstack": {
      "mem_limit": "500M",
      "labels": {
        "net.unraid.docker.icon": "https://raw.githubusercontent.com/BookStackApp/BookStack/development/public/icon.png",
        "traefik.enable": "true",
        "traefik.http.services.bookstack.loadbalancer.server.port": "8080",
        "traefik.http.routers.bookstack.rule": "Host(`bookstack.my-subdomain.duckdns.org`)",
        "traefik.docker.network": "bookstack"
      },
      "restart": "always",
      "cpu_count": 1,
      "depends_on": [
        "bookstack-db"
      ],
      "volumes": [
        "/mnt/user/appdata/bookstack/public:/var/www/bookstack/public/uploads",
        "/mnt/user/appdata/bookstack/storage:/var/www/bookstack/storage/uploads"
      ],
      "logging": {
        "driver": "local"
      },
      "networks": [
        "bookstack"
      ],
      "container_name": "bookstack",
      "image": "solidnerd/bookstack:23.2.1",
      "environment": {
        "TZ": "America/New_York",
        "DB_HOST": "bookstack-db:3306",
        "DB_DATABASE": "bookstack",
        "DB_USERNAME": "bookstack",
        "DB_PASSWORD": "password",
        "APP_URL": "https://bookstack.my-subdomain.duckdns.org",
        "APP_DEBUG": "true"
      },
      "user": "33:33"
    },
    "bookstack-db": {
      "mem_limit": "500M",
      "restart": "always",
      "cpu_count": 1,
      "volumes": [
        "/mnt/user/appdata/bookstack-db:/var/lib/mysql"
      ],
      "logging": {
        "driver": "local"
      },
      "networks": [
        "bookstack"
      ],
      "container_name": "bookstack-db",
      "image": "mysql:8.0",
      "environment": {
        "TZ": "America/New_York",
        "PGID": "100",
        "PUID": "99",
        "MYSQL_ROOT_PASSWORD": "password",
        "MYSQL_DATABASE": "bookstack",
        "MYSQL_USER": "bookstack",
        "MYSQL_PASSWORD": "password"
      }
    }

I don't think I have set any storage options but here's the environment.

# docker compose exec bookstack env
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=be65d8f4ce9c
TERM=xterm
DB_HOST=bookstack-db:3306
DB_DATABASE=bookstack
DB_USERNAME=bookstack
DB_PASSWORD=password
APP_URL=https://bookstack.my-subdomain.duckdns.org
APP_DEBUG=true
TZ=place
PHPIZE_DEPS=autoconf            dpkg-dev                file            g++             gcc             libc-dev                makepkg-config               re2c
PHP_INI_DIR=/usr/local/etc/php
APACHE_CONFDIR=/etc/apache2
APACHE_ENVVARS=/etc/apache2/envvars
PHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
PHP_LDFLAGS=-Wl,-O1 -pie
GPG_KEYS=thing thing thing
PHP_VERSION=8.2.3
PHP_URL=https://www.php.net/distributions/php-8.2.3.tar.xz
PHP_ASC_URL=https://www.php.net/distributions/php-8.2.3.tar.xz.asc
PHP_SHA256=b9b566686e351125d67568a33291650eb8dfa26614d205d70d82e6e92613d457
RUN_APACHE_USER=www-data
RUN_APACHE_GROUP=www-data
HOME=/var/www

I hope this helps. Let me know if I've left anything out. Thanks!

@rgkirch commented on GitHub (Apr 2, 2023): ``` "bookstack": { "mem_limit": "500M", "labels": { "net.unraid.docker.icon": "https://raw.githubusercontent.com/BookStackApp/BookStack/development/public/icon.png", "traefik.enable": "true", "traefik.http.services.bookstack.loadbalancer.server.port": "8080", "traefik.http.routers.bookstack.rule": "Host(`bookstack.my-subdomain.duckdns.org`)", "traefik.docker.network": "bookstack" }, "restart": "always", "cpu_count": 1, "depends_on": [ "bookstack-db" ], "volumes": [ "/mnt/user/appdata/bookstack/public:/var/www/bookstack/public/uploads", "/mnt/user/appdata/bookstack/storage:/var/www/bookstack/storage/uploads" ], "logging": { "driver": "local" }, "networks": [ "bookstack" ], "container_name": "bookstack", "image": "solidnerd/bookstack:23.2.1", "environment": { "TZ": "America/New_York", "DB_HOST": "bookstack-db:3306", "DB_DATABASE": "bookstack", "DB_USERNAME": "bookstack", "DB_PASSWORD": "password", "APP_URL": "https://bookstack.my-subdomain.duckdns.org", "APP_DEBUG": "true" }, "user": "33:33" }, "bookstack-db": { "mem_limit": "500M", "restart": "always", "cpu_count": 1, "volumes": [ "/mnt/user/appdata/bookstack-db:/var/lib/mysql" ], "logging": { "driver": "local" }, "networks": [ "bookstack" ], "container_name": "bookstack-db", "image": "mysql:8.0", "environment": { "TZ": "America/New_York", "PGID": "100", "PUID": "99", "MYSQL_ROOT_PASSWORD": "password", "MYSQL_DATABASE": "bookstack", "MYSQL_USER": "bookstack", "MYSQL_PASSWORD": "password" } } ``` I don't think I have set any storage options but here's the environment. ``` # docker compose exec bookstack env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin HOSTNAME=be65d8f4ce9c TERM=xterm DB_HOST=bookstack-db:3306 DB_DATABASE=bookstack DB_USERNAME=bookstack DB_PASSWORD=password APP_URL=https://bookstack.my-subdomain.duckdns.org APP_DEBUG=true TZ=place PHPIZE_DEPS=autoconf dpkg-dev file g++ gcc libc-dev makepkg-config re2c PHP_INI_DIR=/usr/local/etc/php APACHE_CONFDIR=/etc/apache2 APACHE_ENVVARS=/etc/apache2/envvars PHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 PHP_LDFLAGS=-Wl,-O1 -pie GPG_KEYS=thing thing thing PHP_VERSION=8.2.3 PHP_URL=https://www.php.net/distributions/php-8.2.3.tar.xz PHP_ASC_URL=https://www.php.net/distributions/php-8.2.3.tar.xz.asc PHP_SHA256=b9b566686e351125d67568a33291650eb8dfa26614d205d70d82e6e92613d457 RUN_APACHE_USER=www-data RUN_APACHE_GROUP=www-data HOME=/var/www ``` I hope this helps. Let me know if I've left anything out. Thanks!
Author
Owner

@rgkirch commented on GitHub (Apr 2, 2023):

    "traefik": {
      "mem_limit": "500m",
      "labels": {
        "traefik.enable": "true",
        "traefik.http.routers.dashboard.rule": "Host(`traefik.my-subdomain.duckdns.org`)",
        "traefik.http.routers.dashboard.entryPoints": "websecure",
        "traefik.http.routers.dashboard.tls": "websecure",
        "traefik.http.routers.dashboard.service": "api@internal",
        "traefik.http.routers.ping.rule": "Host(`ping.my-subdomain.duckdns.org`)",
        "traefik.http.routers.ping.service": "ping@internal"
      },
      "restart": "always",
      "cpu_count": 4,
      "cap_add": [
        "NET_BIND_SERVICE"
      ],
      "command": [
        "--log.level=DEBUG",
        "--log=true",
        "--providers.docker=true",
        "--providers.docker.endpoint=tcp://docker-socket-proxy:2375",
        "--providers.docker.network=traefik",
        "--providers.docker.exposedbydefault=false",
        "--entrypoints.web.address=:80/tcp",
        "--entrypoints.web.http.redirections.entryPoint.to=websecure",
        "--entryPoints.web.http.redirections.entryPoint.scheme=https",
        "--entryPoints.web.forwardedHeaders.insecure=false",
        "--entrypoints.websecure.address=:443/tcp",
        "--entryPoints.websecure.forwardedHeaders.insecure=false",
        "--entrypoints.websecure.http.tls.certResolver=le",
        "--entrypoints.websecure.http.tls.domains[0].main=my-subdomain.duckdns.org",
        "--entrypoints.websecure.http.tls.domains[0].sans=*.my-subdomain.duckdns.org",
        "--certificatesresolvers.le=true",
        "--certificatesresolvers.le.acme.storage=/traefik/acme.json",
        "--certificatesresolvers.le.acme.dnschallenge=true",
        "--certificatesresolvers.le.acme.dnschallenge.provider=duckdns",
        "--certificatesresolvers.le.acme.email=thing@proton.me",
        "--certificatesresolvers.le.acme.keytype=EC384",
        "--certificatesresolvers.le.acme.dnsChallenge.resolvers=1.1.1.1:53,8.8.8.8:53",
        "--providers.file.directory=/config/",
        "--api=true",
        "--api.dashboard=true",
        "--api.insecure=false",
        "--pilot.dashboard=false",
        "--global.sendAnonymousUsage=false",
        "--global.checkNewVersion=false",
        "--ping=true",
        "--ping.manualrouting=true",
        "--accesslog=true"
      ],
      "depends_on": {
        "docker-socket-proxy": {
          "condition": "service_healthy"
        }
      },
      "volumes": [
        "/mnt/user/appdata/traefik/data:/traefik",
        "/mnt/user/appdata/traefik/config:/config:ro",
        "/mnt/user/appdata/traefik/plugins-storage:/plugins-storage"
      ],
      "logging": {
        "driver": "local"
      },
      "networks": [
        "docker-socket-proxy",
        "bookstack",
        "traefik"
      ],
      "container_name": "traefik",
      "ports": [
        "80:80",
        "443:443"
      ],
      "image": "traefik:v2.9.9",
      "environment": {
        "DUCKDNS_TOKEN_FILE": "/config/duckdns-token"
      },
      "tmpfs": [
        "/tmp"
      ],
      "user": "99:100"
    },
    
@rgkirch commented on GitHub (Apr 2, 2023): ``` "traefik": { "mem_limit": "500m", "labels": { "traefik.enable": "true", "traefik.http.routers.dashboard.rule": "Host(`traefik.my-subdomain.duckdns.org`)", "traefik.http.routers.dashboard.entryPoints": "websecure", "traefik.http.routers.dashboard.tls": "websecure", "traefik.http.routers.dashboard.service": "api@internal", "traefik.http.routers.ping.rule": "Host(`ping.my-subdomain.duckdns.org`)", "traefik.http.routers.ping.service": "ping@internal" }, "restart": "always", "cpu_count": 4, "cap_add": [ "NET_BIND_SERVICE" ], "command": [ "--log.level=DEBUG", "--log=true", "--providers.docker=true", "--providers.docker.endpoint=tcp://docker-socket-proxy:2375", "--providers.docker.network=traefik", "--providers.docker.exposedbydefault=false", "--entrypoints.web.address=:80/tcp", "--entrypoints.web.http.redirections.entryPoint.to=websecure", "--entryPoints.web.http.redirections.entryPoint.scheme=https", "--entryPoints.web.forwardedHeaders.insecure=false", "--entrypoints.websecure.address=:443/tcp", "--entryPoints.websecure.forwardedHeaders.insecure=false", "--entrypoints.websecure.http.tls.certResolver=le", "--entrypoints.websecure.http.tls.domains[0].main=my-subdomain.duckdns.org", "--entrypoints.websecure.http.tls.domains[0].sans=*.my-subdomain.duckdns.org", "--certificatesresolvers.le=true", "--certificatesresolvers.le.acme.storage=/traefik/acme.json", "--certificatesresolvers.le.acme.dnschallenge=true", "--certificatesresolvers.le.acme.dnschallenge.provider=duckdns", "--certificatesresolvers.le.acme.email=thing@proton.me", "--certificatesresolvers.le.acme.keytype=EC384", "--certificatesresolvers.le.acme.dnsChallenge.resolvers=1.1.1.1:53,8.8.8.8:53", "--providers.file.directory=/config/", "--api=true", "--api.dashboard=true", "--api.insecure=false", "--pilot.dashboard=false", "--global.sendAnonymousUsage=false", "--global.checkNewVersion=false", "--ping=true", "--ping.manualrouting=true", "--accesslog=true" ], "depends_on": { "docker-socket-proxy": { "condition": "service_healthy" } }, "volumes": [ "/mnt/user/appdata/traefik/data:/traefik", "/mnt/user/appdata/traefik/config:/config:ro", "/mnt/user/appdata/traefik/plugins-storage:/plugins-storage" ], "logging": { "driver": "local" }, "networks": [ "docker-socket-proxy", "bookstack", "traefik" ], "container_name": "traefik", "ports": [ "80:80", "443:443" ], "image": "traefik:v2.9.9", "environment": { "DUCKDNS_TOKEN_FILE": "/config/duckdns-token" }, "tmpfs": [ "/tmp" ], "user": "99:100" }, ```
Author
Owner

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

Thanks @rgkirch for the info.

Do new image uploads currently work okay?

If so, I get the impression HTTPS may have been added after those images were uploaded?
If you open up one of the image (broken) URLs directly, are you able view it? If not, what about if you edit the URL in the browser to ensure it starts with https://?

@ssddanbrown commented on GitHub (Apr 3, 2023): Thanks @rgkirch for the info. Do new image uploads currently work okay? If so, I get the impression HTTPS may have been added after those images were uploaded? If you open up one of the image (broken) URLs directly, are you able view it? If not, what about if you edit the URL in the browser to ensure it starts with `https://`?
Author
Owner

@rgkirch commented on GitHub (Apr 6, 2023):

New ones work, yea. I think you're exactly right. I'm 99% sure that I uploaded those images before I switched from http to https. No, neither the http nor the https version of the link loads.

@rgkirch commented on GitHub (Apr 6, 2023): New ones work, yea. I think you're exactly right. I'm 99% sure that I uploaded those images before I switched from http to https. No, neither the http nor the https version of the link loads.
Author
Owner

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

No, neither the http nor the https version of the link loads.

Ah, okay, that's annoying then. Though it would just be a https/http change issue but if you can't see them when manually changing the image URL to https then it's likely not that.

Might be worth looking into your mounted folder, and find both new (working) and old (non-working) images then check their permissions to compare, to see if there's any differences there. The permissions of the parent directories could also affect things.

Another thing to try, would be to take the stack down then bring it back up again from fresh containers, to see if the new images remain working, just to see if it's a nuance in that process.

@ssddanbrown commented on GitHub (Apr 6, 2023): > No, neither the http nor the https version of the link loads. Ah, okay, that's annoying then. Though it would just be a https/http change issue but if you can't see them when manually changing the image URL to https then it's likely not that. Might be worth looking into your mounted folder, and find both new (working) and old (non-working) images then check their permissions to compare, to see if there's any differences there. The permissions of the parent directories could also affect things. Another thing to try, would be to take the stack down then bring it back up again from fresh containers, to see if the new images remain working, just to see if it's a nuance in that process.
Author
Owner

@rgkirch commented on GitHub (Apr 6, 2023):

# docker compose stop bookstack bookstack-db
# docker compose rm -f bookstack bookstack-db
# docker compose up -d bookstack bookstack-db
version: '3.9'
services:
  traefik:
    mem_limit: 500M
    labels:
      traefik.enable: 'true'
      traefik.http.routers.dashboard.rule: Host(`traefik.my-subdomain.duckdns.org`)
      traefik.http.routers.dashboard.entryPoints: websecure
      traefik.http.routers.dashboard.tls: websecure
      traefik.http.routers.dashboard.service: api@internal
      traefik.http.routers.ping.rule: Host(`ping.my-subdomain.duckdns.org`)
      traefik.http.routers.ping.service: ping@internal
    restart: unless-stopped
    cpu_count: 1
    cap_add:
    - NET_BIND_SERVICE
    command:
    - --log.level=DEBUG
    - --log=true
    - --providers.docker=true
    - --providers.docker.endpoint=tcp://docker-socket-proxy:2375
    - --providers.docker.network=traefik
    - --providers.docker.exposedbydefault=false
    - --entrypoints.web.address=:80/tcp
    - --entrypoints.web.http.redirections.entryPoint.to=websecure
    - --entryPoints.web.http.redirections.entryPoint.scheme=https
    - --entryPoints.web.forwardedHeaders.insecure=false
    - --entrypoints.websecure.address=:443/tcp
    - --entryPoints.websecure.forwardedHeaders.insecure=false
    - --entrypoints.websecure.http.tls.certResolver=le
    - --entrypoints.websecure.http.tls.domains[0].main=my-subdomain.duckdns.org
    - --entrypoints.websecure.http.tls.domains[0].sans=*.my-subdomain.duckdns.org
    - --certificatesresolvers.le=true
    - --certificatesresolvers.le.acme.storage=/traefik/acme.json
    - --certificatesresolvers.le.acme.dnschallenge=true
    - --certificatesresolvers.le.acme.dnschallenge.provider=duckdns
    - --certificatesresolvers.le.acme.email=me@example.email
    - --certificatesresolvers.le.acme.keytype=EC384
    - --certificatesresolvers.le.acme.dnsChallenge.resolvers=1.1.1.1:53,8.8.8.8:53
    - --providers.file.directory=/config/
    - --api=true
    - --api.dashboard=true
    - --api.insecure=false
    - --pilot.dashboard=false
    - --global.sendAnonymousUsage=false
    - --global.checkNewVersion=false
    - --ping=true
    - --ping.manualrouting=true
    - --accesslog=true
    depends_on:
      docker-socket-proxy:
        condition: service_healthy
    volumes:
    - /mnt/user/appdata/traefik/data:/traefik
    - /mnt/user/appdata/traefik/config:/config:ro
    - /mnt/user/appdata/traefik/plugins-storage:/plugins-storage
    logging:
      driver: local
    networks:
    - bookstack
    - docker-socket-proxy
    - traefik
    container_name: traefik
    ports:
    - 80:80
    - 443:443
    image: traefik:v2.9.9
    environment:
      DUCKDNS_TOKEN_FILE: /config/duckdns-token
    tmpfs:
    - /tmp
    user: 99:100
  bookstack:
    mem_limit: 500M
    labels:
      net.unraid.docker.icon: https://raw.githubusercontent.com/BookStackApp/BookStack/development/public/icon.png
      traefik.enable: 'true'
      traefik.http.services.bookstack.loadbalancer.server.port: '8080'
      traefik.http.routers.bookstack.rule: Host(`bookstack.my-subdomain.duckdns.org`)
      traefik.docker.network: bookstack
    restart: unless-stopped
    cpu_count: 1
    depends_on:
    - bookstack-db
    volumes:
    - /mnt/user/appdata/bookstack/public:/var/www/bookstack/public/uploads
    - /mnt/user/appdata/bookstack/storage:/var/www/bookstack/storage/uploads
    logging:
      driver: local
    networks:
    - bookstack
    container_name: bookstack
    image: solidnerd/bookstack:23.2.1
    environment:
      TZ: America/New_York
      DB_HOST: bookstack-db:3306
      DB_DATABASE: bookstack
      DB_USERNAME: bookstack
      DB_PASSWORD: password
      APP_URL: https://bookstack.my-subdomain.duckdns.org
      APP_DEBUG: 'true'
    user: '33:33'
  bookstack-db:
    mem_limit: 1000M
    restart: unless-stopped
    cpu_count: 1
    volumes:
    - /mnt/user/appdata/bookstack-db:/var/lib/mysql
    logging:
      driver: local
    networks:
    - bookstack
    container_name: bookstack-db
    image: mysql:8.0
    environment:
      TZ: America/New_York
      PGID: '100'
      PUID: '99'
      MYSQL_ROOT_PASSWORD: password
      MYSQL_DATABASE: bookstack
      MYSQL_USER: bookstack
      MYSQL_PASSWORD: password
networks:
  bookstack:
    internal: true
    driver: bridge
    name: bookstack
  docker-socket-proxy:
    name: docker-socket-proxy
    driver: bridge
    internal: true
    internal: true
  traefik:
    name: traefik
    driver: bridge

broken image

# find . -iname 12u5x6WmcEcpLD75-image.png | xargs -I {} ls -lah {}
-rw-r--r-- 1 sshd sshd 8.4K Mar 19 08:01 ./public/images/gallery/2023-03/thumbs-150-150/12u5x6WmcEcpLD75-image.png
-rw-r--r-- 1 sshd sshd 197K Mar 19 08:01 ./public/images/gallery/2023-03/scaled-1680-/12u5x6WmcEcpLD75-image.png
-rw-r--r-- 1 sshd sshd 197K Mar 19 08:01 ./public/images/gallery/2023-03/12u5x6WmcEcpLD75-image.png

working image

# find . -iname 9P4nuBCSYthXLQJU-image.png | xargs -I {} ls -lah {}
-rw-r--r-- 1 sshd sshd 14K Apr  1 22:50 ./public/images/gallery/2023-04/9P4nuBCSYthXLQJU-image.png
-rw-r--r-- 1 sshd sshd 9.0K Apr  1 22:50 ./public/images/gallery/2023-04/thumbs-150-150/9P4nuBCSYthXLQJU-image.png
-rw-r--r-- 1 sshd sshd 14K Apr  1 22:50 ./public/images/gallery/2023-04/scaled-1680-/9P4nuBCSYthXLQJU-image.png
# cat /etc/group | grep sshd
sshd:x:33:sshd
# cat /etc/passwd | grep sshd
sshd:x:33:33:sshd:/:/bin/false
@rgkirch commented on GitHub (Apr 6, 2023): ``` # docker compose stop bookstack bookstack-db # docker compose rm -f bookstack bookstack-db # docker compose up -d bookstack bookstack-db ``` ``` version: '3.9' services: traefik: mem_limit: 500M labels: traefik.enable: 'true' traefik.http.routers.dashboard.rule: Host(`traefik.my-subdomain.duckdns.org`) traefik.http.routers.dashboard.entryPoints: websecure traefik.http.routers.dashboard.tls: websecure traefik.http.routers.dashboard.service: api@internal traefik.http.routers.ping.rule: Host(`ping.my-subdomain.duckdns.org`) traefik.http.routers.ping.service: ping@internal restart: unless-stopped cpu_count: 1 cap_add: - NET_BIND_SERVICE command: - --log.level=DEBUG - --log=true - --providers.docker=true - --providers.docker.endpoint=tcp://docker-socket-proxy:2375 - --providers.docker.network=traefik - --providers.docker.exposedbydefault=false - --entrypoints.web.address=:80/tcp - --entrypoints.web.http.redirections.entryPoint.to=websecure - --entryPoints.web.http.redirections.entryPoint.scheme=https - --entryPoints.web.forwardedHeaders.insecure=false - --entrypoints.websecure.address=:443/tcp - --entryPoints.websecure.forwardedHeaders.insecure=false - --entrypoints.websecure.http.tls.certResolver=le - --entrypoints.websecure.http.tls.domains[0].main=my-subdomain.duckdns.org - --entrypoints.websecure.http.tls.domains[0].sans=*.my-subdomain.duckdns.org - --certificatesresolvers.le=true - --certificatesresolvers.le.acme.storage=/traefik/acme.json - --certificatesresolvers.le.acme.dnschallenge=true - --certificatesresolvers.le.acme.dnschallenge.provider=duckdns - --certificatesresolvers.le.acme.email=me@example.email - --certificatesresolvers.le.acme.keytype=EC384 - --certificatesresolvers.le.acme.dnsChallenge.resolvers=1.1.1.1:53,8.8.8.8:53 - --providers.file.directory=/config/ - --api=true - --api.dashboard=true - --api.insecure=false - --pilot.dashboard=false - --global.sendAnonymousUsage=false - --global.checkNewVersion=false - --ping=true - --ping.manualrouting=true - --accesslog=true depends_on: docker-socket-proxy: condition: service_healthy volumes: - /mnt/user/appdata/traefik/data:/traefik - /mnt/user/appdata/traefik/config:/config:ro - /mnt/user/appdata/traefik/plugins-storage:/plugins-storage logging: driver: local networks: - bookstack - docker-socket-proxy - traefik container_name: traefik ports: - 80:80 - 443:443 image: traefik:v2.9.9 environment: DUCKDNS_TOKEN_FILE: /config/duckdns-token tmpfs: - /tmp user: 99:100 bookstack: mem_limit: 500M labels: net.unraid.docker.icon: https://raw.githubusercontent.com/BookStackApp/BookStack/development/public/icon.png traefik.enable: 'true' traefik.http.services.bookstack.loadbalancer.server.port: '8080' traefik.http.routers.bookstack.rule: Host(`bookstack.my-subdomain.duckdns.org`) traefik.docker.network: bookstack restart: unless-stopped cpu_count: 1 depends_on: - bookstack-db volumes: - /mnt/user/appdata/bookstack/public:/var/www/bookstack/public/uploads - /mnt/user/appdata/bookstack/storage:/var/www/bookstack/storage/uploads logging: driver: local networks: - bookstack container_name: bookstack image: solidnerd/bookstack:23.2.1 environment: TZ: America/New_York DB_HOST: bookstack-db:3306 DB_DATABASE: bookstack DB_USERNAME: bookstack DB_PASSWORD: password APP_URL: https://bookstack.my-subdomain.duckdns.org APP_DEBUG: 'true' user: '33:33' bookstack-db: mem_limit: 1000M restart: unless-stopped cpu_count: 1 volumes: - /mnt/user/appdata/bookstack-db:/var/lib/mysql logging: driver: local networks: - bookstack container_name: bookstack-db image: mysql:8.0 environment: TZ: America/New_York PGID: '100' PUID: '99' MYSQL_ROOT_PASSWORD: password MYSQL_DATABASE: bookstack MYSQL_USER: bookstack MYSQL_PASSWORD: password networks: bookstack: internal: true driver: bridge name: bookstack docker-socket-proxy: name: docker-socket-proxy driver: bridge internal: true internal: true traefik: name: traefik driver: bridge ``` broken image ``` # find . -iname 12u5x6WmcEcpLD75-image.png | xargs -I {} ls -lah {} -rw-r--r-- 1 sshd sshd 8.4K Mar 19 08:01 ./public/images/gallery/2023-03/thumbs-150-150/12u5x6WmcEcpLD75-image.png -rw-r--r-- 1 sshd sshd 197K Mar 19 08:01 ./public/images/gallery/2023-03/scaled-1680-/12u5x6WmcEcpLD75-image.png -rw-r--r-- 1 sshd sshd 197K Mar 19 08:01 ./public/images/gallery/2023-03/12u5x6WmcEcpLD75-image.png ``` working image ``` # find . -iname 9P4nuBCSYthXLQJU-image.png | xargs -I {} ls -lah {} -rw-r--r-- 1 sshd sshd 14K Apr 1 22:50 ./public/images/gallery/2023-04/9P4nuBCSYthXLQJU-image.png -rw-r--r-- 1 sshd sshd 9.0K Apr 1 22:50 ./public/images/gallery/2023-04/thumbs-150-150/9P4nuBCSYthXLQJU-image.png -rw-r--r-- 1 sshd sshd 14K Apr 1 22:50 ./public/images/gallery/2023-04/scaled-1680-/9P4nuBCSYthXLQJU-image.png ``` ``` # cat /etc/group | grep sshd sshd:x:33:sshd # cat /etc/passwd | grep sshd sshd:x:33:33:sshd:/:/bin/false ```
Author
Owner

@rgkirch commented on GitHub (Apr 6, 2023):

Oh, I need to expose a port to test http or reconfigure traefik. Currently traefik redirects to https.

@rgkirch commented on GitHub (Apr 6, 2023): Oh, I need to expose a port to test http or reconfigure traefik. Currently traefik redirects to https.
Author
Owner

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

Also worth checking the permissions of the 2023-03 and 2023-04 folders within the paths, just in case the 2023-03 folder lacks execute or read permissions.

@ssddanbrown commented on GitHub (Apr 7, 2023): Also worth checking the permissions of the `2023-03` and `2023-04` folders within the paths, just in case the `2023-03` folder lacks execute or read permissions.
Author
Owner

@rgkirch commented on GitHub (Apr 13, 2023):

I just noticed that the link is pointing to https://bookstack.tower.local/uploads/images/gallery/2023-03/VUI7BkxJT7HeMXiQ-image.png while I have since changed to bookstack.my-subdomain.duckdns.org. I can't remember but when I look at older commits, I think I wasn't setting APP_URL in the environment until I started setting it to bookstack.my-subdomain.duckdns.org to fix a "Mixed Content" error. If I visit https://bookstack.my-subdomain.duckdns.org/uploads/images/gallery/2023-03/VUI7BkxJT7HeMXiQ-image.png in the browser then I see the image but when I edit the link it doesn't fix it.

@rgkirch commented on GitHub (Apr 13, 2023): I just noticed that the link is pointing to `https://bookstack.tower.local/uploads/images/gallery/2023-03/VUI7BkxJT7HeMXiQ-image.png` while I have since changed to `bookstack.my-subdomain.duckdns.org`. I can't remember but when I look at older commits, I think I wasn't setting `APP_URL` in the environment until I started setting it to bookstack.my-subdomain.duckdns.org to fix a "Mixed Content" error. If I visit `https://bookstack.my-subdomain.duckdns.org/uploads/images/gallery/2023-03/VUI7BkxJT7HeMXiQ-image.png` in the browser then I see the image but when I edit the link it doesn't fix it.
Author
Owner

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

It sounds like you have old URL references in the database from when you changed it.
We have an "Update System URL" command which will address all such existing URLs within content:
https://www.bookstackapp.com/docs/admin/commands/#update-system-url

@ssddanbrown commented on GitHub (Apr 17, 2023): It sounds like you have old URL references in the database from when you changed it. We have an "Update System URL" command which will address all such existing URLs within content: https://www.bookstackapp.com/docs/admin/commands/#update-system-url
Author
Owner

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

Since there's been no further follow up on this I'll close it off.

@ssddanbrown commented on GitHub (Apr 28, 2023): Since there's been no further follow up on this I'll close it off.
Author
Owner

@rgkirch commented on GitHub (Apr 29, 2023):

Mb. I haven’t gotten back to this.

On Fri, Apr 28, 2023 at 2:35 PM, Dan Brown @.***(mailto:On Fri, Apr 28, 2023 at 2:35 PM, Dan Brown < wrote:

Since there's been no further follow up on this I'll close it off.


Reply to this email directly,
view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: @.***>

@rgkirch commented on GitHub (Apr 29, 2023): Mb. I haven’t gotten back to this. On Fri, Apr 28, 2023 at 2:35 PM, Dan Brown ***@***.***(mailto:On Fri, Apr 28, 2023 at 2:35 PM, Dan Brown <<a href=)> wrote: > Since there's been no further follow up on this I'll close it off. > > — > Reply to this email directly, [view it on GitHub](https://github.com/BookStackApp/BookStack/issues/4146#issuecomment-1527945539), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/ABO36WMXMYOC66RV2NS4ICDXDQEY3ANCNFSM6AAAAAAWOURN3Q). > You are receiving this because you were mentioned.Message ID: ***@***.***>
Author
Owner

@colossalsquids commented on GitHub (Jan 21, 2025):

It sounds like you have old URL references in the database from when you changed it. We have an "Update System URL" command which will address all such existing URLs within content: https://www.bookstackapp.com/docs/admin/commands/#update-system-url

Thanks @ssddanbrown, this resolved it for me. I recently set up DNS and SSL for my internal services and as such updated the URL for Bookstack (used to access just over IP).

All I had to do was hop in the running container, navigate to the installation directory (/app/www/) and run the command you linked. It spat out the following, and afterwards all my "image.png" links where replaced with the embedded images again.

Image

@colossalsquids commented on GitHub (Jan 21, 2025): > It sounds like you have old URL references in the database from when you changed it. We have an "Update System URL" command which will address all such existing URLs within content: https://www.bookstackapp.com/docs/admin/commands/#update-system-url Thanks @ssddanbrown, this resolved it for me. I recently set up DNS and SSL for my internal services and as such updated the URL for Bookstack (used to access just over IP). All I had to do was hop in the running container, navigate to the installation directory (/app/www/) and run the command you linked. It spat out the following, and afterwards all my "image.png" links where replaced with the embedded images again. ![Image](https://github.com/user-attachments/assets/8882c39f-7ccd-4114-85b3-5493820bb40b)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#3720