Cannot get bookstack to load - Manual install #4811

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

Originally created by @Jeffrey-FB on GitHub (Jun 4, 2024).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

Really not sure where i have gone wrong here.
I've tried to setup bookstack with a existing database in AWS.
Database side of it looks all good.

I'm at the point where I'm trying to get a page.
but i get nothing.
I've tried repairing the permissions with not change.

Not sure what I'm missing happy to try anything?
even is there is an easy way to put my database info into a fresh install script.
i.e. [https://github.com/BookStackApp/devops/blob/main/scripts/installation-ubuntu-24.04.sh]

Exact BookStack Version

24.05.1

Log Content

Details

:/home/ubuntu# tail /var/log/nginx/bookstack.error.log
#2 /var/www/BookStack/vendor/monolog/monolog/src/Monolog/Logger.php(644): Monolog\Logger->addRecord()
#3 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Log/Logger.php(184): Monolog\Logger->error()
#4 /var/www/Boo...; PHP message: PHP Fatal error:  Uncaught UnexpectedValueException: The stream or file "/var/www/BookStack/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied
The exception occurred while attempting to log: file_put_contents(/var/www/BookStack/storage/framework/views/019b63655f0602243bf3829336bebd7f.php): Failed to open stream: Permission denied
Context: {"exception":{}} in /var/www/BookStack/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:137
Stack trace:
#0 /var/www/BookStack/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(44): Monolog\Handler\StreamHandler->write()
#1 /var/www/BookStack/vendor/monolog/monolog/src/Monolog/Logger.php(389): Monolog\Handler\AbstractProcessingHandler->handle()
#2 /var/www/BookStack/vendor/monolog/monolog/src/Monolog/Logger.php(644): Monolog\Logger->addRecord()
#3 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Log/Logger.ph

:/home/ubuntu# tail /var/www/BookStack/storage/logs/laravel.log
[stacktrace]
#0 /var/www/BookStack/vendor/symfony/console/Command/Command.php(321): Symfony\\Component\\Console\\Input\\Input->validate()
#1 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\\Component\\Console\\Command\\Command->run()
#2 /var/www/BookStack/vendor/symfony/console/Application.php(1096): Illuminate\\Console\\Command->run()
#3 /var/www/BookStack/vendor/symfony/console/Application.php(324): Symfony\\Component\\Console\\Application->doRunCommand()
#4 /var/www/BookStack/vendor/symfony/console/Application.php(175): Symfony\\Component\\Console\\Application->doRun()
#5 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(201): Symfony\\Component\\Console\\Application->run()
#6 /var/www/BookStack/artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle()
#7 {main}
"}

Hosting Environment

PHP8.3, Ubuntu 24.02, nginx 1.26.1, MariaDB

Originally created by @Jeffrey-FB on GitHub (Jun 4, 2024). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario Really not sure where i have gone wrong here. I've tried to setup bookstack with a existing database in AWS. Database side of it looks all good. I'm at the point where I'm trying to get a page. but i get nothing. I've tried repairing the permissions with not change. Not sure what I'm missing happy to try anything? even is there is an easy way to put my database info into a fresh install script. i.e. [https://github.com/BookStackApp/devops/blob/main/scripts/installation-ubuntu-24.04.sh] ### Exact BookStack Version 24.05.1 ### Log Content <details><summary>Details</summary> <p> ``` :/home/ubuntu# tail /var/log/nginx/bookstack.error.log #2 /var/www/BookStack/vendor/monolog/monolog/src/Monolog/Logger.php(644): Monolog\Logger->addRecord() #3 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Log/Logger.php(184): Monolog\Logger->error() #4 /var/www/Boo...; PHP message: PHP Fatal error: Uncaught UnexpectedValueException: The stream or file "/var/www/BookStack/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied The exception occurred while attempting to log: file_put_contents(/var/www/BookStack/storage/framework/views/019b63655f0602243bf3829336bebd7f.php): Failed to open stream: Permission denied Context: {"exception":{}} in /var/www/BookStack/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:137 Stack trace: #0 /var/www/BookStack/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(44): Monolog\Handler\StreamHandler->write() #1 /var/www/BookStack/vendor/monolog/monolog/src/Monolog/Logger.php(389): Monolog\Handler\AbstractProcessingHandler->handle() #2 /var/www/BookStack/vendor/monolog/monolog/src/Monolog/Logger.php(644): Monolog\Logger->addRecord() #3 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Log/Logger.ph :/home/ubuntu# tail /var/www/BookStack/storage/logs/laravel.log [stacktrace] #0 /var/www/BookStack/vendor/symfony/console/Command/Command.php(321): Symfony\\Component\\Console\\Input\\Input->validate() #1 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\\Component\\Console\\Command\\Command->run() #2 /var/www/BookStack/vendor/symfony/console/Application.php(1096): Illuminate\\Console\\Command->run() #3 /var/www/BookStack/vendor/symfony/console/Application.php(324): Symfony\\Component\\Console\\Application->doRunCommand() #4 /var/www/BookStack/vendor/symfony/console/Application.php(175): Symfony\\Component\\Console\\Application->doRun() #5 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(201): Symfony\\Component\\Console\\Application->run() #6 /var/www/BookStack/artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle() #7 {main} "} ``` </p> </details> ### Hosting Environment PHP8.3, Ubuntu 24.02, nginx 1.26.1, MariaDB
OVERLORD added the 🐕 Support label 2026-02-05 09:17:44 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Jun 4, 2024):

By those nginx error logs, looks like filesystem permissions are off.
See our guidance here on filesystem permissions:
https://www.bookstackapp.com/docs/admin/filesystem-permissions/

@ssddanbrown commented on GitHub (Jun 4, 2024): By those nginx error logs, looks like filesystem permissions are off. See our guidance here on filesystem permissions: https://www.bookstackapp.com/docs/admin/filesystem-permissions/
Author
Owner

@Jeffrey-FB commented on GitHub (Jun 4, 2024):

Hey @ssddanbrown

the default user is ubuntu
I've tried all those permissions a few times step by step the only change would have been.
sudo chown -R ubuntu:nginx /var/www/bookstack
I've just redone them.
And then i restarted the server

What have i missed?
drwxr-xr-x 16 ubuntu nginx 4096 Jun 4 16:34 BookStack
/var/www/BookStack/storage/logs
-rwxrwxr-x 1 ubuntu nginx 11699 Jun 4 16:12 laravel.log

@Jeffrey-FB commented on GitHub (Jun 4, 2024): Hey @ssddanbrown the default user is ubuntu I've tried all those permissions a few times step by step the only change would have been. sudo chown -R ubuntu:nginx /var/www/bookstack I've just redone them. And then i restarted the server What have i missed? `drwxr-xr-x 16 ubuntu nginx 4096 Jun 4 16:34 BookStack` /var/www/BookStack/storage/logs `-rwxrwxr-x 1 ubuntu nginx 11699 Jun 4 16:12 laravel.log`
Author
Owner

@ssddanbrown commented on GitHub (Jun 4, 2024):

@Jeffrey-FB PHP used with nginx on Ubuntu would typically be running as the www-data user, not nginx unless this is not a standard Ubuntu environment and/or you've made changes to how PHP/nginx is running.

@ssddanbrown commented on GitHub (Jun 4, 2024): @Jeffrey-FB PHP used with nginx on Ubuntu would typically be running as the `www-data` user, not `nginx` unless this is not a standard Ubuntu environment and/or you've made changes to how PHP/nginx is running.
Author
Owner

@Jeffrey-FB commented on GitHub (Jun 5, 2024):

Thanks Dan

I couldn't figure this one out as I was following multiple guides.
As i'm trying to host the DB on a remote server.

I've rebuilt it just using your install script, now I'm just trying to point it to the remote DB.
Might spin up a new ticket regarding that as i cannot seem to link it.

@Jeffrey-FB commented on GitHub (Jun 5, 2024): Thanks Dan I couldn't figure this one out as I was following multiple guides. As i'm trying to host the DB on a remote server. I've rebuilt it just using your install script, now I'm just trying to point it to the remote DB. Might spin up a new ticket regarding that as i cannot seem to link it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#4811