
Every IT department hits the same wall sooner or later. Tickets live in somebody’s inbox, the hardware list is a spreadsheet nobody trusts, and the licence renewal for a critical tool slips past unnoticed. GLPI (Gestionnaire Libre de Parc Informatique) fixes that. It is a free ITSM and asset management platform that combines a helpdesk, an inventory, contract tracking and a knowledge base in one web application.
Installing it is where people trip. The usual pattern is that someone unpacks the archive into /var/www/html, clicks through the web installer, and ends up with a database password and uploaded files sitting inside the web root. It works for a demo. It is a poor foundation for a system that will hold serial numbers, user directories and internal documentation.
Ubuntu 26.04 LTS adds a few wrinkles. The default PHP is 8.5, and MariaDB has moved its default data directory. GLPI 11 also requires the web server to point at a public subfolder. None of this is hard, but it punishes copy-pasted guides written for Ubuntu 22.04.
This guide builds the setup the way it would go onto a production box. That means Apache with PHP-FPM, MariaDB, a split directory layout, HTTPS, a real cron job and sensible tuning. The troubleshooting section covers the errors that come up most often.
What You Need Before Starting
GLPI 11 needs PHP 8.2 or newer. The documentation also lists MariaDB 10.6 or later, or MySQL 8.0 or later, as the supported database engines. Ubuntu 26.04 ships PHP 8.5 in its default repositories, so no extra PPA is needed. The GLPI community confirms that GLPI 11 supports PHP 8.2 through 8.5.
For sizing, these figures are a reasonable starting point:
| Deployment size | CPU | RAM | Disk |
|---|---|---|---|
| Lab or small team (under 50 users, under 500 assets) | 2 vCPU | 4 GB | 40 GB SSD |
| Mid-size company (around 500 assets, 20 agents) | 4 vCPU | 8 GB | 80 GB SSD |
| Large inventory (5,000+ assets, agent inventory traffic) | 4 to 8 vCPU | 16 GB | 200 GB NVMe |
Disk size depends heavily on attachments and logs. Inventory agents can also create bursts of traffic when thousands of machines check in at once.
You also need:
- A fresh Ubuntu 26.04 LTS server with a sudo user.
- A DNS record such as
glpi.example.compointing at the server. - Ports 80 and 443 reachable from your network.
Start by updating the system.
sudo apt update && sudo apt full-upgrade -y
sudo reboot
The reboot is worth it if a new kernel came down. Fixing it later means a surprise outage at a bad time.
Step 1: Install Apache, PHP-FPM and Required Extensions
There are two common ways to run PHP under Apache. libapache2-mod-php embeds PHP in every Apache worker. PHP-FPM runs PHP as a separate pool. On a server that does one job, the difference looks small. In practice PHP-FPM gives you per-pool resource limits, separate restarts and better behaviour under load, so it is the better default.
sudo apt install -y apache2 php-fpm php-cli php-mysql php-curl php-gd \
php-intl php-mbstring php-xml php-zip php-bcmath php-bz2 php-ldap \
php-apcu php-opcache libapache2-mod-fcgid unzip curl
On recent PHP packaging, php-opcache may be merged into the core package. If apt reports it as unavailable, drop it from the line.
The extension list matters. The GLPI documentation names curl, gd, intl and mysqli as required. For GLPI 11 it adds bcmath (used for QR codes), mbstring and openssl. The ldap extension is not mandatory, but almost every company eventually wants Active Directory or LDAP login, and adding it later means another PHP restart. bz2 and zip help with marketplace packages and archives. apcu is an optional cache.
Enable the modules Apache needs and wire it to FPM.
sudo a2enmod proxy_fcgi setenvif rewrite headers expires ssl
PHPVER=$(php -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')
sudo a2enconf php${PHPVER}-fpm
sudo systemctl restart apache2
php -v
The PHPVER variable avoids hard-coding a version. That helps when you later run a different PHP minor release. On a stock 26.04 machine, php -v should report 8.5.x.
Step 2: Install and Secure MariaDB
sudo apt install -y mariadb-server
sudo systemctl enable --now mariadb
sudo mariadb-secure-installation
Answer the prompts sensibly. Use unix_socket authentication for root, remove anonymous users, disallow remote root login and drop the test database.
One thing to know for 26.04: reports from users who upgraded say the default MariaDB data location has moved from /var/lib/mysql to /var/lib/mariadb. Check where yours lives before you write backup scripts or mount a dedicated volume.
sudo mariadb -e "SELECT @@datadir;"
If you plan to put the database on its own disk, do it now. It is a five-minute job on an empty server and an unpleasant one on a live system.
Create the database and user
sudo mariadb <<'SQL'
CREATE DATABASE glpi CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'glpi_user'@'localhost' IDENTIFIED BY 'ReplaceWithALongRandomPassword';
GRANT ALL PRIVILEGES ON glpi.* TO 'glpi_user'@'localhost';
GRANT SELECT ON mysql.time_zone_name TO 'glpi_user'@'localhost';
FLUSH PRIVILEGES;
SQL
Generate the password with openssl rand -base64 24 rather than inventing one. The SELECT grant on mysql.time_zone_name is easy to miss. GLPI uses it to check time zone support, and without it the admin panel nags you about timezones later.
Load time zone data
mariadb-tzinfo-to-sql /usr/share/zoneinfo | sudo mariadb mysql
If your older notes say mysql_tzinfo_to_sql, the MariaDB-named binaries are the current naming. Use them.
Step 3: Download GLPI
Never use a GitHub “Source code” zip or a git clone. Those lack the compiled assets and the vendor folder. The GLPI forum is clear that you should use the release archives, which include the dependencies and compiled locales.
Check the GLPI releases page for the latest stable 11.x tag, then set it as a variable.
cd /tmp
GLPI_VER="11.0.x" # replace with the current stable release number
curl -LO https://github.com/glpi-project/glpi/releases/download/${GLPI_VER}/glpi-${GLPI_VER}.tgz
curl -LO https://github.com/glpi-project/glpi/releases/download/${GLPI_VER}/glpi-${GLPI_VER}.tgz.sha256 2>/dev/null || true
sudo tar -xzf glpi-${GLPI_VER}.tgz -C /var/www/
ls /var/www/glpi
If a checksum file is published for the release, verify it with sha256sum before extracting. Skipping it on a server that will hold inventory data is a habit worth breaking.
Step 4: Split the Directory Layout
This step is the one most tutorials skip, and it is the most important one for security.
By default GLPI keeps its config, uploaded files, logs, cache and sessions under its own tree. Separating them gives you three things. Writable data stays away from application code. Backups become simple, because you back up /var/lib/glpi and the database. Upgrades also become cleaner, because you replace the code directory without touching data.
sudo mkdir -p /etc/glpi /var/lib/glpi /var/log/glpi
sudo mv /var/www/glpi/config/* /etc/glpi/
sudo mv /var/www/glpi/files/* /var/lib/glpi/
Next, tell GLPI where things now live. Create the downstream file.
sudo tee /var/www/glpi/inc/downstream.php >/dev/null <<'EOF'
<?php
define('GLPI_CONFIG_DIR', '/etc/glpi/');
if (file_exists(GLPI_CONFIG_DIR . '/local_define.php')) {
require_once GLPI_CONFIG_DIR . '/local_define.php';
}
EOF
And the local definitions.
sudo tee /etc/glpi/local_define.php >/dev/null <<'EOF'
<?php
define('GLPI_VAR_DIR', '/var/lib/glpi');
define('GLPI_DOC_DIR', GLPI_VAR_DIR);
define('GLPI_CRON_DIR', GLPI_VAR_DIR . '/_cron');
define('GLPI_DUMP_DIR', GLPI_VAR_DIR . '/_dumps');
define('GLPI_GRAPH_DIR', GLPI_VAR_DIR . '/_graphs');
define('GLPI_LOCK_DIR', GLPI_VAR_DIR . '/_lock');
define('GLPI_PICTURE_DIR', GLPI_VAR_DIR . '/_pictures');
define('GLPI_PLUGIN_DOC_DIR', GLPI_VAR_DIR . '/_plugins');
define('GLPI_RSS_DIR', GLPI_VAR_DIR . '/_rss');
define('GLPI_TMP_DIR', GLPI_VAR_DIR . '/_tmp');
define('GLPI_UPLOAD_DIR', GLPI_VAR_DIR . '/_uploads');
define('GLPI_CACHE_DIR', GLPI_VAR_DIR . '/_cache');
define('GLPI_LOG_DIR', '/var/log/glpi');
EOF
Run the folder listing once before you move on. Some GLPI releases change the exact list of subfolders in files/. If the installer later complains about a missing directory, compare against what actually landed in /var/lib/glpi.
Ownership and permissions
sudo chown -R root:root /var/www/glpi
sudo chown -R www-data:www-data /etc/glpi /var/lib/glpi /var/log/glpi
sudo find /var/www/glpi -type f -exec chmod 0644 {} \;
sudo find /var/www/glpi -type d -exec chmod 0755 {} \;
sudo chmod -R 0750 /etc/glpi /var/lib/glpi /var/log/glpi
Application code owned by root and read-only to the web user is a quiet but effective defence. If a plugin vulnerability allows a file write, the attacker cannot simply drop a webshell into the code tree.
Step 5: Configure the Apache Virtual Host
GLPI 11 requires the document root to be the public folder. In GLPI 10 that was optional. Pointing Apache at the application root is the single most common reason a fresh GLPI 11 install shows a broken page.
sudo tee /etc/apache2/sites-available/glpi.conf >/dev/null <<'EOF'
<VirtualHost *:80>
ServerName glpi.example.com
DocumentRoot /var/www/glpi/public
<Directory /var/www/glpi/public>
Require all granted
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
</Directory>
<FilesMatch \.php$>
SetHandler "proxy:unix:/run/php/php-fpm.sock|fcgi://localhost"
</FilesMatch>
ErrorLog ${APACHE_LOG_DIR}/glpi_error.log
CustomLog ${APACHE_LOG_DIR}/glpi_access.log combined
</VirtualHost>
EOF
The /run/php/php-fpm.sock path is a symlink that Debian and Ubuntu packages maintain to the active PHP-FPM socket. If your server runs several PHP versions side by side, point at the versioned socket instead, such as /run/php/php8.5-fpm.sock.
sudo a2dissite 000-default.conf
sudo a2ensite glpi.conf
sudo apache2ctl configtest
sudo systemctl reload apache2
Always run configtest before a reload. A typo found at that stage costs nothing. Found after a reload, it can mean dropped sessions for users in the middle of a ticket.
Step 6: Tune PHP for GLPI
Create a drop-in file instead of editing the main php.ini. Package upgrades will not overwrite it.
PHPVER=$(php -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')
sudo tee /etc/php/${PHPVER}/fpm/conf.d/99-glpi.ini >/dev/null <<'EOF'
memory_limit = 256M
upload_max_filesize = 50M
post_max_size = 55M
max_execution_time = 60
max_input_vars = 5000
session.cookie_httponly = 1
session.cookie_secure = 1
session.cookie_samesite = Lax
session.use_strict_mode = 1
expose_php = Off
date.timezone = Asia/Jakarta
opcache.enable = 1
opcache.memory_consumption = 192
opcache.max_accelerated_files = 20000
opcache.validate_timestamps = 1
opcache.revalidate_freq = 60
EOF
sudo systemctl restart php${PHPVER}-fpm
Adjust date.timezone to your own region. Mismatched timezones are the reason SLA timers look off by seven hours, and nobody enjoys explaining that to a manager.
A few settings are worth a closer look. session.cookie_secure = 1 assumes HTTPS, which the next step provides. Do not set it before TLS works, or logins will loop. post_max_size should always exceed upload_max_filesize. If a user attaches a 40 MB screenshot bundle and your limits are mismatched, the upload fails with nothing helpful in the UI.
Step 7: Enable HTTPS
Plain HTTP for a helpdesk is not acceptable. Tickets contain credentials more often than anyone admits.
For a public hostname, use Let’s Encrypt.
sudo apt install -y certbot python3-certbot-apache
sudo certbot --apache -d glpi.example.com --redirect -m admin@example.com --agree-tos
sudo systemctl list-timers | grep certbot
For a purely internal server with no public DNS, use your internal CA or the DNS-01 challenge. A self-signed certificate works, but it trains staff to click through browser warnings, which is the wrong habit.
Once TLS is live, add security headers to the HTTPS vhost that Certbot generated.
Header always set Strict-Transport-Security "max-age=31536000"
Header always set X-Content-Type-Options "nosniff"
Header always set X-Frame-Options "SAMEORIGIN"
Header always set Referrer-Policy "strict-origin-when-cross-origin"
Start with a short HSTS lifetime while testing, then raise it. A wrong HSTS value is hard to undo, because browsers cache it.
Step 8: Run the GLPI Installer
You can use the web wizard. The command line is better for a repeatable install, and it gives better error messages.
First, check requirements.
cd /var/www/glpi
sudo -u www-data php bin/console system:check_requirements
The official FAQ lists a requirements check command, so use it as a pre-flight test. If the command name differs on your release, run php bin/console list and look under the glpi or system namespace. Fix every red item before you continue.
Now install.
sudo -u www-data php bin/console database:install \
--db-host=localhost \
--db-name=glpi \
--db-user=glpi_user \
--db-password='ReplaceWithALongRandomPassword' \
--default-language=en_GB \
--no-interaction
The installer writes its config into /etc/glpi, which confirms the split layout is working. If it tries to write into /var/www/glpi/config, recheck the downstream.php file.
Open https://glpi.example.com in a browser. The default accounts are glpi/glpi (super-admin), tech/tech, normal/normal and post-only/postonly. Do not leave any of them alone for a minute longer than necessary.
First actions after login
- Change the
glpipassword and create a personal admin account. - Disable or delete
tech,normalandpost-only. - Remove the installer leftovers if your version leaves any. Current releases handle this, but verify that
/var/www/glpi/install/install.phpis not accessible. - Set the entity name, default language, administrator email and SMTP settings under Setup.
- Test outgoing mail. Notifications that silently fail are a classic reason users think GLPI “ignores” their tickets.
Step 9: Configure the Cron Job
This part gets skipped constantly, and it quietly breaks GLPI. Automatic actions handle mail collection, SLA escalation, notifications, stock alerts and cleanup. By default they are triggered by user page loads, which is unreliable and slow.
Switch the automatic actions mode to CLI in Setup, then add a system cron entry.
sudo tee /etc/cron.d/glpi >/dev/null <<'EOF'
* * * * * www-data /usr/bin/php /var/www/glpi/front/cron.php &>/dev/null
EOF
sudo chmod 0644 /etc/cron.d/glpi
Running it every minute is what the project recommends for busy installs. The task scheduler inside GLPI decides what actually runs, so a minute-level trigger does not mean everything executes every minute.
Afterwards, open Setup, then Automatic actions, and confirm that the “Last run” column moves forward. If it does not, check /var/log/glpi/cron.log and journalctl -u cron.
Performance Tuning for Real Workloads
Database tuning
MariaDB defaults are conservative. A MariaDB drop-in works on most 26.04 systems.
sudo tee /etc/mysql/mariadb.conf.d/60-glpi.cnf >/dev/null <<'EOF'
[mysqld]
innodb_buffer_pool_size = 2G
innodb_log_file_size = 512M
innodb_flush_log_at_trx_commit = 2
innodb_file_per_table = 1
max_connections = 150
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
slow_query_log = 1
slow_query_log_file = /var/log/mysql/slow.log
long_query_time = 2
EOF
sudo systemctl restart mariadb
Size innodb_buffer_pool_size at roughly 50 to 60 percent of RAM on a shared box, or 70 percent if the machine is dedicated to the database. On a 4 GB all-in-one server, 1.5 to 2 GB is sensible. The value innodb_flush_log_at_trx_commit = 2 trades up to a second of durability on a crash for a large write speed-up. For a helpdesk that is usually acceptable, but decide knowingly. If the folder /var/log/mysql does not exist, create it and give it to the mysql user.
PHP-FPM pool sizing
Check the PHP-FPM pool file under /etc/php/<version>/fpm/pool.d/www.conf.
pm = dynamic
pm.max_children = 20
pm.start_servers = 4
pm.min_spare_servers = 2
pm.max_spare_servers = 6
pm.max_requests = 500
To estimate max_children, measure the average memory of one PHP-FPM worker with ps --no-headers -o rss -C php-fpm8.5 | awk '{s+=$1} END {print s/NR/1024 " MB"}'. Then divide the RAM you can spare by that number. Guessing here is how servers end up in swap.
Disk, network and caching
Put /var/lib/glpi and the database on SSD or NVMe storage. Helpdesk workloads generate many small random reads, and spinning disks show it. Mount data volumes with noatime. Keep vm.swappiness low, around 10, on database hosts.
For network behaviour, enable HTTP/2 with a2enmod http2 and Protocols h2 http/1.1 in the TLS vhost. If hundreds of inventory agents report at once, spread their schedules. A Monday 09:00 synchronised check-in is a self-inflicted traffic spike.
Check your memory and I/O behaviour with the usual tools:
htop
iostat -xz 5
vmstat 5
ss -tulpn
sudo mysqladmin processlist
Troubleshooting Common GLPI Errors
The page shows a raw directory listing, a 404 or a “public” error. The document root is wrong. It must be /var/www/glpi/public. Fix the vhost, run apache2ctl configtest and reload.
Blank page or HTTP 500. Check /var/log/apache2/glpi_error.log and /var/log/glpi/php-errors.log. The usual culprits are a missing PHP extension or wrong file ownership. Re-run the requirements check.
“Your database engine version is not supported.” GLPI 11 expects MariaDB 10.6 or later, or MySQL 8.0 or later. Ubuntu 26.04’s repository version should satisfy that. If you see this on a custom build, check mariadb --version. Forum posts suggest patching the version check in source. Do not do that on production, because it hides real incompatibilities.
PHP-FPM socket errors, such as “proxy: AH01114” or “File not found.” The SetHandler path does not match the real socket. Run ls /run/php/ and use the correct name. Also confirm that PHP-FPM is running with systemctl status php8.5-fpm.
After upgrading Ubuntu, Apache and PHP stop serving pages. This shows up on forums after in-place upgrades to 26.04. Check that the old libapache2-mod-php module and the FPM handler are not conflicting. Run a2query -m | grep php, disable the old mpm_prefork and php* modules, enable mpm_event, and restart.
Timezone warning in the admin panel. You skipped the timezone load or the grant. Re-run the mariadb-tzinfo-to-sql command and the GRANT SELECT ON mysql.time_zone_name statement from earlier, then enable timezones in the GLPI console.
Uploads failing silently. Compare upload_max_filesize and post_max_size. Check that /var/lib/glpi/_tmp is writable by www-data. Check that Apache’s LimitRequestBody is not set lower.
Emails never arrive. Test SMTP from the server with swaks or openssl s_client -connect smtp.example.com:587 -starttls smtp. Then confirm that the cron job runs, because queued notifications are sent by an automatic action.
Cron jobs show “Last run: never.” Check that the cron file has no dots in its name issues, is mode 0644 and names a valid user. Run sudo -u www-data php /var/www/glpi/front/cron.php by hand and read the output.
Database connection refused after a reboot. On 26.04 the data directory may differ from your assumptions. Check systemctl status mariadb and journalctl -u mariadb -b.