Overview
Learn to install and configure the Pterodactyl game server management panel and the Wings daemon, enabling you to manage your game servers efficiently.
Panel Installation
Install Pterodactyl Panel
First, update your system packages and install curl:
apt update && apt install curl -y
Then, run the Pterodactyl installer script:
bash <(curl https://pterodactyl-installer.se)
Enter your domain or subdomain. Select "no" for configuring the firewall and Let's Encrypt. Select "yes" for assuming SSL and "no" for the HTTPS request. This simplifies the setup by using self-signed certificates and bypassing unnecessary configurations.
Configure SSL and Nginx
Generate self-signed SSL certificates and modify the Nginx configuration file:
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /2.pem -out /1.pem -subj "/CN=localhost"
sed -i 's|^\s*ssl_certificate\s\+.*| ssl_certificate /1.pem;|' /etc/nginx/sites-available/pterodactyl.conf
sed -i 's|^\s*ssl_certificate_key\s\+.*| ssl_certificate_key /2.pem;|' /etc/nginx/sites-available/pterodactyl.conf
sed -i 's/\b443\b/8443/g; s/\b80\b/8000/g' /etc/nginx/sites-available/pterodactyl.conf
systemctl restart nginx
These commands configure Nginx to use the generated certificates and adjust the ports to prevent conflicts, securing your panel.
Set Up Cloudflare Tunnel
Cloudflare Tunnel provides secure access to your panel without exposing your server directly to the internet.
Go to one.dash.cloudflare.com. Navigate to Network โ Tunnels โ Create Tunnel. Choose cloudflared and give your tunnel a name. Select Debian and follow the on-screen instructions to install cloudflared and set up the tunnel service. Use the same subdomain you entered during the Pterodactyl installer.
Set Service Type to HTTPS. Set the Service URL to localhost:8443. Under Additional Settings โ TLS, enable No TLS Verify. These settings route traffic from Cloudflare to your Pterodactyl panel.
Save the hostname. Verify that you can access the panel via your subdomain. This confirms your tunnel is working correctly.
Wings Installation
Install and Configure Wings
Run the Pterodactyl installer again, and select option 1 for Wings installation. Answer "yes" to "Unsupported type of virtualization" and "no" to UFW, the database user prompt, and Let's Encrypt.
In Cloudflare, edit the tunnel you created earlier. Add a new public hostname using your node subdomain. Set Service URL to localhost:443. Enable No TLS Verify under Additional Settings โ TLS. This directs traffic to your Wings daemon through the tunnel.
Log in to the Pterodactyl panel. Create a new location. Then, add a new node. Set the Daemon Port to 443, SSL to "Not Behind Proxy," and use the node subdomain as the FQDN. Copy the configuration token and execute the displayed command. These steps configure the panel to connect with and authenticate the Wings daemon.
Generate a Free Self-Signed SSL Certificate
mkdir -p /etc/certs
cd /etc/certs
openssl req -new -newkey rsa:4096 -days 3650 -nodes -x509 \
-subj "/C=NA/ST=NA/L=NA/O=NA/CN=Generic SSL Certificate" \
-keyout privkey.pem -out fullchain.pemThis creates privkey.pem and fullchain.pem in /etc/certs.
๐ฆ Step 1: Install Wings
Install Wings using the official method.
After installation:
Go to the panel admin area and create a node.
Set FQDN to your Cloudflare Tunnel domain.
Use port 443.
Download the Wings config.
๐งฑ Step 2: Configure Docker Networking
Install nano if not installed:
apt install nano -yEdit Docker daemon config:
nano /etc/docker/daemon.jsonPaste this:
{
"default-address-pools": [
{
"base": "10.200.0.0/16",
"size": 24
}
]
}Restart Docker:
systemctl restart docker๐งพ Step 3: Edit Wings Config (config.yml)
Open the Wings config:
nano /etc/pterodactyl/config.ymlUpdate the Docker and SSL sections:
docker:
network:
interface: pterodactyl0
ipv4:
subnet: 10.150.0.0/24
gateway: 10.150.0.1
api:
ssl:
enabled: true
cert: /etc/certs/fullchain.pem
key: /etc/certs/privkey.pemMake sure the cert and key paths match where you generated your self-signed certificate in Step 2.
Save the file and restart Wings:
systemctl restart wings