Ubuntu 24.04 LTS
This guide covers a fresh installation of osTicket 1.18.4, Apache, MariaDB, and PHP 8.3. The release supports PHP 8.2–8.4, so Ubuntu 24.04’s PHP 8.3 packages can be used without an additional PHP repository. See the versioned requirements.
Replace helpdesk.example.com with your hostname and point its DNS record to the server. Run the administration commands with a sudo-enabled account. For an existing helpdesk, follow the upgrade guide instead.
Install Dependencies
Use Apache’s PHP module for this installation:
sudo apt update
sudo apt install -y software-properties-common
sudo add-apt-repository -y universe
sudo apt update
sudo apt install -y apache2 mariadb-server ca-certificates curl unzip cron openssl php8.3-cli libapache2-mod-php8.3 php8.3-mysql php8.3-curl php8.3-gd php8.3-imap php8.3-mbstring php8.3-intl php8.3-apcu php8.3-xml php8.3-zip php8.3-ldap php8.3-opcache
sudo systemctl enable --now apache2 mariadb cron
sudo a2enmod php8.3 rewrite
php8.3 --version
php8.3 -m
IMAP supports mailbox fetching; LDAP is included for the optional LDAP authentication plugin. On a server already using PHP-FPM or another PHP version, reconcile the existing Apache configuration before enabling another handler.
Configure PHP
Create a local override for Apache:
sudo tee /etc/php/8.3/apache2/conf.d/99-osticket.ini > /dev/null <<'EOF'
date.timezone = America/Montreal
memory_limit = 512M
upload_max_filesize = 20M
post_max_size = 32M
display_errors = Off
log_errors = On
EOF
sudo cp /etc/php/8.3/apache2/conf.d/99-osticket.ini /etc/php/8.3/cli/conf.d/99-osticket.ini
sudo apache2ctl configtest
sudo systemctl restart apache2
Change the timezone as needed. These upload sizes are examples; keep post_max_size larger than the total request size you intend to accept. Set the application’s attachment limits accordingly under System Settings.
php8.3 -m checks the CLI environment. Confirm the web runtime and extensions in the installer and later under Admin Panel > Dashboard > Information.
Configure MariaDB
sudo mariadb-secure-installation
openssl rand -hex 32
sudo mariadb
Retain socket authentication for the local database administrator when appropriate. Use the generated password below in place of REPLACE_WITH_RANDOM_PASSWORD and keep it for the web installer.
CREATE DATABASE osticket CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'osticket'@'localhost' IDENTIFIED BY 'REPLACE_WITH_RANDOM_PASSWORD';
GRANT ALL PRIVILEGES ON osticket.* TO 'osticket'@'localhost';
SHOW GRANTS FOR 'osticket'@'localhost';
EXIT;
Test the application account:
mariadb -u osticket -p -h localhost osticket -e 'SELECT DATABASE();'
The account has privileges on the osTicket database only. CREATE USER sets the password; the GRANT statement does not change it.
Download osTicket
Use the packaged release ZIP, which contains an upload directory, rather than GitHub’s automatic source-code archive. The URL and archive name below both use v1.18.4.
Run this block in Bash:
(
set -eu
workdir=$(mktemp -d)
cd "$workdir"
curl -fL -o osTicket-v1.18.4.zip https://github.com/osTicket/osTicket/releases/download/v1.18.4/osTicket-v1.18.4.zip
unzip -q osTicket-v1.18.4.zip -d package
test -f package/upload/include/ost-sampleconfig.php
sudo install -d -o root -g root -m 0755 /var/www/osticket
sudo cp -a package/upload/. /var/www/osticket/
)
sudo chown -R root:root /var/www/osticket
sudo find /var/www/osticket -type d -exec chmod 0755 {} +
sudo find /var/www/osticket -type f -exec chmod 0644 {} +
sudo cp /var/www/osticket/include/ost-sampleconfig.php /var/www/osticket/include/ost-config.php
sudo chown root:www-data /var/www/osticket/include/ost-config.php
sudo chmod 0660 /var/www/osticket/include/ost-config.php
The web server temporarily needs write access to ost-config.php. Keep the rest of the application owned by root. This guide copies the contents of upload directly into /var/www/osticket, which becomes the document root.
Configure Apache
sudo tee /etc/apache2/sites-available/osticket.conf > /dev/null <<'EOF'
<VirtualHost *:80>
ServerName helpdesk.example.com
DocumentRoot /var/www/osticket
<Directory /var/www/osticket>
Options -Indexes +FollowSymLinks
AllowOverride All
Require all granted
DirectoryIndex index.php
</Directory>
ErrorLog ${APACHE_LOG_DIR}/osticket-error.log
CustomLog ${APACHE_LOG_DIR}/osticket-access.log combined
</VirtualHost>
EOF
sudo a2ensite osticket.conf
sudo apache2ctl configtest
sudo systemctl reload apache2
curl -I -H 'Host: helpdesk.example.com' http://127.0.0.1/
The final request tests the intended virtual host even before DNS is configured. Browse using the configured hostname; an IP-only request may select another site’s default virtual host.
If UFW is already active:
sudo ufw allow 'Apache Full'
sudo ufw status
This virtual host initially serves HTTP. Configure a valid TLS certificate and HTTPS before entering administrator credentials over an untrusted network. Port 443 being allowed through the firewall does not itself enable HTTPS.
Complete the Web Installer
Open the site’s /setup/ page and resolve any prerequisite errors. Enter:
- The helpdesk name, support email address, and primary language.
- A separate administrator name, email address, username, and strong password.
- Database host:
localhost. - Database name and username:
osticket. - The database password created earlier.
- A table prefix such as
ost_.
Complete the installation and sign in at /scp/. Keep the setup directory until the installer reports success. See the installation instructions.
Finish the Installation
Only after the web installer succeeds, remove its directory and make the configuration read-only for Apache:
sudo rm -r -- /var/www/osticket/setup
sudo chown root:www-data /var/www/osticket/include/ost-config.php
sudo chmod 0640 /var/www/osticket/include/ost-config.php
sudo -u www-data test -r /var/www/osticket/include/ost-config.php && echo 'Configuration is readable'
sudo -u www-data test ! -w /var/www/osticket/include/ost-config.php && echo 'Configuration is not writable'
Check the helpdesk URL, timezone, system email, and online/offline status in the Admin Panel. Create a test ticket and verify that an agent can reply before making the helpdesk available to users. See the post-install guide.
Scheduled Tasks and Email
Test the CLI task as the web-server user:
sudo -u www-data /usr/bin/php8.3 /var/www/osticket/api/cron.php
Schedule it every five minutes:
echo '*/5 * * * * www-data /usr/bin/php8.3 /var/www/osticket/api/cron.php' | sudo tee /etc/cron.d/osticket > /dev/null
sudo chmod 0644 /etc/cron.d/osticket
sudo systemctl status cron --no-pager
Configure incoming mailbox access and outbound SMTP in the Admin Panel, then enable email fetching if required. Cron does not configure mailbox credentials or SMTP automatically. See the POP3/IMAP settings guide.
Language Packs
Download compatible language .phar files from the official download page. From the directory containing those files, install the languages you need:
sudo install -o root -g root -m 0644 ar.phar /var/www/osticket/include/i18n/ar.phar
sudo install -o root -g root -m 0644 fr.phar /var/www/osticket/include/i18n/fr.phar
sudo install -o root -g root -m 0644 es_MX.phar /var/www/osticket/include/i18n/es_MX.phar
sudo install -o root -g root -m 0644 zh_CN.phar /var/www/osticket/include/i18n/zh_CN.phar
Run only the commands corresponding to files you downloaded. Language packs belong in include/i18n; select the installed language in the appropriate system or user preferences. See osTicket downloads.
Optional Plugins
Download plugin builds compatible with the installed osTicket version. Install only the plugins you need:
sudo install -o root -g root -m 0644 auth-oauth2.phar /var/www/osticket/include/plugins/auth-oauth2.phar
sudo install -o root -g root -m 0644 storage-fs.phar /var/www/osticket/include/plugins/storage-fs.phar
sudo install -o root -g root -m 0644 auth-ldap.phar /var/www/osticket/include/plugins/auth-ldap.phar
Open Admin Panel > Manage > Plugins, add the plugin, activate it, and configure its instance. Copying a PHAR file alone does not finish plugin setup.
For Microsoft integration, follow the applicable official guide:
- Microsoft Authorization Guide for mailbox authorization.
- Microsoft Authentication (SSO) Guide for user authentication.
Store Attachments on the Filesystem
Create a writable storage directory outside the Apache document root:
sudo install -d -o www-data -g www-data -m 0750 /var/lib/osticket/attachments
Install and activate Attachments on the Filesystem, create an active instance, and configure its storage path as /var/lib/osticket/attachments. Then select filesystem storage under Admin Panel > Settings > System > Store Attachments.
Upload a test attachment and confirm it can be downloaded through the helpdesk. Changing the storage setting does not by itself migrate existing database attachments. Back up both the database and attachment directory. See the filesystem storage guide.
Troubleshooting
sudo systemctl status apache2 mariadb cron --no-pager
sudo apache2ctl configtest
sudo apache2ctl -S
sudo tail -n 100 /var/log/apache2/osticket-error.log
sudo journalctl -u mariadb -n 100 --no-pager
- Wrong site opens: Check DNS, the requested hostname, and Apache’s virtual-host mapping.
- Database connection fails: Test the same username and password with the MariaDB command above; use
localhostconsistently. - Installer cannot write configuration: Check ownership and temporary permissions on
include/ost-config.php. - HTTP 500 or missing extension: Check the Apache error log and the web PHP environment, which can differ from CLI PHP.
- Email is not fetched: Check mailbox settings, OAuth authorization when applicable, fetching status, and cron execution.
- Attachments fail: Check PHP/application upload limits and write access to the configured storage directory.