A dedicated WireGuard® server gives you a static IP and port forwarding, so you can host game servers for friends without exposing your home connection. This guide covers common game set-ups, consoles and what to check if players can't connect.
Why use a dedicated server for gaming
- Your home IP stays private. Players connect to your server's IP, so attacks hit the server rather than your home router.
- Host without touching your router. Port forwarding happens on the server, and it works behind CGNAT and on mobile connections.
- A fixed address. Your server's IP doesn't change, so players always know where to find you.
- Low overhead. WireGuard is lightweight and runs over UDP, like most games.
The basic set-up
- Create a WireGuard user for the PC that runs the game server, for example
gaming-pc. See Creating and Managing WireGuard Users. - Download its
.conffile, import it into WireGuard on that PC and activate the tunnel. - Add port forwards for your game (examples below). See Setting Up Port Forwarding for the steps.
- Allow the game server through the PC's firewall.
- Give players your server's IP address, shown under Server Info › IP Address.
Ports below are the usual defaults. If you've changed the port in your game server's settings, forward that port instead.
Minecraft
- Java Edition:
25565to25565, TCP. Players connect toyour-server-ip:25565. - Bedrock Edition:
19132to19132, UDP.
Valheim
Valheim uses consecutive UDP ports, starting at the port set on your server (2456 by default). Add one forward for each:
2456to2456, UDP2457to2457, UDP2458to2458, UDP
ARK: Survival Evolved
7777to7777, UDP (game)7778to7778, UDP27015to27015, UDP (Steam query)
Other Steam game servers
Many use 27015. If you're not sure which protocol, forward it as Both. Check your game's server documentation for any extra ports.
Consoles (PlayStation, Xbox, Switch)
Consoles can't run WireGuard themselves. To put a console behind your server:
- Create a WireGuard user for the console.
- Set up that config on a router that supports WireGuard, then connect the console to that router. See Router Setup Guides for help with common routers.
- Add any port forwards your game needs. Point them at the internal IP of the router's WireGuard user.
Reducing lag
- Your server's location matters. Players get the best ping when the server is close to most of them.
- Use a wired connection on the gaming PC where you can.
- Keep
PersistentKeepalive = 25in your config. It keeps the tunnel open so incoming players can always reach you.
FAQs
Can lots of people join my game at once?
Yes. Everyone who connects to your server's IP on the forwarded port reaches your game.
Is using a VPN allowed in my game?
Most games don't mind, but some games and anti-cheat systems have rules about VPNs. Check your game's terms if you're unsure.
My game server shows as offline to other players. What should I check?
- WireGuard is active on the PC running the game, and the user shows Online on the server page.
- The port forward is listed under the user's Ports, with the right ports and protocol.
- The game server is running and listening on the internal port.
- Your PC's firewall (for example Windows Defender Firewall) allows the game server.
- You're testing from outside, for example a friend's connection or a phone on mobile data, not from the same PC.
Still stuck? Open a support ticket and tell us your device, app version and what you've tried.