Pterodactyl Port Allocation and Networking Guide
Learn how pterodactyl port allocation works, including primary and additional ports, IP binding, and firewall rules for game servers.
How Port Allocation Works
Every game server needs at least one network port. In Pterodactyl, ports are assigned at the node level and then given to individual servers. Understanding pterodactyl port allocation prevents conflicts and keeps your network tidy.
Adding Allocations to a Node
Open Admin > Nodes > [Your Node] > Allocation. Enter the IP address the node should listen on (use 0.0.0.0 to bind all interfaces), then specify a port or port range:
- Single port:
25565 - Range:
25565-25575(creates 11 allocations in one go)
Each allocation can only be assigned to one server at a time.
Primary vs Additional Allocations
When creating a server, you pick a primary allocation. This is the port exposed in the startup command via the {{SERVER_PORT}} variable. You can assign additional allocations if the software needs extra ports, for example a query port or a Dynmap web port. Additional ports are available as {{ALLOC_1}}, {{ALLOC_2}}, etc.
IP Alias
If your node has multiple IPs (IPv4 + IPv6, or multiple v4 addresses), add allocations for each IP separately. You can set an IP Alias so the panel shows a friendly hostname instead of a raw IP in the server list. This alias is cosmetic and does not affect network routing.
Firewall Configuration
Pterodactyl port allocation only tells Docker which ports to map. You still need your host firewall to allow inbound traffic:
sudo ufw allow 25565:25575/tcp
sudo ufw allow 25565:25575/udp
If you use iptables directly, Docker usually manages its own rules, but verify that the DOCKER-USER chain is not blocking your game ports.
Common Pitfalls
- Port already in use: Another process on the host is binding the same port. Use
ss -tlnp | grep PORTto find it. - Forgot to add allocation: The server creation form will not show ports that have not been added to the node first.
- Binding to 127.0.0.1: Allocations on localhost are only reachable from the same machine, useful for proxies but not for public servers.
Correct pterodactyl port allocation is especially important in multi-server setups. For network proxy configurations, pair this guide with the knowledge in our Wings installation guide to ensure traffic flows properly.
Skip the panel setup entirely. Astroworld Hosting comes with a full Pterodactyl panel, file manager, console, and scheduling on every plan.