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
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.

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 instance type that is marked Free Tier eligible. A small instance is sufficient for our Ticket System.

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.

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.

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

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.

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

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.

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.

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.

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

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

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.
sudo apt update
sudo apt upgrade -yLeave everything in Default when you get asked questions during the installation.
Now we install Nginx and MySQL Server:
sudo apt install -y nginx mysql-serverUbuntu 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:
sudo ss -plntu
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:
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-apcuOnce that is done, we need to change a line in our php.ini
sudo nano /etc/php/8.3/fpm/php.iniFind the line cgi.fix_pathinfo by pressing CTRL+W to find it, un-comment it and change its value to 0.
cgi.fix_pathinfo=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.
sudo systemctl restart php8.3-fpm
sudo systemctl enable php8.3-fpmNext, 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.

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.
sudo mysql_secure_installationThe 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.

Following the other questions:
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? -YLet’s connect to our MySQL shell now.
sudo mysqlWe need to run a couple commands now to create our Database and User for OSTicket.
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”
cd /etc/nginx/sites-available/
sudo nano osticketNow 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:
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;
}
}
Save with CTRL+O and exit with CTRL+X when done.
Now we just need to activate the host and test the configuration:
sudo ln -s /etc/nginx/sites-available/osticket /etc/nginx/sites-enabled/
sudo rm /etc/nginx/sites-enabled/default
sudo nginx -tWe remove the default site so it does not answer on port 80 instead of OSTicket.
If everything went well, you should get a positive:

Alright, last but not least:
sudo systemctl restart nginxNow 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:
sudo mkdir -p /var/www/osticketAfter this we are going to go into this directory:
cd /var/www/osticketNow 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:
sudo wget https://github.com/osTicket/osTicket/releases/download/v1.18.4/osTicket-v1.18.4.zipNow we need to extract the .zip file, for this, we first need to install unzip
sudo apt install -y unzipNow we are going to extract it:
sudo unzip osTicket-v1.18.4.zipThat done, we are going to copy the sample config file to a different location.
cd upload/
sudo cp include/ost-sampleconfig.php include/ost-config.phpIn this last step, we need to change the owner of all osticket files and directories to the www-data users and group.
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:

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.

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.

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

8. Cleaning up
Now we just going to delete our setup directory and remove the write permission from the osticket config file:
cd /var/www/osticket/upload/And:
sudo rm -r setup/
sudo chmod 0644 include/ost-config.phpCongratulations! You successfully installed OsTicket on AWS.
To test the Admin and Agent login head to either one of those:
http://yourserveraddress/scp/ for Admin
http://yourserveraddress/scp/index.php for Agent
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.
2 thoughts on “How to install OSTicket on AWS”
Comments are closed. I keep the discussion here because the answers still help.
More posts
All SysAdmin


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.
Does AWS allow the outgoing emails from osTicket? Isn't the 25 port blocked?