background image
Game Servers 380 7 Days to Die 4 Abiotic Factor 2 Aloft 2 alt:V 2 Americas Army Proving Grounds 2 Among Us 2 Archean 2 ARK Survival Ascended 6 ARK Survival Evolved 3 Arma 3 3 Arma Reforger 2 Aska 2 AssaultCube 2 Assetto Corsa 3 Astro Colony 2 Astroneer 2 Automobilista 2 2 Avorion 2 Banana Shooter 2 Barotrauma 3 BATTALION Legacy 2 BeamNG.drive (BeamMP) 2 Black Mesa 2 Brickadia 2 Call of Duty 2 Citadel: Forged with Fire 2 ClassiCube 2 Clone Hero 2 Colony Survival 2 Conan Exiles 4 Contagion 2 Core Keeper 2 Counter-Strike 2 3 Craftopia 2 CryoFall 2 CS2D 2 Cube 2: Sauerbraten 2 Cubic Odyssey 2 DayZ 4 DDNet 2 DDRaceNetwork 2 Dead Matter 2 Dont Starve Together 4 Eco 2 Empyrion Galactic Survival 2 Enshrouded 3 Escape from Tarkov 2 Euro Truck Simulator 2 2 Factorio 2 Farming Simulator 25 2 Fistful of Frags 2 FiveM 3 FortressCraft Evolved 2 Foundry 2 Foundry VTT 2 Frozen Flame 2 FTL Tachyon 2 Garrys Mod 3 Ground Branch 2 Half-Life 2 Deathmatch 2 Hogwarp 2 Holdfast: Nations at War 2 HumanitZ 2 Hurtworld 2 Hytale 1 Icarus 2 Insurgency Sandstorm 2 IOSoccer 2 Just Cause 3 Multiplayer 2 Kerbal Space Program 2 Killing Floor 2 3 LeagueSandbox 2 Left 4 Dead 2 Left 4 Dead 2 3 Longvinter 2 Los Angeles Crimes 2 Medal of Honor 2 Midnight Ghost Hunt 2 Mindustry 2 Minecraft 4 Minetest 2 Modiverse 2 Mordhau 3 Mount & Blade II: Bannerlord 2 Myth of Empires 2 Nazi Zombies Portable 2 Necesse 2 NeosVR 2 Neverwinter Nights EE 2 Night of the Dead 2 Nightingale 2 No Love Lost 2 No More Room in Hell 2 No One Survived 2 Nova-Life Amboise 2 Nuclear Option 2 Onset 2 Open Fortress 2 OpenArena 2 OpenRA 2 OpenRCT2 2 OpenTTD 2 Operation Harsh Doorstop 2 Palworld 3 Path of Titans 2 Pavlov VR 3 PixARK 2 Plains of Pain 2 Portal Knights 2 Post Scriptum 2 Project Zomboid 8 Puck 2 Quake Live 2 R5Reloaded 2 RedM 2 Renown 2 Resonite 2 Return to Moria 2 Rimworld Together 2 Rising World 2 Risk of Rain 2 1 Rust 4 Satisfactory 1 SCP Secret Laboratory 3 SCUM 2 Smalland 2 Solace Crafting 2 Soldat 2 Soldat 2 2 Sonic Robo Blast 2 2 Sons of the Forest 2 Soulmask 2 SourceCoop 2 Space Engineers 3 Space Station 14 2 Squad 3 Starbound 3 StarMade 2 Stationeers 2 Stormworks 2 Subnautica Nitrox 2 Sunkenland 2 SuperTuxKart 2 Sven Co-op 2 Swords 'n Magic and Stuff 2 Team Fortress 2 3 Teeworlds 2 Terraria 3 TerraTech Worlds 2 TF2 Classified 2 The Forest 3 The Front 2 The Isle 2 Tower Unite 2 Trackmania 2 Unturned 4 Urban Terror 2 V Rising 3 Valheim 3 VEIN 2 Veloren 2 Vintage Story 3 Voyagers of Nera 2 Wolfenstein: Enemy Territory 2 Wreckfest 2 Wurm Unlimited 2 Xonotic 2 Zandronum 2 Getting Started 2 Network & Connectivity 1 Server Management 2
Kategoriler

How to Configure Your UDP Port

udp port query network 0 kişi bunu faydalı buldu

Many game servers require a separate UDP port — distinct from the main game port — for Steam Query and server browser communication. Mixing both functions onto a single port is the most common cause of the "port is closed" warning and failed server browser listings. This guide shows you how to add a second port allocation in GPanel and point your server's query variable at it.

Common symptom: If your server console shows a message similar to Warning: Port 16262 is closed, performance may be severely affected, your UDP/query port is not correctly allocated or configured. Follow this guide to resolve it.

Prerequisites

  • An active game server with Legion Hosting
  • Access to GPanel — log in with your Legion Hosting credentials
  • Your server must be in a Offline state before applying startup variable changes (GPanel will prompt you if needed)
  • Know your current primary game port — visible on the Console page or the Network tab
Which games need this? Project Zomboid, Valheim, and several other Steam-based games use one port for player connections and a second port for Steam Query (server browser). The two ports must be different numbers. Project Zomboid defaults to game port 16261 and query port 16262, for example.

Why the UDP Port Must Be Separate

Game servers typically run two network listeners at the same time:

Listener Purpose Typical Default
Game Port Receives player connection traffic — movement, chat, game state 16261 (PZ), 2456 (Valheim)
UDP / Steam Query Port Responds to Steam server browser queries — player count, name, ping Game port + 1 in most cases

If both listeners are pointed at the same port number, whichever one binds first blocks the other. The server starts but the query listener cannot open, triggering the "port is closed" warning and causing your server to appear offline in Steam's server browser even though players could technically join by direct IP.

Step 1 — Identify Your Current Port Allocation

  1. Log in to GPanel and click your server.
  2. In the left sidebar, click Network.
  3. Note the port number listed in the allocations table. This is your primary game port. Write it down — you will need it in Step 3.
  4. Check whether a second allocation already exists. If the table shows only one row, you need to add a second one in Step 2.

Step 2 — Add a Second Port Allocation for UDP/Query

Note: GPanel assigns the next available port automatically. You cannot choose the exact number, but the assigned port will be what you enter into the startup variable in Step 3. Do not assume it will be your game port + 1.
  1. On the Network tab, click Create Allocation (the button label may read Add Allocation or show a + icon).
  2. GPanel will assign a new port number. Wait for the page to refresh and confirm a second row now appears in the allocations table.
  3. Write down the new port number — this will be your UDP/query port. You will enter it in Step 3.
Do not delete your primary allocation. The primary port is what players use to connect. Only add a new allocation — do not remove or reassign the existing one.
Port allocation is random. Shared hosting servers are assigned random available ports — you cannot choose a specific port number. The new allocation will be whatever port is next available on the node. If you need your server to run on specific ports (e.g., the game's default ports), you can purchase a server with a private IP address, which gives you full control over port assignment.

Step 3 — Set the UDP/Query Port Variable in the Startup Tab

Adding the allocation in GPanel reserves the port at the network level, but you also need to tell the game server software to actually use that port. This is done through a startup variable.

  1. In the left sidebar of GPanel, click Startup.
  2. Look for the variable named UDP Port, Steam Query Port, or similar. The exact label depends on your game:
    • Project Zomboid: look for UDP Port or a field labelled with the query/Steam port
    • Valheim: look for Query Port
    • Other games: look for any field that references "query", "steam query", or "UDP" separate from the main port
  3. Clear the current value and enter the new port number from Step 2.
  4. Click Save or Update to store the change.
Project Zomboid specifics: The game port variable (the port players connect to) and the UDP/query port variable are separate fields in the Startup tab. Make sure you are editing the query port field, not the game port field. The game port should remain unchanged and must match what is shown in the Network tab's primary allocation.

Step 4 — Restart the Server

  1. Go to the Console tab in GPanel.
  2. If the server is running, click Stop and wait for the status to change to Offline.
  3. Click Start.
  4. Watch the console output as the server starts. Wait for the startup sequence to complete — this typically takes 60–90 seconds for most game servers.
  5. Look for a line confirming the query port has bound successfully. The warning message (Warning: Port XXXXX is closed) should no longer appear once the port is correctly configured and allocated.

Verification

  1. In the Console tab, confirm the status shows Running and the "port is closed" warning is absent from the startup log.
  2. Open Steam and go to View > Game Servers (or press Ctrl+Shift+M). Click the Favorites tab, add your server using IP:QueryPort, and refresh. The server should now show a player count and ping rather than timing out.
  3. For Project Zomboid, connect to the server through the in-game Favorites list. A successful connection without the performance warning confirms both ports are working correctly.
  4. Verify in GPanel's Network tab that both port allocations are still present — the primary game port and the secondary query port.

Troubleshooting

The "port is closed" warning still appears after restarting

  • Double-check that the port number in the Startup tab's UDP/query field exactly matches the second allocation shown in the Network tab. Even a one-digit difference means the game is trying to open a port that is not allocated.
  • Confirm you clicked Save after changing the startup variable. Navigating away without saving discards the change.
  • Try a full stop and start rather than a restart — some games only re-read startup variables on a clean start.

There is no "Create Allocation" button on the Network tab

  • Some server plans have a fixed number of port allocations. If the button is absent or greyed out, contact Legion Hosting support to request an additional port allocation for your server.

I cannot find a UDP Port or Query Port variable in the Startup tab

  • Not all game server types expose a separate query port variable in GPanel's Startup tab. If no such field exists, the game may manage the query port automatically (usually game port + 1). In that case, ensure the second allocation you added is exactly one higher than your primary game port so the game can bind to it.
  • If you are unsure which variable controls the query port for your specific game, open a support ticket with Legion Hosting and mention the game name and the warning message you are seeing.

The server appears in the Steam server browser but players still cannot connect

  • The query port and the game port are two different things. Confirming the query port works (server appears in browser) does not mean the game port is correctly set. Verify that the game port variable in the Startup tab matches the primary allocation in the Network tab.
  • See How to Find Your Server IP and Port to confirm players are using the correct primary connection address.

The warning was present before but disappeared — do I still need to follow this guide?

  • If the warning is absent and your server browser listing and connections are working correctly, no action is needed. The warning only requires action when it is actively appearing in your startup log.

Still seeing issues after following all steps

Open a support ticket and include:

  • Your server's primary game port and secondary query port (both from the Network tab)
  • The exact warning or error message from the Console startup log
  • The current value of the UDP/Query Port variable in the Startup tab
  • The game name and server type

Bu makale faydalı oldu mu?

Ready to Get Started?

The servers are booted, select your plan and become our latest satisfied client.