How to Port Forward a Valheim Server
Learning how to port forward a Valheim server allows players outside your local network to connect to a dedicated server hosted on your computer. Proper port forwarding routes incoming traffic from your router to the server's local IP address, letting the Valheim client reach the game server over the internet. Valheim uses UDP ports for server communication, and your Windows Firewall and router configuration must also allow the required traffic. This is useful when hosting a persistent world for friends without relying on a hosting provider or relay server.
Find Your Computer's Local IP Address
- Windows: Press `Windows + R`, enter `cmd`, and press Enter. Then enter `ipconfig` and press Enter.
- Linux: Open the Terminal and enter `ip addr`.
- macOS: Open Terminal and enter `ipconfig getifaddr en0` for Wi-Fi, or `ipconfig getifaddr en1` for Ethernet.
- Find your local IPv4 address under the network adapter you're using.
- Note this address, as you will need it to configure port forwarding.
Port Forwarding
- Find the Port Forwarding section.
- Create a new port-forwarding rule.
- Enter the desired name.
- Set the UDP ports to `2456-2458`
- Enter your computer's local IPv4 address as the Internal IP Address.
- Save the rules.
- Players can connect using the external/public IP address and `2456`.
Updated on: 12/09/2026
Thank you!