3 description = "How to install BookStack"
8 Below you can find details on how to install BookStack on your own hosting. There are a number of installation options available depending on your setup. The install process will require some knowledge of hosting a PHP web application & database.
10 * [Requirements](#requirements)
11 * [Shared Hosting](#shared)
14 * [Ubuntu 20.04 Script](#ubuntu-2004)
15 * [Ubuntu 18.04 Script](#ubuntu-1804)
16 * [Ubuntu 16.04 Script](#ubuntu-1604)
17 * [Community Guides](#community)
21 <a name="requirements"></a>
25 BookStack has the following requirements:
28 * For installation and maintenence, you'll need to be able to run `php` from the command line.
29 * Required Extensions: *OpenSSL, PDO, MBstring, Tokenizer, GD, MySQL, Tidy, SimpleXML & DOM*
31 * Single Database *(All permissions advised since application manages schema)*
32 * **Git Version Control**
33 * (Not strictly required but helps manage updates)
34 * **[Composer](https://getcomposer.org/)**
42 BookStack does not currently support shared PHP hosting. There are too many differences between shared hosting providers and too many limitations to support the current install process although we would like to make this easier in the future. You can try searching for 'Laravel Install Guides' for your hosting provider as the process would be similar. Beware that modifying the application source files or applying large work-arounds could lead to security or stability issues.
48 ## Manual Installation
50 Ensure the above requirements are met before installing.
52 This project currently uses the `release` branch of the BookStack GitHub repository as a stable channel for providing updates. The installation is currently somewhat complicated and will be made simpler in future releases. Some PHP or Laravel experience will make this easier.
54 1. Clone the release branch of the BookStack GitHub repository into a folder.
56 git clone https://github.com/BookStackApp/BookStack.git --branch release --single-branch
58 2. `cd` into the application folder and run `composer install --no-dev`.
59 3. Copy the `.env.example` file to `.env` and fill with your own database and mail details.
60 4. Ensure the `storage`, `bootstrap/cache` & `public/uploads` folders are writable by the web server.
61 5. In the application root, Run `php artisan key:generate` to generate a unique application key.
62 6. If not using Apache or if `.htaccess` files are disabled you will have to create some URL rewrite rules as shown below.
63 7. Set the web root on your server to point to the BookStack `public` folder. This is done with the `root` setting on Nginx or the `DocumentRoot` setting on Apache.
64 8. Run `php artisan migrate` to update the database.
65 9. Done! You can now login using the default admin details `admin@admin.com` with a password of `password`. You should change these details immediately after logging in for the first time.
67 #### URL Rewrite rules
71 Options +FollowSymLinks
74 RewriteCond %{REQUEST_FILENAME} !-d
75 RewriteCond %{REQUEST_FILENAME} !-f
76 RewriteRule ^ index.php [L]
82 try_files $uri $uri/ /index.php?$query_string;
92 Community docker setups are available for those that would prefer to use a containerised version of BookStack:
96 * [GitHub Repository](https://github.com/linuxserver/docker-bookstack)
97 * [Docker Hub page](https://hub.docker.com/r/linuxserver/bookstack)
101 * [GitHub Repository](https://github.com/solidnerd/docker-bookstack)
102 * [Docker Hub page](https://hub.docker.com/r/solidnerd/bookstack/)
106 <a name="ubuntu-2004"></a>
108 ## Ubuntu 20.04 Installation Script
110 A script to install BookStack on a fresh instance of Ubuntu 20.04 is available. This script is ONLY FOR A FRESH OS, It will install Apache, MySQL 8.0 & PHP-7.4 and could OVERWRITE any existing web setup on the machine. It also does not set up mail settings or configure system security so you will have to do those separately. You can use the script as a reference if you're installing on a non-fresh machine.
112 [Link to installation script](https://github.com/BookStackApp/devops/blob/master/scripts/installation-ubuntu-20.04.sh)
114 #### Running the Script
117 # Ensure you have read the above information about what this script does before executing these commands.
119 # Download the script
120 wget https://raw.githubusercontent.com/BookStackApp/devops/master/scripts/installation-ubuntu-20.04.sh
123 chmod a+x installation-ubuntu-20.04.sh
125 # Run the script with admin permissions
126 sudo ./installation-ubuntu-20.04.sh
132 <a name="ubuntu-1804"></a>
134 ## Ubuntu 18.04 Installation Script
136 A script to install BookStack on a fresh instance of Ubuntu 18.04 is available. This script is ONLY FOR A FRESH OS, It will install Apache, MySQL 5.7 & PHP-7.2 and could OVERWRITE any existing web setup on the machine. It also does not set up mail settings or configure system security so you will have to do those separately. You can use the script as a reference if you're installing on a non-fresh machine.
138 [Link to installation script](https://github.com/BookStackApp/devops/blob/master/scripts/installation-ubuntu-18.04.sh)
140 #### Running the Script
143 # Ensure you have read the above information about what this script does before executing these commands.
145 # Download the script
146 wget https://raw.githubusercontent.com/BookStackApp/devops/master/scripts/installation-ubuntu-18.04.sh
149 chmod a+x installation-ubuntu-18.04.sh
151 # Run the script with admin permissions
152 sudo ./installation-ubuntu-18.04.sh
157 <a name="ubuntu-1604"></a>
159 ## Ubuntu 16.04 Installation Script
161 A script to install BookStack on a fresh instance of Ubuntu 16.04 is available. This script is ONLY FOR A FRESH OS, It will install Nginx, MySQL 5.7 & PHP7 and could OVERWRITE any existing web setup on the machine. It also does not set up mail settings or configure system security so you will have to do those separately. You can use the script as a reference if you're installing on a non-fresh machine.
163 [Link to installation script](https://github.com/BookStackApp/devops/blob/master/scripts/installation-ubuntu-16.04.sh)
165 #### Running the Script
168 # Ensure you have read the above information about what this script does before executing these commands.
170 # Download the script
171 wget https://raw.githubusercontent.com/BookStackApp/devops/master/scripts/installation-ubuntu-16.04.sh
174 chmod a+x installation-ubuntu-16.04.sh
176 # Run the script with admin permissions
177 sudo ./installation-ubuntu-16.04.sh
182 <a name="community"></a>
186 This is a collection of guides created by awesome members of the BookStack community:
188 * [CentOS 8 Install by Xhark](https://github.com/blogmotion/bm-bookstack-install/blob/master/bookstack-install-centos8.sh) - [french guide](http://blogmotion.fr/internet/bookstack-script-installation-centos-8-18255)
189 * [CentOS 7 Install by Deviant Engineer](https://deviant.engineer/2017/02/bookstack-centos7/)
190 * [Fedora 27 Install by Jared Busch](https://mangolassi.it/topic/16471/install-bookstack-on-fedora-27/)