> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.sparkedhost.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# 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

1. Find the Port Forwarding section.

2. Create a new port-forwarding rule.

3. Enter the desired name.

4. Set the UDP ports to \`2456-2458\`

5. Enter your computer's local IPv4 address as the Internal IP Address.

6. Save the rules.

7. Players can connect using the external/public IP address and \`2456\`.