Are you tired of using Commercial ticketing system?. In this tutorial, I will show you how to install osTicket on Ubuntu 20.04/18.04 Bionic Beaver, using a LEMP stack, with Apache as a web server, MySQL/MariaDB as a database server and PHP 7.x.

osTicket is an open source ticket system often used for support. It is written in PHP and it comes with a  simple and intuitive web interface used to manage, organize, track and archive all support ticket requests in your company. Follow steps in this guide to Install osTicket on your Ubuntu 20.04/18.04 server. There is a separate guide covering installation of osTicket on CentOS 8.

Features of osTicket Ticketing System

All features of osTicket are available on the official osTicket feature page.

  • Custom Fields: Customize the data collected from users when submitting a ticket to help get straight to the issue.
  • Custom Columns and Queues: A custom queue is a view of tickets based on a custom criteria that you specify. A custom column is an additional field that is not displayed initially when viewing the ticket tab
  • Ticket Filters: Define rules to route incoming tickets to the right department, agents, as well as trigger actions.
  • Help Topics: Configurable help topics for web tickets allow you to route inquiries to exactly the right department for swift resolution.
  • Agent Collision Avoidance: Ticket locking mechanism to allow staff to lock tickets during response to avoid conflicting or dual responses.
  • Assign, Transfer, & Referral: Transfer tickets between departments to make sure it’s being handled by the correct agents, or assign tickets to a particular agent or team of agents.
  • Auto-Responder: Configurable automatic reply sent out when a new ticket is opened or a message is received.
  • Thread Action: Agents have the ability to create a Ticket or Task from a Ticket’s thread entry or from a Task’s thread entry.
  • Service Level Agreements: All support requests and responses are archived online for end users.
  • Advanced Search: Narrow down your search criteria with Advanced Search.
  • Tasks: Create an internal to-do list for agents.

Install osTicket on Ubuntu 20.04/18.04 Linux System

Below are the steps to Install osTicket on Ubuntu 18.04.

Step 1: Update system

Start by updating packages on your system to the latest release.

sudo apt-get update
sudo apt-get upgrade

You can also set server hostname ( Optional):

sudo hostnamectl set-hostname

Step 2: Install and Configure MySQL / MariaDB database

You will need one MySQL database with a valid user, password, and hostname handy during installation. MySQL user specified need to have FULL privileges on the database created. if you don’t have a database server installed already, check our guide on how to Install MariaDB 10 on Ubuntu

You can also run the commands below to install mariadb from OS APT repositories:

sudo apt update
sudo apt install mariadb-server

Secure your DB Server:

$ sudo mysql_secure_installation

Change authentication plugin to be able to login as normal user with root credentials.

$ sudo mysql -u root
UPDATE mysql.user SET plugin = 'mysql_native_password' WHERE User = 'root';

Confirm it is working:

$ mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 56
Server version: 10.3.22-MariaDB-1ubuntu1 Ubuntu 20.04

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> 

After the MariaDB/MySQL server has been installed, proceed to create a database for osTicket. Login to your database server as root user and create a database for osTicket:

$ mysql -u root -p
CREATE DATABASE osticket_db;
GRANT ALL PRIVILEGES ON osticket_db.* TO [email protected] IDENTIFIED BY "[email protected]";

Once the database is ready, proceed to install Apache web server:

Step 3: Installing Apache on Ubuntu

On Ubuntu, you can install Apache Web server from the official apt repository:

sudo apt install apache2

To start the service manually, run:

sudo systemctl start apache2

Though the service is enabled to start on boot by default, manually allowing it you have to run:

sudo systemctl enable apache2

Step 3: Install PHP

The next step is the to install PHP on Ubuntu:

sudo apt update
sudo apt-get install php php-{fpm,pear,imap,apcu,intl,cgi,common,mbstring,net-socket,gd,xml-util,mysql,bcmath}

The version of PHP that will be installed is v7.2 for Ubuntu 18.04 and v7.4 for Ubuntu 20.04.

$ php -v
PHP 7.4.3 (cli) (built: Mar 26 2020 20:24:23) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies

Step 4: Download and Install osTicket on Ubuntu 20.04 / 18.04

At this point, you should be ready to download the latest release of osTicket. Then uncompress the files and place a directory of your choice on the server web document root.

As of this writing, the latest release of osTicket is.v1.14.2.Please confirm the current version before downloading it.

sudo apt-get install curl wget unzip

Download latest release of osTicket:

curl -s \
  | grep browser_download_url \
  | grep "browser_download_url" \
  | cut -d '"' -f 4 \
  | wget -i -

Extract downloaded archive:

unzip osTicket-v*.zip -d osTicket

You will get two directories after extraction: scripts and upload

$ ls osTicket
scripts  upload

Create web directory for osTicket and mv these directories to it.

sudo mv osTicket /var/www/

Next create an osTicket configuration file:

cd /var/www/osTicket/upload/include
sudo cp ost-sampleconfig.php ost-config.php

Change ownership of osTicket web directory to userwww-data and group.

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

Step 5: Configure Apache Web Server

Create VirtualHost configuration file for osTicket on Apache configurations directory:

sudo vim /etc/apache2/sites-enabled/osticket.conf

Add content:

<VirtualHost *:80>
     ServerAdmin [email protected]
     DocumentRoot /var/www/osTicket/upload
     <Directory /var/www/osTicket/>
          Options FollowSymlinks
          AllowOverride All
          Require all granted

     ErrorLog ${APACHE_LOG_DIR}/osticket_error.log
     CustomLog ${APACHE_LOG_DIR}/osticket_access.log combined


  • with your domain name.
  • /var/www/osTicket/upload with the path to your osTicket files.

Confirm config syntax:

$ sudo apachectl -t
Syntax OK

Restart apache2:

sudo systemctl restart apache2

Step 5: Install and configure osTicket on Ubuntu 20.04/18.04

Now that everything is set, let’s finish the installation by setting up osTicket from UI.  open in your favorite web browser. The first page will look like below:

os ticket install ubuntu 18.04 01

Requirements satisfaction on Ubuntu 20.04:

install os ticket ubuntu 01

Confirm that all requirements are satisfied and click Continue.

os ticket install ubuntu 18.04 02

Fill all required information and click “Install Now” button.

os ticket install ubuntu 18.04 03

On successful installation, you will get below page:

os ticket install ubuntu 18.04 04

Now change the permission of ost-config.php to remove write access as shown below.

sudo chmod 0644 /var/www/osTicket/upload/include/ost-config.php

Also, remove setup directory:

sudo rm -rf /var/www/osTicket/upload/setup/

Take note of all your access URLs.

Your osTicket URL:
Your Staff Control Panel:
osTicket Forums:
osTicket Community Wiki:

To log in to backend system ( Staff control panel), use

os ticket install ubuntu 18.04 05 admin

Now try to access Your Staff Control Panel:

os ticket install ubuntu 18.04 07 admin

Next, we will look at how to secure osTicket with Let’s Encrypt SSL certificate.

How To Secure osTicket with Let’s Encrypt SSL Certificates

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.


  1. You have missed out many steps. EG. Unzip the osticket Where is it? Just before this I got a Error: Permission denied

    Cannot write to ‘’ (Success).
    Cannot find how to resolve this!

    This is a BRAND NEW fully open Ubuntu 20.04 installation and installed and updated with these instructions step-by-step. I have even deleted the installation (Ubuntu) and started again with anther clean install.
    Since my installation is in a VM (I have no other option on this MAc computer currently) the [email protected] should be [email protected] (I changed the hostname) as that was also causing an issue. I could only overcome this by using “sudo” at the beginning of every command (except inside mysql/mariadb)

  2. Hey buddy fantastic documentation I don’t know about others but you have done an amazing job of jottting down the documentation … Cheers and Keep It Up …


Please enter your comment!
Please enter your name here