Port mapping
Port mapping (also called port forwarding or port binding) connects a container’s internal ports to external ports on the host machine. When a game server runs inside a Docker container, it listens on an internal port. Port mapping makes that port accessible to players on the internet.
How it works in game server hosting
A game server binary listens on a port — for example, port 7777 (Unreal Engine’s default). When the container starts, the orchestration platform maps an external port on the host to the container’s internal port. The session response returns the host IP and the mapped external port. Players connect to that IP:port combination.
Bridge vs host networking
- Bridge networking — The container gets its own network namespace. Ports are explicitly mapped (e.g. host port 30001 → container port 7777). Multiple containers can use the same internal port because each gets a unique external port. This is the default Docker networking mode.
- Host networking — The container shares the host’s network stack directly. No port mapping needed — the container’s ports are the host’s ports. Lower latency (no NAT translation) but only one container can use each port number.
Why it matters
Incorrect port mapping is one of the most common issues when containerising a game server for the first time. If the server listens on a port that isn’t mapped, players can’t connect. If the server expects a specific port but gets a different one via mapping, the server may fail to start. Most platforms let you configure port mappings in an admin panel or API call.