Deploy Pterodactyl
Pterodactyl Panel pinned, admin created at deploy, login captcha fixed
Pterodactyl
Just deployed
Redis
Just deployed
MariaDB
Just deployed
Deploy and Host Pterodactyl on Railway
Pterodactyl is a web panel for running game servers: Minecraft, Rust, Valheim, CS2 and hundreds more through its "eggs". The panel handles users, servers, files, schedules and backups; the game servers themselves run on Wings, Pterodactyl's daemon, on machines you connect as nodes.
This template runs the panel (official image, pinned to v1.15.1) with MariaDB and Redis on Railway's private network.
About Hosting Pterodactyl
The panel has no sign-up page, so a fresh install has no way in until someone runs a command in the container. Here the deploy form asks for your email, a password is generated into PTERODACTYL_ADMIN_PASSWORD, and a start step creates the admin account right after the database migrations. On later starts it sees existing users and leaves them alone.
Two defaults break logins on a fresh deploy, and both are handled. The panel ships with reCAPTCHA turned on using keys that only work on Pterodactyl's own domain, so it's off here (RECAPTCHA_ENABLED), and you can add your own keys later. And behind Railway's proxy the panel doesn't know requests arrive over HTTPS unless the proxy is trusted, which TRUSTED_PROXIES does.
The app key and the hashids salt come from generated variables. Left to itself, the image generates the key on first start and prints it into the deploy logs.
My first version used MySQL 8.4. Laravel loads the initial schema with the mysql command-line client, and the MariaDB client inside the panel image failed twice: first on MySQL's self-signed certificate, then on its default password plugin. MariaDB 11.4, which Pterodactyl recommends anyway, works.
Before publishing I tested the final version on a fresh deploy. The admin from the deploy form signed in without a captcha and had admin rights, the sign-up endpoint doesn't exist (405), an application API key created in the admin area worked, and a location created through the API was still there after restarting the panel and the database.
Common Use Cases
- Manage Minecraft or other game servers for friends or a community from one panel, with sub-users and permissions
- Give players a web console, file manager, schedules and backups without SSH access to your machines
- Run the panel on Railway and the game servers on a home server or a cheap VPS with Wings
Dependencies for Pterodactyl Hosting
Game servers need at least one Wings node: a Linux machine with Docker where Wings is installed. Railway can't run Wings, because it needs its own Docker daemon. In the panel, create a location and a node, then follow the Wings install guide on that machine; Wings connects back to the panel at APP_URL.
Deployment Dependencies
- Pterodactyl Panel: https://github.com/pterodactyl/panel
- Docs, including Wings: https://pterodactyl.io/
- Image:
ghcr.io/pterodactyl/panel:v1.15.1 - The wrapper this template builds: https://github.com/dektionstudio/railway-template-images/tree/main/pterodactyl
Implementation Details
PTERODACTYL_ADMIN_EMAIL / PTERODACTYL_ADMIN_PASSWORD # admin account, created on first start
APP_URL=https:// # Wings nodes connect here; change it when you add a custom domain
APP_KEY, HASHIDS_SALT # generated; keep them
RECAPTCHA_ENABLED=false # add RECAPTCHA_WEBSITE_KEY / RECAPTCHA_SECRET_KEY and set true for your own keys
MAIL_MAILER=log # set smtp and MAIL_HOST, MAIL_PORT, MAIL_USERNAME, MAIL_PASSWORD for email
Idle, the panel used 0.13 GB of RAM and MariaDB 0.11 GB, about $2.50 a month on Railway's usage pricing.
Why Deploy Pterodactyl on Railway?
The panel gets HTTPS, backups of its database volume and an address that doesn't change when your game machines do, while the heavy work stays on the machines you run Wings on. Keeping the panel off the game box also means a crashed or rebuilt node doesn't take your users and settings with it.
Template Content
Pterodactyl
dektionstudio/railway-template-imagesPTERODACTYL_ADMIN_EMAIL
Email of the admin account, created on first start. Sign in with it and PTERODACTYL_ADMIN_PASSWORD
Redis
redis:7.4MariaDB
mariadb:11.4