The Ultimate Game Host: Step-by-Step Pterodactyl Panel Installation

Learn how to build your very own powerful game server management system from scratch using this easy-to-follow guide.

pterodactyl

Welcome to Your New Game Server Empire

Ubuntu

Understanding the Power of Pterodactyl

Pterodactyl is a free, open-source game server management panel built specifically to make running game servers easy and secure. Instead of typing complicated commands into a black screen every time you want to restart your server or change a setting, Pterodactyl gives you a beautiful web interface. You can click buttons to start, stop, and manage your games from anywhere in the world using just your web browser.

What makes Pterodactyl special is how it uses a technology called Docker to run your games. Docker puts every single game server into its own private "container," meaning they are completely separated from each other. If one game server crashes or gets a virus, it cannot affect the other servers running on the same computer. This keeps your system highly secure and ensures everything runs smoothly without fighting for computer resources.

Whether you want to host a small Minecraft server for your friends or build a massive hosting company for games like Rust, Ark, and Counter-Strike, Pterodactyl can handle it. It supports almost every popular multiplayer game right out of the box. Plus, it lets you create accounts for other users, so you can share control of the game servers with your friends or customers safely and easily.

Prerequisites

  • A Fresh Server: A clean, completely empty computer or Virtual Private Server (VPS) running Ubuntu 22.04 or 24.04.
  • Root Access: You must have the main administrator (root) password to run these commands.
  • A Domain Name: A web address (like panel.yourwebsite.com) that points to your server's IP address.
  • Basic Hardware: At least 1GB of RAM (more is better if you plan to host big games).

Step-by-Step Installation

Log into your server as the root user and follow these exact steps.
1

Install Required Software

First, we need to download the basic tools and coding languages (like PHP and Redis) that Pterodactyl needs to run.
BASH
# Add tools to help install other software
apt -y install software-properties-common curl apt-transport-https ca-certificates gnupg

# Add the official PHP software list
LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php

# Add the official Redis software list
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list

# Update your server's list of available software
apt update

# Install all the required programs (PHP, Database, Webserver, etc.)
apt -y install php8.3 php8.3-{common,cli,gd,mysql,mbstring,bcmath,xml,fpm,curl,zip} mariadb-server nginx tar unzip git redis-server
2

Install Composer

Composer is a helper tool that manages PHP code files.
BASH
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
3

Download Pterodactyl

Now, we create a folder for the website and download the actual Pterodactyl files into it.
BASH
# Create the folder and go inside it
mkdir -p /var/www/pterodactyl
cd /var/www/pterodactyl

# Download the latest Pterodactyl files
curl -Lo panel.tar.gz https://github.com/pterodactyl/panel/releases/latest/download/panel.tar.gz

# Unzip the files
tar -xzvf panel.tar.gz

# Give the server permission to read and write in these specific folders
chmod -R 755 storage/* bootstrap/cache/
4

Create the Database

Your panel needs a place to save information (like user accounts and server names). We will create a database for it.
First, log into the database system:
BASH
mariadb -u root -p
Next, type these commands. Important: Change yourPassword to a real, secret password!
SQL
CREATE USER 'pterodactyl'@'127.0.0.1' IDENTIFIED BY 'yourPassword';
CREATE DATABASE panel;
GRANT ALL PRIVILEGES ON panel.* TO 'pterodactyl'@'127.0.0.1' WITH GRANT OPTION;
exit
5

Setup the Panel Settings

Tell Pterodactyl how to start up and secure its data.
BASH
# Copy the default settings file
cp .env.example .env

# Install the core code packages
COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev --optimize-autoloader

# Generate a secret security key (Keep this key safe!)
php artisan key:generate --force
Now, set up your connection settings by answering the questions on your screen:
BASH
# Setup general website settings
php artisan p:environment:setup

# Setup database settings (use the password you made in Step 4)
php artisan p:environment:database

# Setup email settings (choose "smtp" or "mail")
php artisan p:environment:mail
6

Build Database Tables & Add Your User

Fill the database with the required tables and create your login account.
BASH
# Build the database structure (Do not close the screen until this finishes!)
php artisan migrate --seed --force

# Create your admin account (It will ask for your email, username, and password)
php artisan p:user:make
7

Give Folder Permissions

Make sure the webserver (NGINX) is allowed to read your new files.
BASH
chown -R www-data:www-data /var/www/pterodactyl
8

Set Up Background Tasks

Pterodactyl needs to run tasks in the background automatically.
Create the Automatic Timer (Cronjob):
BASH
sudo crontab -e -u www-data
Paste this exactly at the very bottom of the file to run the timer every minute:
Plaintext
* * * * * php /var/www/pterodactyl/artisan schedule:run >> /dev/null 2>&1
Create the Background Worker:
Open a new blank file:
Bash
nano /etc/systemd/system/pteroq.service
Paste this text inside, then save and close the file:
Ini, TOML
[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
StartLimitInterval=180
StartLimitBurst=30
RestartSec=5s

[Install]
WantedBy=multi-user.target
Turn Everything On:
Tell your server to start these background tasks every time the computer turns on.
Bash
sudo systemctl enable --now redis-server
sudo systemctl enable --now pteroq.service
Note: After completing these core code steps, your last remaining task outside of the panel directory is to configure your webserver (e.g., NGINX or Apache) and install SSL certificates for your panel's domain.

Discover CTCservers Dedicated Server Locations

CTCservers servers are available around the world, providing diverse options for hosting websites. Each region offers unique advantages, making it easier to choose a location that best suits your specific hosting needs.