How to install OSTicket on AWS

To install osTicket on AWS, launch a Free Tier eligible EC2 instance with Ubuntu Server 24.04 LTS, install Nginx, MySQL and PHP 8.3, download osTicket v1.18.4 from GitHub, unpack it to /var/www/osticket and finish the web installer. osTicket 1.18.4 supports PHP 8.2 to 8.4.

AWS changed its Free Tier on July 15, 2025. Accounts opened on or after that date get USD $100 in credits, plus up to $100 more, on a free plan that ends after 6 months or when the credits run out. Older accounts keep the previous 12-month Free Tier. In the launch wizard, pick an instance type that is marked Free Tier eligible.

I use Ubuntu 24.04 LTS here on purpose. Ubuntu 26.04 LTS ships PHP 8.5, which is outside the range osTicket 1.18.4 supports.

Short version

Terminalbash
sudo apt update && sudo apt upgrade -y
sudo apt install -y nginx mysql-server unzip php8.3-fpm php8.3-cli php8.3-mysql php8.3-gd php8.3-imap php8.3-xml php8.3-mbstring php8.3-intl php8.3-zip php-apcu
sudo mysql -e "CREATE DATABASE osticket_db; CREATE USER 'osticket'@'localhost' IDENTIFIED BY 'CHANGE_ME'; GRANT ALL PRIVILEGES ON osticket_db.* TO 'osticket'@'localhost'; FLUSH PRIVILEGES;"
sudo mkdir -p /var/www/osticket && cd /var/www/osticket
sudo wget https://github.com/osTicket/osTicket/releases/download/v1.18.4/osTicket-v1.18.4.zip
sudo unzip osTicket-v1.18.4.zip
sudo cp upload/include/ost-sampleconfig.php upload/include/ost-config.php
sudo chown -R www-data:www-data upload/

Then add the Nginx virtual host from section 5, open the server IP in your browser and run the installer.

For another Free Tier app, see install Snipe-IT on Ubuntu on AWS.

Let’s dive right in.

1. Creating a new instance on Amazon’s EC2

Log in to your AWS web console and navigate to EC2.

Once there, click on instances and click launch instance to create a new Instance.

AWS EC2 console with Instances selected and the Launch Instance button highlighted

Now we’ll run through the configuration real quick.

For the AMI choose Ubuntu Server 24.04 LTS. The screenshots below come from an older console, so the current UI looks different.

Choose an Amazon Machine Image step with Ubuntu Server 16.04 LTS Select button highlighted

Choose an instance type that is marked Free Tier eligible. A small instance is sufficient for our Ticket System.

Choose an Instance Type step with the free tier eligible t2.micro selected

Now you need to choose your VPC and Subnet.

If you just created a VPC for that reason, you probably have just one Public VPC and Subnet available anyway.

I also like to check Protect Against Accidental Termination. You can leave Primary IP on Auto-Assign OR choose a Static IP of your Subnet.

Configure Instance Details with network, subnet and Protect against accidental termination checkbox marked

Next, you can choose which size the Storage should be. I go for 20 GB. The default 8 GB should be fine for most users.

Add Storage step with the root volume size set to 20 GiB

Now you can add a Tag to find your instance easier later on. This is optional.

Add Tags step with an OSTicket tag entered in the key field

You can create a new security group or choose an existing one if you already got one in place. Allow SSH (port 22) and HTTP (port 80), otherwise you cannot reach the installer in your browser.

Configure Security Group step with an existing default VPC security group selected

Review your settings and click on Launch once you are sure everything is fine.

Review Instance Launch page summarizing the Ubuntu t2.micro setup with the Launch button highlighted

Now either create a new Key Pair or choose one that you created earlier. For the private key file format, choose pem for OpenSSH or ppk for Putty.

Store the Key Pair somewhere safe. This key file is used instead of a password to access your server. AWS only lets you download it once, so if you lose it, there is no way to get it back.

Key pair dialog with an existing key pair chosen and the Launch Instances button highlighted

Head back to Instances now and click on the instance you just created. You can see it’s IP Address right there if you chose Auto-Assign. Copy the IP.

EC2 Instances list with the running OSTicket instance selected and its IP in the details pane

2. Initiating a connection with Putty

Download Putty here and start it. On macOS, Linux or Windows with OpenSSH you can skip Putty and run chmod 400 your-key.pem followed by ssh -i your-key.pem ubuntu@YOUR_SERVER_IP instead.

Enter the IP Address of your Instance and click on SSH and extend it.

PuTTY Configuration Session page with the instance IP address, port 22 and SSH connection type

After extending SSH, click on Auth and on Browse. Choose the .ppk Key Pair file you downloaded after creating your Instance.

PuTTY SSH Auth settings with the private key file path and Browse button highlighted

Navigate back to Session and enter a Name for your Session, click on Save and then on Open.

PuTTY Session page with the saved session name OSTicketNew entered and Save and Open buttons highlighted

You can now log in with the Username: ubuntu and no password thanks to your Key Pair.

3. Preparing Ubuntu for the OSTicket Installation

The first thing we do now is to update our Ubuntu Server.

Terminalbash
sudo apt update
sudo apt upgrade -y

Leave everything in Default when you get asked questions during the installation.

Now we install Nginx and MySQL Server:

Terminalbash
sudo apt install -y nginx mysql-server

Ubuntu does not ask for a MySQL root password here. The MySQL root account is reachable with sudo mysql instead.

Both services start automatically and are enabled at boot. Let’s quickly check that they are running by typing:

Terminalbash
sudo ss -plntu
Terminal output of netstat -plntu showing nginx on port 80 and MySQL on port 3306 listening

You can see the two lines highlighted in yellow, indicating our Web server and MySQL is up and running. The screenshot comes from netstat, and ss prints a similar list.

Now we install PHP-FPM and all extensions that are necessary. Ubuntu 24.04 ships PHP 8.3, which osTicket 1.18.4 supports:

Terminalbash
sudo apt install -y php8.3-cli php8.3-mysql php8.3-fpm php8.3-gd php8.3-imap php8.3-xml php8.3-mbstring php8.3-intl php8.3-zip php-apcu

Once that is done, we need to change a line in our php.ini

Terminalbash
sudo nano /etc/php/8.3/fpm/php.ini

Find the line cgi.fix_pathinfo by pressing CTRL+W to find it, un-comment it and change its value to 0.

Snippettext
cgi.fix_pathinfo=0
nano editing php.ini with the cgi.fix_pathinfo line uncommented and set to 0

Save and close the File by pressing CTRL+O and CTRL+X.

Now we need to restart the PHP-FPM service and add it to auto-start.

Terminalbash
sudo systemctl restart php8.3-fpm
sudo systemctl enable php8.3-fpm

Next, PHP-FPM needs to work with our Nginx Web Server. We do that in the OSTicket virtual host in step 5, so you do not need to edit the default Nginx site. The screenshot below shows that older edit from Ubuntu 16.04 and is only kept for reference.

Nginx default site config with the PHP location block and php7.0-fpm socket lines uncommented

Time to create our OSTicket database.

4. Configuring the OSTicket Database

At first, we will run a little script that ensures that our MySQL installation os properly secured.

Snippettext
sudo mysql_secure_installation

The root account uses socket authentication, so you can answer the password questions below with N. The screenshot comes from an older MySQL version and the questions look a bit different today.

We skip the first Question by typing N for No or any other key.

mysql_secure_installation prompt asking whether to set up the VALIDATE PASSWORD plugin

Following the other questions:

Snippettext
Change the password for root? -N
Remove anonymous Users? -Y
Disallow Root login remotely? -Y
Remove test database and access to it? -Y
Reload privilege tables now? -Y

Let’s connect to our MySQL shell now.

Terminalbash
sudo mysql

We need to run a couple commands now to create our Database and User for OSTicket.

Snippettext
CREATE DATABASE osticket_db;
CREATE USER 'osticket'@'localhost' IDENTIFIED BY 'choose-a-strong-password';
GRANT ALL PRIVILEGES ON osticket_db.* TO 'osticket'@'localhost';
FLUSH PRIVILEGES;
EXIT;

That’s it for MySQL so far.

5. Create OsTicket Virtual Host

Now we have to create the virtual host configuration for OsTicket

Let’s navigate to our Nginx virtual host directory and create a new file called “osticket”

Terminalbash
cd /etc/nginx/sites-available/
sudo nano osticket

Now paste the following config into that file and replace “osticket.ceos3c.com;” next to server_name with either the IP or the FQDN of your OsTicket Server:

Snippettext
server {
  listen 80;
        server_name osticket.ceos3c.com;
 
        root   /var/www/osticket/upload;
 
        access_log  /var/log/nginx/access.log;
        error_log  /var/log/nginx/error.log;
 
        index index.php;
        client_max_body_size 2000M;
        client_body_buffer_size 100M;
        client_header_buffer_size 10M;
        large_client_header_buffers 2 10M;
 
        client_body_timeout 12;
        client_header_timeout 12;
        keepalive_timeout 15;
        send_timeout 10;
 
        gzip             on;
        gzip_comp_level  2;
        gzip_min_length  1000;
        gzip_proxied     expired no-cache no-store private auth;
        gzip_types       text/plain application/x-javascript text/xml text/css application/xml;
 
        set $path_info "";
 
        location ~ /include {
            deny all;
            return 403;
        }
 
        if ($request_uri ~ "^/api(/[^\?]+)") {
            set $path_info $1;
        }
 
        location ~ ^/api/(?:tickets|tasks).*$ {
            try_files $uri $uri/ /api/http.php?$query_string;
        }
 
        if ($request_uri ~ "^/scp/.*\.php(/[^\?]+)") {
            set $path_info $1;
        }
 
        location ~ ^/scp/ajax.php/.*$ {
            try_files $uri $uri/ /scp/ajax.php?$query_string;
        }
 
        location / {
            try_files $uri $uri/ index.php;
        }
 
        location ~ \.php$ {
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            include        fastcgi_params;
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php8.3-fpm.sock;
            fastcgi_param  PATH_INFO    $path_info;
        }
}
Nginx osticket virtual host file with the server_name line to replace with your IP or FQDN

Save with CTRL+O and exit with CTRL+X when done.

Now we just need to activate the host and test the configuration:

Terminalbash
sudo ln -s /etc/nginx/sites-available/osticket /etc/nginx/sites-enabled/
sudo rm /etc/nginx/sites-enabled/default
sudo nginx -t

We remove the default site so it does not answer on port 80 instead of OSTicket.

If everything went well, you should get a positive:

Terminal showing nginx -t reporting the configuration file syntax is ok and test is successful

Alright, last but not least:

Terminalbash
sudo systemctl restart nginx

Now on to the last step, Downloading and Installing OSTicket.

6. Downloading and Installing OSTicket

Alright, we are getting toward the end of the whole procedure.

At first, we need to create a directory for OSTicket:

Terminalbash
sudo mkdir -p /var/www/osticket

After this we are going to go into this directory:

Terminalbash
cd /var/www/osticket

Now we are going to Download OSTicket. To verify which is the latest version, head over to the OSTicket download page or the GitHub releases and have a look which one it is.

After that, you are going to run wget and REPLACE v1.18.4 and the file name with the newest version that you found. As of November 2026 the newest version is osTicket v1.18.4:

Terminalbash
sudo wget https://github.com/osTicket/osTicket/releases/download/v1.18.4/osTicket-v1.18.4.zip

Now we need to extract the .zip file, for this, we first need to install unzip

Terminalbash
sudo apt install -y unzip

Now we are going to extract it:

Terminalbash
sudo unzip osTicket-v1.18.4.zip

That done, we are going to copy the sample config file to a different location.

Terminalbash
cd upload/
sudo cp include/ost-sampleconfig.php include/ost-config.php

In this last step, we need to change the owner of all osticket files and directories to the www-data users and group.

Terminalbash
cd /var/www/osticket/
sudo chown -R www-data:www-data upload/

7. Finalizing the OsTicket installation

Open your web browser and navigate to the IP or FQDN of your server.

You should be greeted with a screen like this, eventually, everything being green:

osTicket Installer welcome page with all prerequisites green and the Continue button highlighted

After clicking on continue, you can go ahead and fill everything out according to your company.

Mind that Default Email is the actual Service Desk’s email. The Admin Email is your Email.

So something like support@company.com should be good for Default Email.

osTicket Basic Installation form with helpdesk name, default email and admin user fields filled in

Make sure to fill out your Database settings exactly as we set it up in the earlier step.

The database name is osticket_db, the user is osticket and the password is the one you chose in step 4.

osTicket installer Database Settings with osticket_db and user filled in, Install Now highlighted

If all goes well, you end up on a screen like the one below:

osTicket installer Congratulations page with config file permission cleanup instructions

8. Cleaning up

Now we just going to delete our setup directory and remove the write permission from the osticket config file:

Terminalbash
cd /var/www/osticket/upload/

And:

Terminalbash
sudo rm -r setup/
sudo chmod 0644 include/ost-config.php

Congratulations! You successfully installed OsTicket on AWS.

To test the Admin and Agent login head to either one of those:

Snippettext
http://yourserveraddress/scp/ for Admin
http://yourserveraddress/scp/index.php for Agent
osTicket staff login page with Email or Username and Password fields and a Log In button

And you are done!

I will not go through the OsTicket Configuration. There are tons of tutorials for that out there.

FAQ

Which PHP version does osTicket need?

osTicket 1.18.4 supports PHP 8.2 to 8.4, with 8.4 recommended, plus the mysqli extension and MySQL 5.5 or newer. Ubuntu 24.04 LTS ships PHP 8.3, which fits.

Can I use Ubuntu 26.04 LTS instead of 24.04?

Not with the stock packages. Ubuntu 26.04 LTS ships PHP 8.5, which is outside the range osTicket 1.18.4 supports. Stay on Ubuntu 24.04 LTS until osTicket lists PHP 8.5.

Is running osTicket on AWS free?

osTicket itself is free and open source. On AWS accounts opened on or after July 15, 2025, the free plan gives you USD $100 in credits, with up to $100 more, for 6 months or until the credits run out. Older accounts keep the 12-month Free Tier. Check the Billing console to see when your plan ends.

Why do I get 502 Bad Gateway or the default Nginx page?

A 502 usually means the fastcgi_pass socket in your virtual host does not exist. Run ls /run/php/ and make sure the name matches, for example php8.3-fpm.sock. The default Nginx page means the default site is still enabled, so remove /etc/nginx/sites-enabled/default and restart Nginx.

whoami

Stefan founded Ceos3c in 2016 and has spent a decade teaching cybersecurity, Linux, and web development through hands-on tutorials. He builds and ships real products while sharing his journey: ProofSwap.me, XPMetric.com, and EasyEarningsTracker.com.

More about me

2 thoughts on “How to install OSTicket on AWS”

  1. I am getting the following error

    „Failed to load resource: the server responded with a status of 400 (Bad Request)“

    I have configured as per the steps mentioned above.

    So do let me know to resolve the issue.

Comments are closed. I keep the discussion here because the answers still help.