r/BookStack • u/BagCompetitive357 • Aug 29 '25
Cannot set up Bookstack behind Cloudflare Tunnels
Hi
I have difficulty installing and set up Bookstack behind Cloudflare Tunnels. I have a yaml file for an installation behind a reverse proxy that is working. I changed it for CF as below. On CF, I tried several possibilities including http://localhost:6875.
I searched a lot, and I don't seem to be able to find the issue. I understand Bookstack takes only one URL, and APPI_URL must be the external and internal access url. Each time a change is made, the containers and volumes are removed.
Could this be a caching problem in CF? Some people mention you have to wait 30 minutes after some changes.
How to check inside container that env variable APP_URL is correctly set (so that, the docker does not silently ignore the yaml file and fall back to local host)? I set the APP_DEBUG environment variable and nothing strange is reported.
Update It seems the application’s domain set in CF Tunnels should be a subdomain, but cannot be a sub-subdomain, in the free plan.
services:
bookstack:
image: lscr.io/linuxserver/bookstack:latest
container_name: bookstack
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- APP_URL=https://mydomain.cm
- APP_KEY=
- DB_HOST=bookstack_db
- DB_DATABASE=bookstackdbname
- DB_PORT=3306
- DB_USERNAME=bookstackuser
- DB_PASSWORD=
volumes:
- ./config:/config
ports:
- 6875:80
restart: unless-stopped
bookstack_db:
image: lscr.io/linuxserver/mariadb:latest
container_name: bookstack_db
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Paris
- MYSQL_ROOT_PASSWORD=
- MYSQL_DATABASE=bookstackdbname
- MYSQL_USER=bookstackuser
- MYSQL_PASSWORD=
volumes:
- ./db_config:/config
ports:
- 3308:3306
restart: unless-stopped
Thanks!
View all comments
Show parent comment
1
u/ssddanbrown Aug 29 '25
I'll test things out with CF tunnels when I get a moment.
Originally because of historical ease of editor implementation, since the URL/domain is saved within created content, but I've since doubled down on the advantages of that (using it in ways which allow us to fairly accurately detect references while keeping content in a standard portable format).