How to install the Booked Scheduler on Ubuntu 18.04

Need an on-premises resource booking system? Jack Wallen shows you how to install the open source Booked solution.

How to install the Booked Scheduler on Ubuntu 18.04

Your small- to medium-sized business might rely on a calendar to book and track resources. But why use a simple calendar, when you can install a free open source tool created for the express purpose of tracking and scheduling of various types of resources? 

Such a tool exists and it's called Booked. Booked is used by hundreds of thousands of universities, laboratories, businesses, and nonprofits across the globe. Why? Because it's reliable, easy to use, extendable, and includes features like:

  • Customizations

  • Pluggable framework

  • Mobile-first design

  • LDAP and AD integration

  • Website integration

  • Registered and anonymous users

  • Reporting system

  • Roles and permissions

  • Open API

  • Quotas

  • Integrated payment and credit system

  • Real-time availability

If that sounds like a tool your business needs, let's walk through the process of installing it on Ubuntu Server 18.04.

SEE: 10 things companies are keeping in their own data centers (TechRepublic download)

What you'll need

  • A running instance of Ubuntu Server 18.04

  • A user with sudo privileges

How to install necessary dependencies

The first thing to be done is the installation of the necessary dependencies. Log in to your Ubuntu Server and issue the command:

sudo apt-get install apache2 mysql-server mysql-client php php-cgi libapache2-mod-php php-common php-pear php-mbstring php-text-captcha wget unzip -y

When that command completes, start and enable the necessary services with the commands:

sudo systemctl start mysql
sudo systemctl start apache2
sudo systemctl enable mysql
sudo systemctl enable apache2

You'll also need to configure the MySQL server, which can be accomplished by running the command:

sudo mysql_secure_installation

Once you've given the MySQL admin user a password and answered the remaining questions, you can then create the database and user.

How to create the database

Log in to the MySQL prompt with the command:

sudo mysql -u root -p

At the prompt, create the database with the command:


Create the new user and give that user full permissions to the new database with the commands:

CREATE USER 'booked_user'@'localhost' IDENTIFIED BY 'PASSWORD';
GRANT ALL PRIVILEGES ON booked.* to 'booked_user'@'localhost' IDENTIFIED BY 'PASSWORD';

Finalize the database with the commands:


How to download and unpack the Booked file

Download the file with the command:


Unpack the file with the command:


Move the file into the correct directory with the command:

sudo mv booked /var/www/html/

Give the newly-moved directory the correct ownership with the command:

sudo chown -R www-data:www-data /var/www/html/booked

There are two sub-directories that must have 0755 permissions. Do this with the commands:

sudo chmod -R 0755 /var/www/html/booked/tpl
sudo chmod -R 0755 /var/www/html/booked/tpl_c

How to configure Apache

Now we can configure our web server. Create a new configuration file with the command:

sudo nano /etc/apache2/sites-available/booked.conf

In that file, paste the following (edit to meet your needs):

<VirtualHost *:80>
    DocumentRoot /var/www/html/booked
<Directory /var/www/bookedscheduler>
    Options -Indexes +FollowSymLinks +MultiViews
    AllowOverride All
    Require all granted
    ErrorLog /var/log/apache2/booked-error.log
    CustomLog /var/log/apache2/booked-access.log combined

Save and close the file. 

Enable the new configuration and the rewrite module with the commands:

sudo a2ensite booked
sudo a2enmod rewrite

Restart Apache with the command:

sudo systemctl restart apache2

How to configure Booked

Finally, we have to take care of a few configurations and then import the database tables. Copy the configuration file with the command:

sudo cp /var/www/html/booked/config/config.dist.php /var/www/html/booked/config/config.php

Open the configuration file for editing with the command:

sudo nano /var/www/html/booked/config/config.php

In that file, you'll want to edit the following lines to fit your installation:

$conf['settings']['default.timezone'] = 'America/Chicago';
$conf['settings'][''] = '';
$conf['settings']['script.url'] = 'http://SERVER_IP/booked/Web'

Change the above settings to reflect your timezone, admin email address, and server IP address. 

In the Database Configuration section, change the following lines:

$conf['settings']['database']['user'] = 'USER';
$conf['settings']['database']['password'] = 'PASSWORD';
$conf['settings']['database']['name'] = 'DBNAME';


  • USER is the booked user you created at the MySQL prompt
  • PASSWORD is the password you created the MySQL prompt
  • DBNAME is the name of the database you created at the MySQL prompt

Finally, check in the Mail Server Configuration section and configure your SMTP server information. You'll need to configure the following lines:

$conf['settings']['phpmailer'][''] = 'SMTP_HOST';
$conf['settings']['phpmailer']['smtp.port'] = '25';
$conf['settings']['phpmailer'][''] = 'SSL or TLS';
$conf['settings']['phpmailer']['smtp.username'] = 'ADDRESS';
$conf['settings']['phpmailer']['smtp.password'] = 'PASSWORD';


  • SMTP_HOST is your outgoing email server address

  • Choose between SSL or TLS

  • ADDRESS is the username for your SMTP server

  • PASSWORD is the password for your SMTP user

Save and close the file.

Last but not least, import the database schema with the command:

sudo mysql -u USER -p DATABASE < database_schema/create-schema.sql

Where USER is the username you created at the MySQL prompt and DATABASE is the name of the database you created.

How to register your user

You can now point a web browser to http://SERVER_IP/booked where SERVER_IP is the IP address of your hosting server and then click Register User (Figure A).

Figure A


Registering your user.

You must register with the email address you used to configure the admin email in the configuration file. Once you've done that, you're ready to start using Booked.

Also see

Data structure and information tools for networking business

Image: iStockphoto/carloscastilla