How game server ports work: TCP, UDP and what to give your players

Every game server is reached through a port, a numbered door on the machine. Understanding ports clears up a surprising number of problems: why a server is online but nobody can join, why friends on a different network get a timeout, and why one game needs two ports while another needs one. You do not need networking training, just a few ideas.

IP address and port

An IP address identifies the machine, like a street address. A port identifies a particular program on it, like a flat number. To reach a game server, a player needs both, written with a colon: 203.0.113.10:25565.

Games have default ports, and when a server uses the default, the player can often leave it off. If your server is on a different port, they must include it.

TCP and UDP

There are two main ways programs send data:

  • TCP is careful. It checks that everything arrives, in order, and resends anything lost. Web pages and Minecraft Java use it.
  • UDP is fast and loose. It sends data without checking. Games with quick action, such as shooters, favour it. Minecraft Bedrock uses it.

A game may use one, or both. If the game needs UDP and only TCP is open, the server looks online and nobody can connect.

Common default ports

Game or toolDefault portProtocol
Minecraft Java25565TCP
Minecraft Bedrock19132UDP
FiveM30120TCP and UDP
Rust28015UDP, plus a separate remote console port
Counter-Strike 227015UDP and TCP
SSH22TCP
Websites80 and 443TCP

Your host may assign different numbers, and many servers can share one machine, so the port you are given may not match this table. Always use the port shown on your server page.

More than one port

Some games need several:

  • A game port for players.
  • A query port, which lets server lists and tools ask for the player count and name. On many Steam games, the query port is how the server browser finds you.
  • A remote console port for admin tools. This one should be kept private. See What RCON is and how to use it safely.

If players can join by typing the address but the server is missing from the browser, the query port is the usual cause.

Managed hosting versus your own machine

On a managed host, the provider sets up ports for you. Your server page lists the address and port, and you do not forward anything. Your job is to use the numbers shown, and to put the port in your game's settings if it asks, as described in the guides for each game.

On a VPS you run yourself, you open ports in the firewall, and on a home computer you forward them on your router. See Set up a firewall on your VPS with UFW for the first, and How to host a Minecraft server for home hosting and its pitfalls.

Testing whether a port is open

You can check without the game. From another computer:

  • Windows PowerShell: Test-NetConnection SERVER_IP -Port 25565
  • Linux or macOS: nc -vz SERVER_IP 25565

This works for TCP ports. UDP is harder to test, because there is no connection to confirm, so test from a real game client. Remember that "timed out" and "refused" mean different things, as explained in Connection timed out vs connection refused.

What to tell your players

Give them one clear line, such as play.mydomain.net or 203.0.113.10:25565, and test it from a device outside your network before announcing it. Include the game version and any mods needed. A tidy address with a domain is easier, and Point your domain to your server shows how.

Port problems to know

  • The port is already in use. Two programs cannot share one. Pick another, or stop the other program.
  • A firewall blocks it. On a VPS, check the rules for the exact protocol.
  • The server is listening on the wrong address. Some programs listen only on the local machine. Settings usually say 0.0.0.0 for "everywhere".
  • You changed the port and forgot the clients. Players still use the old one.

Ports are less mysterious than they look. Match the number and protocol on both ends, and most connection problems disappear. If you are still stuck, I can't connect to my server walks through the whole checklist.


Still stuck? Open a ticket on Discord - run /ticket in any channel, pick a department, and include your Server ID or Invoice ID so we can jump straight in.