Tutorials

Hands-on guides and configuration examples.

Configuration library · scripts and downloads ↗

Install GLPI 11 with Docker Compose

GLPI brings IT asset inventory and support tickets together.

This guide uses the official GLPI 11 image and MariaDB 10.11 on Debian 13 “Trixie”.

Docker Compose starts both services and keeps their data in persistent volumes.

  1. Set up the directory and password

    Install Docker and the Compose plugin using the Debian 13 guide in the sidebar. Then use Bash to create a dedicated directory and generate a MariaDB password with OpenSSL.

    Terminal
    mkdir -p ~/glpi && cd ~/glpi &&
    (umask 077; set -o noclobber
     password=$(openssl rand -hex 32) &&
     printf 'GLPI_DB_PASSWORD=%s\n' "$password" > .env)

    The .env file contains the password. Keep it private and include it in your backups.

  2. Create the Compose file

    In ~/glpi, create compose.yaml next to the .env file and paste the following content.

    compose.yaml
    services:
      glpi:
        image: glpi/glpi:11.0
        restart: unless-stopped
        ports:
          - "${GLPI_BIND_IP:-127.0.0.1}:${GLPI_PORT:-8082}:80"
        environment:
          GLPI_DB_HOST: db
          GLPI_DB_PORT: "3306"
          GLPI_DB_NAME: glpi
          GLPI_DB_USER: glpi
          GLPI_DB_PASSWORD: "${GLPI_DB_PASSWORD:?Set GLPI_DB_PASSWORD in .env}"
        volumes:
          - glpi_data:/var/glpi
        depends_on:
          db:
            condition: service_healthy
    
      db:
        image: mariadb:10.11
        restart: unless-stopped
        environment:
          MARIADB_RANDOM_ROOT_PASSWORD: "1"
          MARIADB_DATABASE: glpi
          MARIADB_USER: glpi
          MARIADB_PASSWORD: "${GLPI_DB_PASSWORD:?Set GLPI_DB_PASSWORD in .env}"
        volumes:
          - db_data:/var/lib/mysql
        healthcheck:
          test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
          interval: 10s
          timeout: 5s
          retries: 10
          start_period: 30s
    
    volumes:
      glpi_data:
      db_data:

    GLPI waits for MariaDB to become healthy. Containers in the project can reach the database at db.

  3. Start the containers

    From ~/glpi, validate the configuration, start the services and check their status. GLPI initializes its database on the first start.

    Terminal
    sudo docker compose config --quiet && sudo docker compose up -d
    sudo docker compose ps
    sudo docker compose logs --tail=50 glpi

    Once initialization finishes, open http://127.0.0.1:8082 on the server. Sign in with glpi / glpi, change that password immediately, and disable unused demo accounts.

  4. Open GLPI from another computer

    Port 8082 listens locally. For a remote server, run this tunnel on your computer with your SSH username and server address, then open http://127.0.0.1:8082 on your computer.

    Terminal
    ssh -N -L 8082:127.0.0.1:8082 utilisateur@IP_DU_SERVEUR

    For direct LAN access, set GLPI_BIND_IP to the server’s LAN address in .env, run docker compose up -d again with sudo, then use that address on port 8082.

Official GLPI image documentation ↗