Skip to main content

BookStack Configuration

Environment Settings

Bookstack stores custom settings file .env within its active directory, /var/www/bookstack/ this is where you will go to modify most settings within your bookstack instance. Check the GitHub link below for a complete list of environment variables on the active release branch.

APP_URL environment variable must lead with http:// or https:// and end with / such as or Any form of the following will cause URL redirect issues:, or

Mail Setup

To allow BookStacks to send mail using Google's free mail server, ensure that your .env settings within your bookstack directory ( /var/www/bookstack/.env ) contains the below.

# The below url has to be set if using social auth options
# or if you are not using BookStack at the root path of your domain.


Now head over to Configure Postfix to setup a Mail Transfer Agent (MTA) on your host. If you have a firewall, be sure you open the port you enter for MAIL_PORT.

Once that's done, test sending mail with the command below, where is the destination email address -

echo "This email confirms that Postfix is working" | mail -s "Testing Posfix" 

You must have a valid HTTPS certificate configured, if you are using DigitalOcean. See the link below.
DO - DNS Records
Knoats - NGINX SSL Configuration

As a final step, we can use BookStack's builtin mail test within the Settings->Maintenance panel -

Once we click the button to send a test email, we should see something like the below