Are you tired of using Commercial ticketing system?. In this tutorial, I will show you how to install osTicket on Ubuntu 22.04/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 22.04/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.

Below are the steps to Install osTicket on Ubuntu 22.04/20.04/18.04 Linux machine. This can be Desktop or Server edition.

Step 1: Update system

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

sudo apt update && sudo apt -y full-upgrade
[ -f /var/run/reboot-required ] && sudo reboot -f

You can also set server hostname ( Optional):

sudo hostnamectl set-hostname osticket.computingforgeeks.com

Edit /etc/hosts file and map hostname to IP address

$ sudo vim /etc/hosts
10.10.0.5 osticket.computingforgeeks.com

Step 2: Install MySQL or 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.

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

sudo apt update
sudo apt install mariadb-server -y

Secure your DB Server:

sudo mysql_secure_installation

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:

$ sudo mysql -u root -p
CREATE DATABASE osticket_db;
GRANT ALL PRIVILEGES ON osticket_db.* TO osticket_user@localhost IDENTIFIED BY "Str0ngDBP@ssw0rd";
FLUSH PRIVILEGES;
QUIT;

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

Step 3: Installing Apache Web Server

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

sudo apt install apache2 -y

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 4: Install PHP and required extensions

Add PHP ppa:ondrej repository to your system:

sudo apt update
sudo apt install lsb-release ca-certificates apt-transport-https software-properties-common -y
sudo add-apt-repository ppa:ondrej/php

The next step is the to install PHP 8.2 on Ubuntu and required extensions:

sudo apt update
sudo apt install php8.2 php8.2-common -y
sudo apt install php8.2-{imap,apcu,intl,cgi,mbstring,gd,mysql,bcmath,xml} -y

The version of PHP installed can be checked with the following command:

$ php -v
PHP 8.2.15 (cli) (built: Jan 20 2024 14:17:05) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.15, Copyright (c) Zend Technologies
    with Zend OPcache v8.2.15, Copyright (c), by Zend Technologies

Step 5: Download and Install osTicket

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.

Install tools needed for downloading the software:

sudo apt install curl wget unzip -y

Download latest release of osTicket:

curl -s https://api.github.com/repos/osTicket/osTicket/releases/latest|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/

Disable default Apache webpage:

sudo a2dissite 000-default.conf
sudo rm /var/www/html/index.html
sudo systemctl restart apache2

Step 6: Configure Apache Web Server

Create VirtualHost configuration file for osTicket on Apache configurations directory:

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

Add content:

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

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

Replace:

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

Enable website after the change

sudo a2ensite osticket.conf
sudo systemctl restart apache2

Confirm config syntax:

$ sudo apachectl -t
Syntax OK

Restart apache2:

sudo systemctl restart apache2

Step 7: Install and configure osTicket

Now that everything is set, let’s finish the installation by setting up osTicket from UI.  Open //osticket.computingforgeeks.com or http://ip_address in your favorite web browser. The first page will look like below:

osticket install 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:
//osticket.computingforgeeks.com/
Your Staff Control Panel:
//osticket.computingforgeeks.com/scp
osTicket Forums:
http://osticket.com/forum/
osTicket Community Wiki:
http://osticket.com/wiki/

To log in to backend system ( Staff control panel), use domain.com/scp

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.

31 COMMENTS

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

    osTicket-v1.15.1.zip: Permission denied

    Cannot write to ‘osTicket-v1.15.1.zip’ (Success).
    Cannot find how to resolve this!

    FYI…
    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 root@localhost should be parallels@osticket (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 …

    • You can just use your server IP address or use a hostname that is resolvable on your private network. Set and add the hostname to /etc/hosts on all the systems accessible it.

  3. I installed non GUI Ubuntu. When I http the ip I get the Apache2 Ubuntu Default Page. Did I miss something ? I’m think I may need to change the link 000-default.conf -> ../sites-available/000-default.conf to 000-default.conf -> osticket.conf But I’m not sure that would work

    Any Help would be appreciated.

  4. There is a part of your configuration that is incorrect. Once I had competed the setup as per your “how-to”
    I entered the IP and FQDN address and the default html page displayed (Ubuntu Splash Page).
    After looking through the the configs this is what I did:

    At the section “sudo vim /etc/apache2/sites-enabled/osticket.conf” I changed this to
    * sudo vim /etc/apache2/sites-available/osticket.conf (changed sites-enabled to sites-available)

    I added in the content as per yours and changed the “Server admin, name and alias to match my own
    I then enabled the new virtual site via soft link
    * sudo ln -s /etc/apache2/sites-available/osticket /etc/apache2/sites-enabled/

    I disabled the default site:
    * sudo unlink /etc/apache2/sites-enabled/000-default.com

    Confirm config syntax:
    * sudo apachectl -t
    Syntax OK

    * sudo systemctl restart apache2

    Logged in BOTH via IP and FQDN and the setup page worked as expected.

    My setup is running Ubuntu 20.04 with OsTicket v1.16.1
    With v16.1 I had to upgrade from php 7.4 to 8.0

    I hope this helps anyone else who had the same Ubuntu “Splash Screen” issue

  5. Thank you so very much.
    For OsTicket 1.16.1 on ubuntu 20.04 all I had to change was to install php8.0 with slightly different modules (not php7* or 8.1)

    sudo apt update
    sudo apt install lsb-release ca-certificates apt-transport-https software-properties-common -y
    sudo add-apt-repository ppa:ondrej/php
    sudo apt-get install php8.0 php8.0-{fpm,imap,apcu,intl,cgi,common,mbstring,gd,mysql,bcmath,xml}

  6. Great guide! Thanks for the very recent update!
    Everything worked exactly as you said.
    One suggestion, maybe add “-y” to the install commands so we can easier copy paste blocks of commands.

  7. Once you change the directory to use www-data, I lose connection to those folders inside the osticket main folder via WinSCP.

    Who should be the owner of /var/www/XXXXXX ?

    Can’t you add yourself to XYZ group and gain access via WinSCP to /var/www/XXXXXX ?

  8. Can anyone upload any plugins with this build? Getting permission denied when I attempt to upload. Looks like www-data took ownership in step 5.

  9. Composer detected issues in your platform: Your Composer dependencies require a PHP version “>= 8.1.0”.

    I am getting this error after filling in the details and clicking install now. I have tried upgrading the php version but still nothing.

  10. Great Job. I am getting this error when setup started, Please help to solve it.

    Composer detected issues in your platform: Your Composer dependencies require a PHP version “>= 8.1.0”.

  11. Brilliant tutorial mate. Yeah there were a couple of minor ticky tacky things overlooked in the documentation but anyone with 2 functioning brain cells could connect the dots.

    Much appreciated

LEAVE A REPLY

Please enter your comment!
Please enter your name here