Skip to main content

Bugs - Q&A

Q&A

Storage local vs google drive

storage limit https://www.bookstackapp.com/docs/admin/upload-config/

Cannot upload image of maintenance book

30 Jul 2024 by Cittadhammo

When trying to upload a new image for the book, i get 

image.png

02 Aug 2024 by Adicco

InThe error came from the current setup of the Wiki, the Bookstack server runsnot behindaccepting nginx (used as a reverse proxy. In other words, when someone goes to wiki.amaravati.org, the request: goes to CloudFlare, which relays it to nginx, which relays it to BookStack running on Docker.)

nginx needs to be configured to acceptfile uploads above a certain size. InThis is fixed by updating the webserver's configuration to increase the size, or disable the limit altogether.

However, in our current stack, there are two servers involved, so we need to make sure their configuration is appropriate.

The first one is the nginx server running on the BookStack Docker container itself. It runs on port 3000, as per the docker compose file (/home/ec2-user/docker-bookstack/prod/compose.yml)

The configuration files for the Docker container's nginx server are found in /home/ec2-user/docker-bookstack/prod/bookstack_app_data/nginx. If we take a look at the main configuration file there, nginx.conf, we can see the following bit:

# Specifies the maximum accepted body size of a client request, as
# indicated by the request header Content-Length. If the stated content
# length is greater than this size, then the client receives the HTTP
# error code 413. Set to 0 to disable. Default is '1m'.
client_max_body_size 0;

So we know that the problem doesn't come from the Docker container's webserver. Let's check the second webserver that is running, which is another nginx server that runs above the Docker containers, so as to act as a reverse proxy. It is installed on the EC2 instance itself, so the config files are found at the standard location, /etc/nginx/nginx.conf, IIf added,we undertake a look at the configuration file there, we see that there is no client_max_body_size directive, which means that it will use nginx's default, which is 1MB.

Let's make it unlimited by adding the following in the http section:

client_max_body_size 50M;0; 

This will allow uploads up to 50MB. Then, check the configuration is valid:

sudo nginx -t

And restart nginx:

sudo systemctl restart nginx

Recovering password

30 Jul 2024 by Cittadhammo

When logging into the wiki, if not remembering the password, the recovery email doesn't seem to work. (maybe only i account created via google auth)