Unable to connect to site after docker creation #5462

Open
opened 2026-02-05 10:05:03 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @varadins on GitHub (Oct 15, 2025).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

I have installed bookstack using a docker compose template. I am not able to access the site "Unable to connect"
The logs do not show anything amazing. Could you please assist?

docker-compose.yml
version: '3'
services:
  bookstack:
    image: solidnerd/bookstack
    container_name: bookstack
    restart: always
    ports:
      - "6875:80"
    volumes:
      - ./data:/var/www/html/public/uploads
      - ./env:/var/www/html/.env
    environment:
      - PUID=1000
      - PGID=1000
      - APP_URL=http://localhost:6875
      - APP_KEY=h9KWnvTxXLWnb8npzxhMC5jokddadoMM
      - DB_HOST=db
      - DB_DATABASE=bookstack
      - DB_USERNAME=bookstack_user
      - DB_PASSWORD=secret
    depends_on:
      - db
  db:
    image: mysql:5.7
    container_name: bookstack-mysql
    restart: always
    environment:
      - MYSQL_DATABASE=bookstack
      - MYSQL_USER=bookstack_user
      - MYSQL_PASSWORD=secret
      - MYSQL_RANDOM_ROOT_PASSWORD=yes
    volumes:
      - ./db:/var/lib/mysql

env file

APP_NAME=BookStack
APP_ENV=production
APP_DEBUG=false
APP_LOG=daily
APP_URL=http://localhost:6875
APP_KEY=base64:NNuRx8SxDwiPES2c0ZAftX7iV0EOx41VZJHwSwIlNy8=
DB_CONNECTION=mysql
DB_HOST=db
DB_PORT=3306
DB_DATABASE=bookstack
DB_USERNAME=bookstack_user
DB_PASSWORD=secret

MAIL_DRIVER=log

Log files:

docker@docker:~/docker/bookstack$ docker logs bookstack
wait-for-db: waiting for db:3306
wait-for-db: done
Starting Migration...

   INFO  Nothing to migrate.  

Clearing caches...

   INFO  Application cache cleared successfully.  


   INFO  Compiled views cleared successfully.  

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.128.3. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.128.3. Set the 'ServerName' directive globally to suppress this message
[Tue Oct 14 23:12:50.149778 2025] [mpm_prefork:notice] [pid 1:tid 1] AH00163: Apache/2.4.65 (Debian) PHP/8.4.13 configured -- resuming normal operations
[Tue Oct 14 23:12:50.149822 2025] [core:notice] [pid 1:tid 1] AH00094: Command line: 'apache2 -D FOREGROUND'

Exact BookStack Version

latest

Log Content


Hosting Environment

Docker compose Ubuntu 24.04.3 LTS

Originally created by @varadins on GitHub (Oct 15, 2025). ### Attempted Debugging - [x] I have read the debugging page ### Searched GitHub Issues - [x] I have searched GitHub for the issue. ### Describe the Scenario I have installed bookstack using a docker compose template. I am not able to access the site "Unable to connect" The logs do not show anything amazing. Could you please assist? ``` docker-compose.yml version: '3' services: bookstack: image: solidnerd/bookstack container_name: bookstack restart: always ports: - "6875:80" volumes: - ./data:/var/www/html/public/uploads - ./env:/var/www/html/.env environment: - PUID=1000 - PGID=1000 - APP_URL=http://localhost:6875 - APP_KEY=h9KWnvTxXLWnb8npzxhMC5jokddadoMM - DB_HOST=db - DB_DATABASE=bookstack - DB_USERNAME=bookstack_user - DB_PASSWORD=secret depends_on: - db db: image: mysql:5.7 container_name: bookstack-mysql restart: always environment: - MYSQL_DATABASE=bookstack - MYSQL_USER=bookstack_user - MYSQL_PASSWORD=secret - MYSQL_RANDOM_ROOT_PASSWORD=yes volumes: - ./db:/var/lib/mysql ``` env file ``` APP_NAME=BookStack APP_ENV=production APP_DEBUG=false APP_LOG=daily APP_URL=http://localhost:6875 APP_KEY=base64:NNuRx8SxDwiPES2c0ZAftX7iV0EOx41VZJHwSwIlNy8= DB_CONNECTION=mysql DB_HOST=db DB_PORT=3306 DB_DATABASE=bookstack DB_USERNAME=bookstack_user DB_PASSWORD=secret MAIL_DRIVER=log ``` Log files: ``` docker@docker:~/docker/bookstack$ docker logs bookstack wait-for-db: waiting for db:3306 wait-for-db: done Starting Migration... INFO Nothing to migrate. Clearing caches... INFO Application cache cleared successfully. INFO Compiled views cleared successfully. AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.128.3. Set the 'ServerName' directive globally to suppress this message AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.128.3. Set the 'ServerName' directive globally to suppress this message [Tue Oct 14 23:12:50.149778 2025] [mpm_prefork:notice] [pid 1:tid 1] AH00163: Apache/2.4.65 (Debian) PHP/8.4.13 configured -- resuming normal operations [Tue Oct 14 23:12:50.149822 2025] [core:notice] [pid 1:tid 1] AH00094: Command line: 'apache2 -D FOREGROUND' ``` ### Exact BookStack Version latest ### Log Content ```text ``` ### Hosting Environment Docker compose Ubuntu 24.04.3 LTS
OVERLORD added the 🐕 Support label 2026-02-05 10:05:03 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Oct 16, 2025):

Hi @varadins,

How exactly are you trying to connect to view the instance?
Is docker running on a remote server or the same machine as you're attempting access in the browser?

@ssddanbrown commented on GitHub (Oct 16, 2025): Hi @varadins, How exactly are you trying to connect to view the instance? Is docker running on a remote server or the same machine as you're attempting access in the browser?
Author
Owner

@varadins commented on GitHub (Oct 16, 2025):

Docker is running on another machine 192.168.1.101 and I am trying to browse to it from another workstation. I can access any of my other docker instances.

When attempting to connect to it from the local machine - I attempt 127.0.0.1:6875 and get a connection reset.

I noticed I have two different app_key's in my docker-compose.yml and env file - could that cause an issue? Which one should I keep?

@varadins commented on GitHub (Oct 16, 2025): Docker is running on another machine 192.168.1.101 and I am trying to browse to it from another workstation. I can access any of my other docker instances. When attempting to connect to it from the local machine - I attempt 127.0.0.1:6875 and get a connection reset. I noticed I have two different app_key's in my docker-compose.yml and env file - could that cause an issue? Which one should I keep?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5462