Raspberry PI

Open Source Hotel Management System with Raspberry Pi and Qloapps

Raspberry PI OS Lite version can be very versatile to put in place a number of home useful services (see also my Raspberry Pi projects article). Some addicting features can be achieved by searching open source software and testing it with this fantastic device. An interesting example is installing a complete open source hotel reservation and booking system with Raspberry Pi and Qloapps.

What Is Qloapps

QloApps is an open source software with all the features to help Hotel Business management. Qloapps features include:

  • Launch Hotel Booking Website
  • Manage Offline Booking
  • Partial Payment Booking
  • Integrated Payment Gateway
  • Multirooms/hotels in Single Order
  • Manage Refund Rules

It is composed of a web front end, which is the page that customers can reach from internet, and a web back-end, which is where hotel owner manages hotels, rooms, prices and many other customizations.

What We Need

This project is very simple and installing only web services from remote allows to need only a few cheap parts. I’m going to get it with a Raspberry Pi 3 model B, but it should word also with Raspberry PI 3 model A+ or newer boards.

I suggest adding from now to your shopping chart all needed hardware, so that at the end you will be able to evaluate overall costs and decide if continuing with the project or removing them from shopping chart. So, hardware will be only:

You will also need a Desktop PC with an SFTP software (like, for example, the free Filezilla) to transfer installation packages into your RPI.

Check hardware prices with following links:

Step-By-Step procedure

We’ll start from setting up a classic LAMP server. We’ll then setup database users and install Qloapps.

Install Raspberry PI OS Lite

For this step you can simply follow my Install Raspberry PI OS Lite article.

Make sure that your system is up to date. Connect via ssh terminal and type following commands:

sudo apt update
sudo apt upgrade

Install LAMP Server

LAMP (Linux – Apache – Mysql – Php) servers usually comes with MySQL database. In our project we’ll use instead MariaDB because it is lighter and work fine with Raspberry Pi. I’ll go fast in this first part because installin a LAMP server is well documented over internet…

Install Apache Server:
sudo apt-get install apache2 -y

You should now be able to check that Apache installation has gone correctly by browsing http://<<YouRpiIPAddress>>:

Install PhP:
sudo apt-get install php -y
Install MariaDB Server and php connector:
sudo apt-get install mariadb-server php-mysql -y
Install PhpMyAdmin:
sudo apt-get install phpmyadmin

In phpmyadmin setup screens I suggest the following:

  • select apache (mandatory) with space and press Ok
  • select Yes to configure database for phpmyadmin with dbconfig-common
  • insert your favourite phpmyadmin password and press Ok
  • insert again your phpmyadmin password to confirm and press Ok
Grant phpmyadmin user DB privileges to manage DBs:

We’ll connect to MariaDB with root user (defult password is empty) to grat permissions (remember to use semicolumns at the end of each command row as showed below):

sudo mysql -uroot -p
grant all privileges on *.* to 'phpmyadmin'@'localhost';
flush privileges;
quit;

Finally restart Apache service:

sudo systemctl restart apache2.service

and check that phpmyadmin is working by browsing “http://<<YouRpiIPAddress>>/phpmyadmin/”

Default phpmyadmin login credentials are:

  • user: phpmyadmin
  • password: the one set up in phpmyadmin installation step

Installing Other Qloapps Required Packages and Setting Up Php

We need to prepare our system to Qloapp installation check. So we have to install php soap connector:

sudo apt-get install php-soap

Another setting to pass compliance check is editing php max upload file size to 16 MB:

sudo nano /etc/php/7.3/apache2/php.ini

Look for the row with upload_max_filesize parameter and set it as the following:

upload_max_filesize = 16M

Qloapps suggests also the following change:

max_execution_time = 500

Save and exit. Restart again Apache:

sudo systemctl restart apache2.service

Install Qloapps

We’ll follow official Qloapps installation guide, with some minor changes to have a dedicated database application user.

Create DB And Setup User:

Go back to phpmyadmin web page (browse “http://<<YourRpiIPAddress>>/phpmyadmin/”) and login:

user: phpmyadmin

password: the one set up in phpmyadmin installation step

Click on Database Tab:

Create a database and take a note of the database name as you will require the same name in the further installation process.

It’s time to create a database user for Qloapps. In this example I’ll use the following credentials. Use the one at you choice, mostly for password:

user: qloapps_db_user

password: qloapps_db_password

So, terminal commands will be (root password is still empty, if not changed by you before):

sudo mysql -uroot -p
CREATE USER 'qloapps_db_user'@'localhost' IDENTIFIED BY 'qloapps_db_password';
GRANT ALL PRIVILEGES ON qloapps_.* TO 'qloapps_db_user'@'localhost';
flush privileges;
quit
Install Qloapps Software:

Download Qloapps installation zip file from Qloapps download page in your local PC. At the time of this article, this file is named “HotelCommerce-1.4.0.zip”.

With you favoutire SFTP software transfer via SFTP the entire zip file to a new folder in path “/home/pi/download” in your Raspberry PI. Common (default) SFP connection parameters are:

  • host: your Raspberry Pi IP address
  • user: pi
  • password: raspberry (if you didn’t changed pi default password)
  • port: 22

Back to terminal:

cd /home/pi/download/ #Enter directory where Qloapps installation files have been transferred
unzip HotelCommerce-1.4.0.zip #Extracts all files from zip
cd /var/www/html/ #Enter Apache web directory
sudo rm index.html #Removes Apache default page - we'll use Qloapps one
sudo cp -R /home/pi/download/HotelCommerce-1.4.0/hotelcommerce/* ./ #Copy installation files to web directory
sudo chown -R www-data:www-data ./

Browse http://<<YourRpiIPAddress>> to start installation:

Select your favourite language and press Next.

Read License Agreement. If you agree, check apposite flag and press Next.

At this step, you will need to enter your Store Details and the credentials by which you will access your store. So be patient while entering the details. At the end, press ok.

Edit database connection parameters according to what defined in previous paragraphs. With parameters used in this guide, I will edit:

  • Database name: qloapps_ (added the final underscore)
  • Database login: qloapps_db_user
  • Database password: qloapps_db_password

Test database connection and it should be ok. Click Next.

Installation seems to be finished correctly, but we must remove install folder before entering Qloapps web pages. From terminal, type:

sudo rm -R install/

With the command “ls” from terminal, locate a folder whose name starts with “admin”. In my case the output is the following:

… but admin folder name can vary from installation to installation.

Now your booking web server is ready and pages will be:

  • Front-end (for customers): http://<<YourRpiIPAddress>>
  • Back-end (for administratives): http://<<YourRpiIPAddress>>/<<AdminFolderName>>

First access to Back-end goes in demo mode. This can be disabled with the switch button on right side of page named “Demo mode”.

To customize, please use Qloapps user guide.

Enjoy your hotel reservation and booking system with Raspberry PI and Qloapps!

peppe8o

Open source and Raspberry PI lover

Published by
peppe8o

Recent Posts

Some links in this post may be affiliate links. We may get paid if you buy something or take an action after clicking one of these, but without addictional costs for you compared to direct buying.

SPI communication between two Arduinos

In this tutorial, we will use two Arduino Uno to demonstrate the Serial Peripheral Interface…

2 weeks ago

Automatic irrigation system with Arduino and Sensors

In this tutorial, we will be making an automatic irrigation system (AIS) with Arduino and…

3 weeks ago

Beginner’s Guide to Use Python Virtual Environment with Raspberry PI (venv)

This tutorial will show you how to use Python Virtual Environment with Raspberry PI computer…

4 weeks ago

Get Betting Odds with Raspberry PI and Odds-API (free)

This tutorial will show you how to get betting odds with Raspberry PI by using…

1 month ago

Backup Raspberry PI (computer) Data with Rsync to Remote NAS

This tutorial will show you how to perform the backup of Raspberry PI (computer board)…

1 month ago

Honeygain and Raspberry PI: Earn by Sharing Internet Connection

This tutorial will show you how to install Honeygain on a Raspberry PI computer board…

1 month ago