L'architecture
Pterodactyl se compose de deux éléments : le panel (application web PHP de gestion des serveurs de jeux) et Wings (daemon Go qui exécute les serveurs dans des conteneurs Docker). Sur un VPS unique, les deux cohabitent — prévoyez 4 GB de RAM pour le panel, Wings et un premier serveur de jeu.
Prérequis
Un VPS Ubuntu 24.04, deux noms de domaine (panel.example.com et node.example.com) pointant vers l'IP, et un accès root. Le panel nécessite PHP 8.3, MariaDB, Redis et Composer — tous disponibles dans les dépôts Ubuntu.
Étape 1 — Dépendances du panel
apt update && apt install -y mariadb-server redis-server nginx composer \
php8.3-fpm php8.3-cli php8.3-common php8.3-mysql php8.3-zip \
php8.3-gd php8.3-mbstring php8.3-curl php8.3-xml php8.3-bcmath
systemctl enable --now mariadb redis-server php8.3-fpmÉtape 2 — Base de données
mariadbCREATE DATABASE panel;
CREATE USER 'pterodactyl'@'127.0.0.1' IDENTIFIED BY 'MotDePasseTresFort!';
GRANT ALL PRIVILEGES ON panel.* TO 'pterodactyl'@'127.0.0.1' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;Étape 3 — Télécharger le panel
mkdir -p /var/www/pterodactyl && cd /var/www/pterodactyl
curl -Lo panel.tar.gz https://github.com/pterodactyl/panel/releases/latest/download/panel.tar.gz
tar -xzf panel.tar.gz
chmod -R 755 storage/* bootstrap/cache/
cp .env.example .env
composer install --no-dev --optimize-autoloader
php artisan key:generate --forceÉtape 4 — Configurer et initialiser
php artisan p:environment:setup
php artisan p:environment:database
php artisan migrate --seed --force
php artisan p:user:makeLa première commande demande l'URL du panel (https://panel.example.com), le fuseau horaire et le driver de cache (redis). La seconde configure MariaDB. La dernière crée le compte administrateur — répondez yes à « Is this user an administrator ».
Étape 5 — Cron et worker de file
Planifiez le scheduler Laravel :
crontab -u www-data -e* * * * * php /var/www/pterodactyl/artisan schedule:run >> /dev/null 2>&1Créez le worker /etc/systemd/system/pteroq.service :
[Unit]
Description=Pterodactyl Queue Worker
After=redis-server.service
[Service]
User=www-data
Group=www-data
Restart=always
ExecStart=/usr/bin/php /var/www/pterodactyl/artisan queue:work --queue=high,standard,low --sleep=3 --tries=3
[Install]
WantedBy=multi-user.targetchown -R www-data:www-data /var/www/pterodactyl
systemctl daemon-reload
systemctl enable --now pteroqÉtape 6 — Nginx et HTTPS
Créez /etc/nginx/sites-available/pterodactyl.conf :
server {
listen 80;
server_name panel.example.com;
root /var/www/pterodactyl/public;
index index.php;
client_max_body_size 100M;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.3-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}ln -s /etc/nginx/sites-available/pterodactyl.conf /etc/nginx/sites-enabled/
nginx -t && systemctl reload nginx
apt install -y certbot python3-certbot-nginx
certbot --nginx -d panel.example.comÉtape 7 — Installer Wings
Wings exécute les serveurs de jeu dans Docker — installez d'abord le moteur (voir notre guide « Installer Docker sur Ubuntu 24.04 »), puis le daemon :
mkdir -p /etc/pterodactyl
curl -L -o /usr/local/bin/wings https://github.com/pterodactyl/wings/releases/latest/download/wings_linux_amd64
chmod u+x /usr/local/bin/wingsDans le panel : Administration → Nodes → Create New. Renseignez le FQDN node.example.com, la RAM et le disque allouables. Ouvrez ensuite l'onglet Configuration du node et cliquez Generate Token : le panel affiche une commande wings configure complète — copiez-la et exécutez-la sur le VPS :
cd /etc/pterodactyl
wings configure --panel-url https://panel.example.com --token <token-genere> --node <id-du-node>Créez le service /etc/systemd/system/wings.service :
[Unit]
Description=Pterodactyl Wings Daemon
After=docker.service
Requires=docker.service
[Service]
User=root
WorkingDirectory=/etc/pterodactyl
LimitNOFILE=4096
ExecStart=/usr/local/bin/wings
Restart=on-failure
StartLimitInterval=600
[Install]
WantedBy=multi-user.targetsystemctl daemon-reload
systemctl enable --now wingsÉtape 8 — Allocations de ports et pare-feu
Dans l'onglet Allocations du node, créez une allocation sur l'IP publique avec une plage de ports (par exemple 25565-25575 pour Minecraft, 27015-27020 pour les jeux Source). Chaque serveur de jeu consomme un port. Si UFW est actif :
ufw allow 8080/tcp
ufw allow 2022/tcp
ufw allow 25565:25575/tcp
ufw allow 25565:25575/udpLe port 8080 sert l'API Wings (le panel s'y connecte), 2022 le SFTP intégré. Rappel : Docker insère ses propres règles iptables — les ports de jeu publiés par Wings passent de toute façon, UFW protège surtout le reste du serveur.
Vérification
- Le node affiche un cœur vert dans le panel (il joint l'API Wings).
- Créez un serveur (egg « Minecraft Paper » par exemple) : l'installation s'exécute dans Wings,
docker psmontre le conteneur, la console web répond. wings diagnosticsvalide la configuration réseau et Docker.
Dépannage
- Cœur rouge : Wings ne joint pas le panel — vérifiez le FQDN, le certificat et rejouez
wings configure. - Serveurs qui ne démarrent pas :
journalctl -u wings -fet les logs d'installation dans/var/log/pterodactyl/install/. - Erreur Docker au démarrage de Wings :
systemctl status docker— Wings tourne en root mais exige un daemon Docker vivant. - Emails non envoyés : configurez le SMTP dans Administration → Settings → Mail, puis
php artisan queue:restartsur le worker.