> ## Documentation Index
> Fetch the complete documentation index at: https://help.freakhosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Install Pterodactyl Panel and Wings on a VPS

> Install Pterodactyl Panel on Ubuntu 24.04: PHP 8.3, MariaDB, Redis and Nginx, the panel files and queue worker, then Wings with Docker to run your game servers.

To install Pterodactyl Panel on Ubuntu 24.04, install PHP 8.3, MariaDB, Redis, Nginx and Composer, download `panel.tar.gz` to `/var/www/pterodactyl`, run `composer install`, `php artisan p:environment:setup`, `php artisan migrate --seed --force` and `php artisan p:user:make`, then add the cron job, the `pteroq` queue worker and an Nginx site with HTTPS. Finally install Docker and Wings, which runs the game servers.

| Difficulty | Time | Works on | Needs |
| - | - | - | - |
| Advanced | 60–90 minutes | Ubuntu 22.04 / 24.04, Debian 12 / 13, AlmaLinux / Rocky 9 | Root access, a KVM VPS or dedicated server, a domain |

FREAKHOSTING also offers managed game servers on its Game Panel if you'd rather not run a panel yourself: see [how to log in to the Game Panel](https://help.freakhosting.com/portals/game-panel/how-to-login-and-access-the-game-panel.md).

## Before you start

* **Pterodactyl has two parts.** The **Panel** is the PHP website you log in to. **Wings** is the daemon that runs each game server in a Docker container. This guide puts both on one server.
* **This guide uses Ubuntu 24.04** and runs every command as root (`sudo -i`). For Debian or AlmaLinux / Rocky, use the matching dependency commands from the [Pterodactyl docs](https://pterodactyl.io/panel/1.0/getting_started.html). AlmaLinux / Rocky 10 is not on Pterodactyl's supported list yet.
* **Use a fresh server.** Nginx takes ports 80 and 443.
* **Point a domain** such as `panel.example.com` at the server with an `A` record. See [point a domain to your server](https://help.freakhosting.com/portals/other/how-to-point-a-domain-to-your-server.md).
* **Take a snapshot or backup first** if the server already holds data. See [schedule and restore backups](https://help.freakhosting.com/portals/vps-panel/how-to-schedule-and-restore-backups.md).

## Step 1: Install the panel dependencies

```bash theme={null}
apt update
apt -y install software-properties-common curl apt-transport-https ca-certificates gnupg
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
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
```

Ubuntu 24.04 ships PHP 8.3, so you don't need an extra PHP repository. On Ubuntu 22.04, add `ppa:ondrej/php` first, as the Pterodactyl docs show.

## Step 2: Create the database

```bash theme={null}
mariadb -u root
```

```sql theme={null}
CREATE USER 'pterodactyl'@'127.0.0.1' IDENTIFIED BY 'Use-A-Long-Unique-Password';
CREATE DATABASE panel;
GRANT ALL PRIVILEGES ON panel.* TO 'pterodactyl'@'127.0.0.1' WITH GRANT OPTION;
exit
```

## Step 3: Download and configure the panel

**1. Download the files**

```bash theme={null}
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 -xzvf panel.tar.gz
chmod -R 755 storage/* bootstrap/cache/
```

**2. Install PHP packages and create the app key**

```bash theme={null}
cp .env.example .env
COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev --optimize-autoloader
php artisan key:generate --force
```

Run `key:generate` on a new install only.

**3. Back up the encryption key**

```bash theme={null}
grep APP_KEY /var/www/pterodactyl/.env
```

Store the whole `APP_KEY=base64:…` line in a password manager. Without it, encrypted panel data can't be recovered, even from a database backup.

**4. Run the setup wizards**

```bash theme={null}
php artisan p:environment:setup
php artisan p:environment:database
php artisan p:environment:mail
```

Enter `https://panel.example.com` as the URL, `redis` for cache, session and queue, and the database password from step 2.

**5. Build the database**

```bash theme={null}
php artisan migrate --seed --force
```

This creates the tables and the default Nests and Eggs (game templates). Don't interrupt it.

**6. Create your admin user**

```bash theme={null}
php artisan p:user:make
```

Answer `yes` to administrator. The password needs 8 or more characters, mixed case and at least one number.

**7. Set file ownership**

```bash theme={null}
chown -R www-data:www-data /var/www/pterodactyl/*
```

## Step 4: Add the cron job and queue worker

Run `crontab -e` and add:

```bash theme={null}
* * * * * php /var/www/pterodactyl/artisan schedule:run >> /dev/null 2>&1
```

Create `/etc/systemd/system/pteroq.service`:

```ini theme={null}
[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
```

```bash theme={null}
systemctl enable --now redis-server
systemctl enable --now pteroq.service
```

## Step 5: Set up Nginx with HTTPS

**1. Get a certificate**

```bash theme={null}
apt -y install certbot python3-certbot-nginx
certbot certonly --nginx -d panel.example.com
```

**2. Create the site**

Remove the default site with `rm /etc/nginx/sites-enabled/default`. Copy the **Nginx With SSL** configuration from [Pterodactyl's webserver page](https://pterodactyl.io/panel/1.0/webserver_configuration.html) into `/etc/nginx/sites-available/pterodactyl.conf` and replace every `<domain>` with `panel.example.com`. It points `root` at `/var/www/pterodactyl/public`, passes PHP to `unix:/run/php/php8.3-fpm.sock` and loads the certificate from `/etc/letsencrypt/live/panel.example.com/`.

**3. Enable it**

```bash theme={null}
ln -s /etc/nginx/sites-available/pterodactyl.conf /etc/nginx/sites-enabled/pterodactyl.conf
nginx -t
systemctl restart nginx
```

Open `https://panel.example.com` and log in with the user from step 3.

## Step 6: Install Docker and Wings

**1. Check virtualisation**

```bash theme={null}
systemd-detect-virt
```

`kvm` or `none` (bare metal) works. `openvz` or `lxc` usually can't run Wings.

**2. Install Docker**

Follow [install Docker](https://help.freakhosting.com/portals/other/how-to-install-docker.md), then run `systemctl enable --now docker`.

**3. Download Wings**

```bash theme={null}
mkdir -p /etc/pterodactyl
curl -L -o /usr/local/bin/wings "https://github.com/pterodactyl/wings/releases/latest/download/wings_linux_$([[ "$(uname -m)" == "x86_64" ]] && echo "amd64" || echo "arm64")"
chmod u+x /usr/local/bin/wings
```

**4. Create a location and node**

In the panel's admin area, create a **Location** (nodes belong to a location), then open **Nodes** and click **Create New**. Use `panel.example.com` as the FQDN with SSL, and keep the daemon port `8080` and SFTP port `2022`.

**5. Add the node configuration**

Open the node's **Configuration** tab, copy the block into `/etc/pterodactyl/config.yml`, or click **Generate Token** and run the command it shows.

**6. Test Wings**

```bash theme={null}
wings --debug
```

When it runs without errors, stop it with **Ctrl+C**.

**7. Run Wings as a service**

Create `/etc/systemd/system/wings.service`:

```ini theme={null}
[Unit]
Description=Pterodactyl Wings Daemon
After=docker.service
Requires=docker.service
PartOf=docker.service

[Service]
User=root
WorkingDirectory=/etc/pterodactyl
LimitNOFILE=4096
PIDFile=/var/run/wings/daemon.pid
ExecStart=/usr/local/bin/wings
Restart=on-failure
StartLimitInterval=180
StartLimitBurst=30
RestartSec=5s

[Install]
WantedBy=multi-user.target
```

```bash theme={null}
systemctl enable --now wings
```

**8. Add allocations**

Find your public IP with `hostname -I | awk '{print $1}'`. In the node's **Allocation** tab, add that IP and the game ports, for example `25565-25570`. Don't use `127.0.0.1`.

## Which ports to open

| Port | Used for |
| - | - |
| 80/TCP, 443/TCP | Panel website and certificate renewal |
| 8080/TCP | Wings API (the panel and your browser connect to it) |
| 2022/TCP | SFTP to game server files |
| Your allocations | Game ports, TCP and/or UDP as the game needs |

```bash theme={null}
ufw allow OpenSSH
ufw allow 80/tcp
ufw allow 443/tcp
ufw allow 8080/tcp
ufw allow 2022/tcp
ufw allow 25565:25570/tcp
ufw enable
```

> [!WARNING]
>
> Allow SSH before you run `ufw enable`, or you lock yourself out. If that happens, use the [VNC console](https://help.freakhosting.com/portals/vps-panel/how-to-enable-and-use-vnc-console-access.md).

## How to check it worked

```bash theme={null}
systemctl status pteroq wings --no-pager
```

Both show `active (running)`. In the panel, **Nodes** shows a green heart next to your node. Create a test server under **Servers > Create New**, and it installs and starts.

## Frequently asked questions

### How much RAM does a Pterodactyl server need?

Plan for the panel, MariaDB and Redis plus the memory of every game server you run at the same time, because each game server gets its own memory limit. Add [swap](https://help.freakhosting.com/portals/other/how-to-add-swap-space-on-linux.md) as a safety net and watch use with [htop](https://help.freakhosting.com/portals/other/how-to-monitor-server-resources-with-htop.md).

### Why is my node's heart red?

The panel can't reach Wings. Check `systemctl status wings`, that port 8080 is open, and that the node FQDN has a valid certificate when the panel uses HTTPS.

### How do I update Pterodactyl?

Follow the official update guides for the [panel](https://pterodactyl.io/panel/1.0/updating.html) and [Wings](https://pterodactyl.io/wings/1.0/upgrading.html). Back up the database and `.env` first.

### Can Wings run on a different server from the panel?

Yes. Install only Docker and Wings on the second server, create a node for it in the panel and give it its own FQDN and certificate.

## Related guides

> [card] [VPS and dedicated server guides](https://help.freakhosting.com/portals/other/vps-and-dedicated-server-guides.md)
>
> Every guide in this section.

> [card] [Install Docker](https://help.freakhosting.com/portals/other/how-to-install-docker.md)
>
> Wings needs Docker Engine.

> [card] [Host game servers with LinuxGSM](https://help.freakhosting.com/portals/other/how-to-host-game-servers-with-linuxgsm.md)
>
> A lighter, command-line option.

> [card] [Tune Linux for game servers](https://help.freakhosting.com/portals/other/how-to-tune-linux-for-game-servers.md)
>
> Lower latency for players.

> [card] [Get a free SSL certificate](https://help.freakhosting.com/portals/other/how-to-get-a-free-ssl-certificate-with-certbot.md)
>
> Certbot and automatic renewal.

> [card] [Set up a firewall with UFW](https://help.freakhosting.com/portals/other/how-to-set-up-a-firewall-with-ufw.md)
>
> Open only the ports you use.

***

> [!NOTE]
>
> **Checked against the official [Pterodactyl panel](https://pterodactyl.io/panel/1.0/getting_started.html) and [Wings](https://pterodactyl.io/wings/1.0/installing.html) documentation** on 4 November 2026; package names checked and the Nginx configuration syntax-tested on Ubuntu 24.04 LTS. Commands can differ on other distributions or releases.

> [!NOTE]
>
> ### Need Extra Help?
>
> If you encounter any issues, our support team is ready to assist:
>
> * **Live Chat:** Quick assistance via our website.
> * **Support Ticket:** [Open a Ticket](https://freakhosting.com/clientarea/submitticket.php)
> * **Discord:** [Join our Community](https://discord.gg/freakhosting)
> * **Email:** [support@freakhosting.com](mailto:support@freakhosting.com)

> [!TIP]
>
> ### Save on Your Hosting
>
> Ready to upgrade your hosting? Use code **KB20** at checkout for **20% off** your first order!

***

**Last Updated:** November 2026


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.