How to Install Pterodactyl on Ubuntu and Host Game Servers
Hosting one Minecraft server using a batch script is fine, but what if you want to host five? Or what if you want to host a Rust server and a CS:GO server alongside it? Doing that manually in the terminal is an absolute nightmare. That's where Pterodactyl comes in. It's a free, open-source game server management panel that runs seamlessly on Docker.
Here's a straight-to-the-point guide on getting it running on a fresh Ubuntu server.
The Architecture
Pterodactyl is split into two main parts:
- The Panel: The web interface where you click buttons to manage servers.
- Wings: The backend daemon that actually runs on your node and controls the Docker containers.
You can install them both on the same machine, which is exactly what we'll do here.
1. Installing the Panel
First, SSH into your Ubuntu server. Make sure your system is completely updated.
apt update && apt upgrade -y
The absolute easiest way to install Pterodactyl is using the unofficial community installation script. It handles downloading PHP, configuring Nginx, and setting up the database automatically.
bash <(curl -s https://pterodactyl-installer.se)
Select the option to install the Panel. The script will ask you some basic questions like your database password, the email for the admin account, and the domain name you want to use (make sure you've pointed an A record from your domain to your server's IP!).
2. Installing Wings
Once the panel is up, run the script again, but this time select Wings.
bash <(curl -s https://pterodactyl-installer.se)
Wings requires Docker, and the script will set all of that up for you. Once it's installed, you need to link Wings to your Panel.
3. Linking Them Together
Log into your newly created Pterodactyl web panel. Go to the Admin control area, navigate to 'Nodes', and create a new node. Give it a name and set the FQDN (your domain). Once created, click on the 'Configuration' tab for that node. You'll see a block of YAML code or an auto-deploy command.
Paste that auto-deploy command into your Ubuntu terminal. This configures Wings. Finally, start Wings:
systemctl enable --now wings
4. Creating a Minecraft Server
Now for the fun part. In the admin panel, go to 'Servers' and click 'Create New'.
Select your node, allocate some memory (e.g., 4096 MB), and pick the Minecraft 'Egg' (an Egg is just a configuration template for a specific game). Click create, and Pterodactyl will automatically download the server files, spin up a Docker container, and give you a beautiful console interface to play with.
That's it! You've got your own enterprise-grade game hosting setup running for free.