What GLPI does
GLPI is free, open-source software for IT service and asset management. On the service desk side, it tracks tickets with ITIL vocabulary — incidents and requests, then problems and changes —, measures response times with SLAs and keeps answers in a knowledge base. On the asset side, it records computers, network equipment and software, and attaches contracts, suppliers and licences to each device.
GLPI is released under the GPL-3.0 licence and published by Teclib', a French company. It is very widespread in French-speaking companies and public administrations: your technicians may well know it already.
What GLPI gives you
- A single front door — every request becomes a ticket, with its requester, its technician and its history.
- Measured commitments — SLAs for time to own and time to resolve, tracked ticket by ticket.
- An inventory that keeps itself current — the GLPI Agent reports each machine's hardware and software, with no data entry.
- Context on every ticket — the computer involved, its licences and its maintenance contract, one click away.
- A knowledge base — recurring fixes, published for technicians or for end users.
- Your data stays with you — tickets, inventory and attachments remain on your VPS.
Spreadsheet and shared mailbox, or GLPI on your VPS
Scroll the table
| Spreadsheet and shared mailbox | GLPI on your VPS | |
|---|---|---|
| Request tracking | Email threads to reread | One ticket per request, with its status |
| Who handles it | Whoever read the message | An assigned technician or group |
| Response times | Unknown | SLAs tracked ticket by ticket |
| Asset inventory | Typed by hand, soon outdated | Reported by the GLPI Agent |
| A machine's history | Scattered | Tickets, licences and contracts on its record |
Prepare the server
An Ubuntu 24.04 VPS with 2 GB of RAM and 2 vCPUs is enough for a small team: GLPI is a PHP application backed by a MariaDB database. Install Docker and the Compose plugin, then point a domain name at the VPS's IP address, for example glpi.example.com: it will carry the HTTPS certificate and the links in notifications.
The official glpi/glpi image is maintained by the GLPI project. Once its five GLPI_DB_* variables are set, it installs the database on first start, then runs GLPI's automatic actions every minute inside the container: no cron job to set up on the host.
Install GLPI with Docker Compose
Prepare the folder and the .env file
The file holds both MariaDB passwords: the
glpiuser's androot's.mkdir -p /opt/glpi && cd /opt/glpi cat > .env <<EOF DB_PASSWORD=$(openssl rand -hex 16) DB_ROOT_PASSWORD=$(openssl rand -hex 16) EOF chmod 600 .envWrite the docker-compose.yml file
Two services: MariaDB and GLPI. GLPI waits until the database is ready, and its port is published on the loopback interface only: nginx alone will face the Internet.
services: db: image: mariadb:11.4 restart: unless-stopped environment: MARIADB_DATABASE: glpi MARIADB_USER: glpi MARIADB_PASSWORD: ${DB_PASSWORD} MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD} volumes: - glpi-db:/var/lib/mysql healthcheck: test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"] interval: 10s retries: 30 glpi: image: glpi/glpi:12.0.2 restart: unless-stopped depends_on: db: condition: service_healthy environment: GLPI_DB_HOST: db GLPI_DB_PORT: "3306" GLPI_DB_NAME: glpi GLPI_DB_USER: glpi GLPI_DB_PASSWORD: ${DB_PASSWORD} ports: - "127.0.0.1:8124:80" volumes: - glpi-data:/var/glpi volumes: glpi-db: {} glpi-data: {}Start and check
On first start, the image creates the database schema: allow one to two minutes. GLPI must then answer locally.
docker compose up -d docker compose logs -f glpi curl -sI http://127.0.0.1:8124/ | head -n 1Lock down the factory accounts
The automatic install creates four accounts with public passwords:
glpi/glpi(super-admin),tech/tech,normal/normalandpost-only/postonly. Give theglpiaccount a strong password and disable the other three.docker compose exec glpi php bin/console user:reset_password glpi --password='<strong-password>' docker compose exec glpi php bin/console user:disable tech docker compose exec glpi php bin/console user:disable normal docker compose exec glpi php bin/console user:disable post-only
Never leave glpi/glpi, tech/tech and the like active
These credentials are public: anyone can try them on your address. The glpi account has every right, configuration, tickets and inventory included. Lock down all four factory accounts before opening the reverse proxy, then create one named account per technician under Administration, Users.
Publish GLPI over HTTPS behind nginx
Get a certificate with certbot (certbot certonly --nginx -d glpi.example.com), then declare a server block that forwards the X-Forwarded-Proto header:
server {
listen 443 ssl;
server_name glpi.example.com;
ssl_certificate /etc/letsencrypt/live/glpi.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/glpi.example.com/privkey.pem;
client_max_body_size 100m;
location / {
proxy_pass http://127.0.0.1:8124;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
}
}Then declare the public URL: GLPI writes it into the links of its notifications and of tickets created by email.
docker compose exec glpi php bin/console config:set url_base https://glpi.example.comCollect tickets by email
Create a dedicated mailbox, for example [email protected], reachable over IMAP. Under Setup, Receivers, add a receiver: IMAP server, port, SSL encryption, and the mailbox's login and password. Every incoming message becomes a ticket with the sender as requester, and a reply to a notification is added to the existing ticket instead of opening a new one.
Checking the mailbox is one of GLPI's automatic actions: the image already runs them every minute, so there is nothing to schedule. For notifications to go out, also set an SMTP server under Setup, Notifications.
Inventory machines with the GLPI Agent
Under Administration, Inventory, enable the inventory. Then install the GLPI Agent on every workstation and server — MSI installer on Windows, package on Linux and macOS — and point it at your instance:
glpi-agent --server https://glpi.example.com/This command sends a first inventory: the machine shows up under Assets, Computers, with its processor, memory, disks, operating system and installed software. Put the same address in the server option of the agent's configuration: its service will then send the inventory at regular intervals, with no action on your part.
Backup and upgrade
All of GLPI's state lives in two places: the MariaDB database and the glpi-data volume, which holds GLPI's configuration and files, attachments included.
cd /opt/glpi
docker compose exec -T db sh -c 'mariadb-dump -uroot -p"$MARIADB_ROOT_PASSWORD" glpi' | gzip > glpi-$(date +%F).sql.gz
docker run --rm -v glpi_glpi-data:/src -v "$PWD:/dst" alpine \
tar czf /dst/glpi-data-$(date +%F).tar.gz -C /src .To upgrade, back up first, change the image tag in docker-compose.yml, then run docker compose pull && docker compose up -d. On restart, the image applies the database schema update itself: GLPI_SKIP_AUTOUPDATE defaults to false.
GLPI in one click on ServOrbit
The ServOrbit Marketplace installs exactly this stack: the official glpi/glpi image and MariaDB, port published on 127.0.0.1 only, HTTPS on a subdomain of your domain or on the VPS's free subdomain, of the form glpi.<identifier>.servorbit-dns.com — no need to buy a domain. The glpi account's password is replaced with a generated one, shown in your client area; the tech, normal and post-only accounts are disabled and the public URL is declared.
servorbit.com/ma-en/blog/self-host-glpi-vps-itsm-asset-management
