3 Since BookStack can hold important information for users you should be aware of any potential security concerns.
4 Read through the below to ensure you have secured your BookStack instance. Note, The below only
5 relates to BookStack itself. The security of the server BookStack is hosted on is not
6 instructed below but should be taken into account.
8 ### Initial Security Setup
10 1. Ensure you change the password and email address for the initial `
[email protected]` user.
11 2. Ensure only the `public` folder is being served by your webserver. Serving files above this folder
12 opens up a lot of code that does not need to be public. Triple check this if you have installed
13 BookStack within the commonly used `/var/www` folder.
14 3. Ensure the database user you've used for BookStack has limited permissions for only accessing
15 the database used for BookStack data.
16 4. Within BookStack, go through the settings to ensure registration and public access settings are as you expect.
17 5. Review the user roles in the settings area.
18 6. Read the below to further understand the security for images & attachments.
22 Images are stored in a way which is publically accessible. This is done on purpose
23 to ensure decent performance while using BookStack as booting the application for every
24 image request caused multiple problems during testing. In the settings area of BookStack you can find
25 the option 'Enable higher security image uploads?'. Enabling this will add a 16 character
26 random string to the name of image files to prevent easy guessing of URLs.
28 Due to the above it's important to ensure you disable 'directory indexes' to prevent random
29 users from being able to navigate their way through your images. Here's the configuration
30 for NGINX & Apache if your server allows directory indexes:
35 # By default indexes are disabled on Nginx but if you have them enabled
36 # add this to your BookStack server block
42 # Add this to your Apache BookStack virtual host if Indexes are enabled.
43 # If .htaccess file are enabled then the below should already be active.
51 Attachments, if not using Amazon S3, are stored in the `storage/uploads` directory.
52 Unlike images these are stored behind the application authentication layer so access
53 depends on permissions you have set up at a role level and page level.
55 If you are using Amazon S3 for file storage then access will depend on your S3 permission
56 settings. Unlike images, BookStack will not automatically attempt to make uploaded attachments
57 publically accessible.
61 User passwords, if not using an alternative authentication method, are stored in the database.
62 These are hashed using the standard Laravel hashing methods which use the Bcrypt hashing algorithm.