Deploy Pterodactyl Panel on Docker: Host Minecraft, Palworld, and CS2 in Your HomeLab

HomeLab tutorial - IT technology blog
HomeLab tutorial - IT technology blog

It is 2:07 AM. My phone buzzes with three Discord pings: the Palworld server just froze, rubber-banded everyone off the map, and somehow took the Minecraft survival world down with it. I SSH into my HomeLab box and run htop. Sure enough, a memory leak in Palworld triggered the Linux OOM killer, which picked my Minecraft tmux session as the next victim. No graceful shutdown. Just corrupted chunks and angry friends.

Run game servers on bare metal or loose docker run one-liners long enough, and you will hit this exact wall. That 2 AM outage is why I moved everything to Pterodactyl Panel on Docker.

Context & Why: Stop Babysitting Game Processes

One Minecraft JAR in a screen session is easy to manage. Running a modded PaperMC server, a RAM-hungry Palworld instance, and a 64-tick sub-tick CS2 dedicated server on the same host is a different story. Each game brings its own runtime headaches (Java 21, SteamCMD, native Linux binaries), shutdown signals, and memory spikes.

Pterodactyl splits the job into two clean parts:

  • Panel: A web-based control plane (PHP/Laravel, MariaDB, Redis) for managing users, resource quotas, startup flags, scheduled backups, and live consoles.
  • Wings: A lightweight Go daemon on your Docker host that talks to the local Docker socket, launches isolated game containers, and enforces hard CPU, RAM, and disk limits.

When Palworld leaks memory inside a Wings container, Docker kills only that container at its hard limit and restarts it. Minecraft and CS2 never even blink. Once friends start relying on your HomeLab every night, that kind of isolation stops being a nice-to-have.

Installation: Standing Up Pterodactyl Panel and Wings on Docker

Before touching any config files, check your host prerequisites. You need Ubuntu 22.04/24.04 or Debian 12, Docker Engine with Compose v2, and a static LAN IP (I will use 192.168.1.50). Plan on at least 24–32 GB of RAM and 120 GB of SSD storage so all three games have room to breathe.

Step 1: Deploy the Panel Stack with Docker Compose

Create a dedicated directory for the Panel stack so database volumes and environment files stay predictable across upgrades:

sudo mkdir -p /opt/pterodactyl/panel
cd /opt/pterodactyl/panel

Create docker-compose.yml. Binding the Panel to port 8088 keeps it out of the way of any existing reverse proxy on ports 80 or 443:

services:
  database:
    image: mariadb:10.11
    restart: always
    command: --default-authentication-plugin=mysql_native_password
    volumes:
      - ./data/database:/var/lib/mysql
    environment:
      MYSQL_DATABASE: panel
      MYSQL_USER: pterodactyl
      MYSQL_PASSWORD: ChangeThisStrongDBPassword!
      MYSQL_ROOT_PASSWORD: ChangeThisRootPassword!

  cache:
    image: redis:7-alpine
    restart: always

  panel:
    image: ghcr.io/pterodactyl/panel:latest
    restart: always
    ports:
      - "8088:80"
    depends_on:
      - database
      - cache
    volumes:
      - ./data/var:/app/var
      - ./data/nginx:/etc/nginx/http.d
      - ./data/logs:/app/storage/logs
    environment:
      APP_URL: "http://192.168.1.50:8088"
      APP_TIMEZONE: "UTC"
      APP_SERVICE_AUTHOR: "[email protected]"
      TRUSTED_PROXIES: "*"
      DB_HOST: "database"
      DB_PORT: "3306"
      DB_DATABASE: "panel"
      DB_USERNAME: "pterodactyl"
      DB_PASSWORD: "ChangeThisStrongDBPassword!"
      CACHE_DRIVER: "redis"
      SESSION_DRIVER: "redis"
      QUEUE_DRIVER: "redis"
      REDIS_HOST: "cache"

Boot the stack and give MariaDB about 20 seconds to initialize. Then create your admin account through Artisan:

docker compose up -d
docker compose exec panel php artisan p:user:make

Follow the prompts for your email, username, admin flag (yes), and password. Once that finishes, log in at http://192.168.1.50:8088.

Step 2: Install the Wings Daemon on the Docker Host

The Panel runs cleanly in Docker Compose, but Wings belongs directly on the host as a systemd service. Avoiding Docker-in-Docker prevents ugly volume-path mismatches when Wings mounts game folders into child containers.

sudo 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")"
sudo chmod u+x /usr/local/bin/wings

Next, create /etc/systemd/system/wings.service so Wings starts automatically after a reboot:

[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

Hold off on starting Wings for a moment. It needs a configuration token from the Panel first.

Configuration: Wiring Up Nodes, Eggs, and Game Servers

Step 1: Create a Location, Node, and Port Allocations

Open the Pterodactyl Admin Area (the gear icon in the top-right corner) and work through these three steps:

  1. Locations: Create a location named HomeLab.
  2. Nodes: Click Create New and set the FQDN to 192.168.1.50 (or your local domain). Select Use HTTP Connection if you are staying strictly on LAN without TLS, then set Total Memory and Total Disk Space. Leave at least 4 GB of RAM unallocated for the host OS so a spiked container never locks up SSH.
  3. Connect Wings: Open the Node’s Configuration tab, copy the generated YAML, and paste it into /etc/pterodactyl/config.yml on your host.

Now enable and start Wings:

sudo systemctl enable --now wings

Back in the Node’s Allocation tab, assign 0.0.0.0 (or 192.168.1.50) with the three game ports:

  • Minecraft: 25565
  • Palworld: 8211
  • CS2: 27015

Step 2: Launch Minecraft, Palworld, and CS2 Using Eggs

Pterodactyl uses Eggs—pre-built container templates that know how to download, start, and gracefully stop each game. Minecraft (Paper, Vanilla, Forge) ships out of the box. For Palworld and CS2, import the community JSON Eggs from the official Pterodactyl Eggs repository under Admin > Nests.

Head to Admin > Servers > Create New and set strict boundaries so one bad patch cannot starve the rest:

  • Minecraft (PaperMC): 4096 MB RAM, 200% CPU (2 cores), 20 GB Disk, Port 25565.
  • Palworld: 8192 MB RAM (it leaks memory over long uptimes), 400% CPU (4 cores), 30 GB Disk, Port 8211.
  • CS2: 4096 MB RAM, 300% CPU (3 cores), 45 GB Disk, Port 27015.

Click Create Server. Wings pulls the matching Docker image, runs the install script in an ephemeral container, and drops you straight into a live web console.

Verification & Monitoring: Proving It Survives the Night

Never trust a green “Running” badge in the web UI. After any fresh deployment, I run three quick checks directly from the host terminal.

1. Verify Wings and Active Containers

Confirm Wings is healthy and verify that each game server runs in an isolated container with memory caps enforced:

sudo systemctl status wings --no-pager
docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"
docker stats --no-stream

Check the MEM LIMIT column in docker stats. It should show your exact Panel quotas—like 8GiB for Palworld—instead of the host’s full physical memory.

2. Confirm Port Bindings

Make sure Wings (8080), SFTP (2022), and all three game ports are actively listening:

sudo ss -tulnp | grep -E '25565|8211|27015|8080|2022'

If friends outside your LAN need access, forward only 25565/tcp, 8211/udp, and 27015/tcp+udp on your router. Never expose the Panel (8088) or SFTP (2022) to the open internet without a VPN or a TLS reverse proxy.

3. Automate Restarts and SFTP Access

To stop 2 AM OOM crashes before they happen, open your Palworld server in the Panel and head to Schedules. Create a cron job (0 */6 * * *) that broadcasts a 5-minute warning, saves the world, restarts the container, and takes a compressed backup.

Finally, test SFTP on port 2022 using the credentials under your server’s Settings tab. Dropping in a PaperMC plugin or tweaking PalWorldSettings.ini without touching root SSH is what makes this setup worth keeping.

Share: