Game server ports
The panel assigns external (host) ports to servers, so you don't hand them out yourself. In a game's settings you list the ports the server listens on inside its container. When a server is created, the panel picks free external ports on the node and reserves them for that server. Deleting the server releases its ports.
The panel's Ports page lists every port in use.
Several ports for one game
Many servers need more than one port: a game port, query, RCON, a web interface, voice chat. Add each port as its own row under Games → game → Ports ("+ Add port"):
- Port in container: the port the server listens on inside the container, as in its config.
- Protocol: TCP or UDP. If a port is needed on both, add two rows with the same number. CS 2, for example, has
27015/udpand27015/tcp. - Offset: keeps related ports together (see below).
An example for a game with a game port, query and RCON:
Port in container Protocol Offset 28015 UDP 0 28016 TCP 1 28017 TCP 2
Offset
- All offsets 0 (or empty): each port is assigned on its own, as the lowest free port in the range. The numbers may end up apart, e.g. 20000 and 20007.
- At least one non-zero offset: the ports are assigned as a group. The panel looks for a base number where every "base + offset" port is free and the whole group fits in one range. For the example above, a server might get 20010/udp, 20011/tcp and 20012/tcp.
Use offsets when players or admins expect "RCON = game port + 1", or when the game derives extra ports from the main one itself.
Where the numbers come from
A port is picked from a range. The first match applies:
- The plan's ranges: Tariffs → plan → Ports and IP. When there are several, they are tried in order. A group of ports with offsets is never split between two ranges.
- An exception for the node or location: Ports → Ranges.
- The default range, on the same page. Out of the box it is 20000–30000.
If a plan has Standard ports on, the panel first tries the game's own numbers (27015, 25565, 7777…). If they're taken, ports come from the range. Standard ports are outside the range, so open them in the node's firewall separately.
If a node has several IPs (Nodes → node → Addresses), ports are counted per IP. Two CS servers on different IPs of one node can both get 27015. When the default address runs out of free ports, the server goes to the node's next address.
Changing a range affects new servers only. Existing servers keep their ports.
Firewall
The node must have the whole port range open (TCP and UDP if your games use both), plus standard ports if plans use them. An example for ufw:
ufw allow 20000:30000/tcp ufw allow 20000:30000/udp
When the game must know its external port
Inside the container the server always listens on its port in container, and Docker forwards the assigned external port to it. For most games (CS 1.6, CS 2, SA-MP, Minecraft) this is all that's needed: players connect to address:external port and it works.
Some servers report their own port to a master server or to clients: Steam query, Rust (app port), ARK, Valheim and others. Their server-list entry may then show the internal number instead of the external one, and the server can't be found or joined. Options:
- turn on Standard ports in the plan, so the external port matches the internal one, and run one such server per IP;
- or give these games dedicated node IPs.
Common problems
"no free port in range" when creating a server: the range has no free ports left (or no free consecutive ones, if the game uses offsets). Widen the range, add an IP to the node or remove servers you don't need.
"port already allocated on this node": a port given explicitly at creation is already used by another server. Choose another one, or leave the port out and the panel picks one.
The server runs but nobody can connect: check the node's and the provider's firewall (cloud security groups). The range must be open for the right protocol. The server's page and the Ports page show which ports it got.
See also Connect a node, FastDL and Troubleshooting.