How to Find Your Valheim Server IP Address
In this article
This guide shows you how to locate the IP address of your Valheim server, whether it's a dedicated server you rent or host yourself, or a world you're playing with friends. You'll need the IP to connect directly, share it with others, or troubleshoot connection issues. The steps differ slightly depending on whether you're on Windows, Linux, or using a hosting provider's panel.
What You'll Need
- Access to the machine running the Valheim server (or its hosting control panel).
- If the server is remote, the ability to SSH or RDP into it.
- For self-hosted servers, the server must be running and listening on the default port (2456).
Step-by-Step
Method 1: If You Rent a Server from a Hosting Provider
- Log in to your hosting provider's website (e.g., the company you bought the server from).
- Go to your server's dashboard or control panel. This is usually labeled "Servers", "My Services", or "Game Panels".
- Look for a section called "Connection Details", "Server Info", or "IP Address". The IP will typically be listed as a string like
123.45.67.89or a hostname likeserver123.hostingcompany.com. - Note the port. Valheim uses port 2456 by default. If your provider lists a separate "query port" or "game port", that is likely 2456 or 2457. The IP alone is not enough; you need the port to connect.
- Copy the IP and port. In Valheim's join menu, you'll enter it as
IP:port(e.g.,123.45.67.89:2456).
Method 2: If You Host the Server Yourself on Windows
- On the machine running the server, open Command Prompt. Press
Win + R, typecmd, and press Enter. - Type
ipconfigand press Enter. Look for the section labeled "Ethernet adapter" or "Wireless LAN adapter" that is active (not disconnected). - Find the line that says "IPv4 Address". That is your server's local IP address (e.g.,
192.168.1.10). - This local IP only works for devices on your own network. For friends outside your home, you need your public IP. Go to a website like
whatismyip.comon the same machine, and note the public IP shown there. - You must also set up port forwarding on your router. Access your router's admin page (typically
192.168.1.1or192.168.0.1), find "Port Forwarding", and forward UDP ports 2456 and 2457 to your server's local IP address. - Your friends will use your public IP with the port:
PUBLIC_IP:2456. You, on the same network, will use the local IP (orlocalhost).
Method 3: If You Host on Linux (Dedicated Server)
- SSH into your Linux server. Open a terminal and run
hostname -Ito see the local IP addresses. The first one is usually your main IP. - To find your public IP, run
curl ifconfig.meorcurl icanhazip.com. That returns your public IP. - If you're using a firewall (like UFW), ensure UDP port 2456 is allowed:
sudo ufw allow 2456/udp. - If the server is behind a router, set up port forwarding as described in the Windows method.
Method 4: If You're Playing on a World You Created (Non-Dedicated)
- If you're hosting a world from the main menu (not a dedicated server), your IP is still needed for friends to join. The process is the same as above: find your local IP with
ipconfigorhostname -I, and your public IP via a web service. - Port forwarding must be set up on your router for ports 2456 and 2457.
- Share your public IP with friends. They will join via the "Join" tab in Valheim, entering
PUBLIC_IP:2456.
Common Mistakes
- Using the local IP for external friends: Giving someone your
192.168.x.xaddress will not work outside your network. They need your public IP. - Forgetting the port: Valheim does not use port 80 or 443. You must specify port 2456 (or whatever you configured). Without it, the connection fails.
- Not forwarding both UDP ports: Valheim uses 2456 and 2457 (and sometimes 2458 for Steam query). Forwarding only 2456 can cause issues with server listing and connection stability.
- Using TCP instead of UDP: Valheim uses UDP. If you forward TCP, it won't work.
- Assuming the public IP never changes: Most home internet connections have dynamic IPs. If your IP changes, friends must use the new one.
Tips
- To make it easier for friends, consider using a free dynamic DNS service (like DuckDNS or No-IP) that maps a hostname to your changing public IP.
- If you're on a hosted server, many providers give you a hostname instead of a raw IP. You can use that hostname in Valheim; it works the same.
- Test your connection from outside your network using a mobile hotspot or a friend's device. That way you confirm port forwarding works.
- Write down your server's local IP and public IP somewhere safe. You'll need them for configuration changes.
Troubleshooting
Friends cannot connect even with the correct IP:
- Check that the server is running and not paused. In Valheim, if the server is in the main menu, it's not accepting connections.
- Verify port forwarding is set to UDP, not TCP. Double-check the local IP you forwarded to matches the server's current IP (it can change if DHCP reassigns).
- Check your firewall on the server machine. On Windows, you may need to allow Valheim server through the firewall. On Linux, check UFW or iptables.
- If you're using a hosting provider, check their status page or support for outages.
You can see the server in the community list but can't join by IP:
- This usually means the IP is correct but the port is wrong. Try joining with port 2457 instead of 2456 (some setups use that).
- If you're on the same network as the server, try using the local IP instead of the public IP. Some routers block NAT loopback (connecting to your own public IP from inside).
IP address shows as 0.0.0.0 or blank:
- On Linux, if you ran
hostname -Iand got nothing, your network interface may be down. Check withip addrand ensure you have a valid IP. - On Windows, if
ipconfigshows 0.0.0.0, you may not have a network connection. Reconnect to your network.
Port forwarding doesn't seem to work:
- Ensure your server's local IP is static. Set a DHCP reservation in your router so the IP doesn't change.
- Some routers require you to enable "Port Forwarding" separately from "UPnP". Disable UPnP to avoid conflicts.
- Test the port using an online port checker tool (e.g.,
canyouseeme.org) while the server is running. If it shows closed, your router or firewall is blocking.
Frequently Asked Questions
Q: What is the default Valheim server port?
A: The default is 2456 (UDP). Valheim also uses 2457 and 2458 for Steam-related features and querying. You only need to forward 2456 and 2457 for basic play.
Q: Do I need a static IP for my Valheim server?
A: Not strictly, but a static public IP (or dynamic DNS) makes it easier for friends to connect. If your IP changes, they'll need the new one.
Q: Can I use my public IP to connect from the same network?
A: Sometimes yes, but many routers don't support NAT loopback. If it fails, use your local IP (e.g., 192.168.x.x) when playing on the same network.
Q: My server is on a VPS. How do I find the IP?
A: Your VPS provider's dashboard usually shows the public IP. You can also SSH in and run curl ifconfig.me to get the public IP.
Q: Why does my IP change every few days?
A: Most ISPs assign dynamic IPs. You can request a static IP from your ISP (often for a fee) or use a dynamic DNS service to keep a consistent hostname.
Q: I see a hostname instead of an IP from my hosting provider. Is that okay?
A: Yes, you can use the hostname directly in Valheim. It will resolve to the IP automatically. Just append the port (e.g., server123.provider.com:2456).