Host a Valheim or Palworld Server at Home Without Port Forwarding
Renting a dedicated game server costs money every single month, even during weeks when nobody plays. Running one at home is free, but the moment you try to let friends connect from outside your network, you hit a wall: your ISP uses CGNAT, port forwarding does nothing, and your router doesn't even own a public IP address. This guide shows how to use a UDP tunnel with Localtonet to make your home Valheim or Palworld server reachable from anywhere, without touching your router, without a static IP, and without paying for a VPS.
Why Port Forwarding Doesn't Work for Most People
Valheim uses UDP ports 2456 and 2457. Palworld uses UDP 8211. To let friends connect directly, those UDP packets need a path from the public internet into your machine. Port forwarding on your router is the traditional answer, but it only works if your router actually owns a public IP address. Most residential ISPs today deploy CGNAT (Carrier-Grade NAT), where a single public IP is shared across dozens of households. Your router sits behind the carrier's NAT, so inbound connections never reach it at all.
T-Mobile Home Internet, Starlink, most fiber ISPs in Europe and Asia, and a growing number of US cable providers all use CGNAT. Even if your router's port forwarding settings look correct, the packets from your friends simply stop at the carrier's NAT layer and never arrive.
A UDP tunnel solves this by reversing the connection direction. Instead of waiting for inbound traffic, the tunnel agent on your machine makes an outbound connection to Localtonet's relay server. Localtonet assigns your server a public address. Your friends connect to that address. The relay forwards traffic through the existing outbound tunnel to your local port. No inbound ports need to be open.
What You Need Before Starting
How to Set Up a Valheim Server with Localtonet: Step-by-Step
Install SteamCMD and download the Valheim dedicated server
SteamCMD is the command-line Steam client. App ID 896660 is the Valheim dedicated server, free to download without owning the game.
sudo apt install steamcmd -y
steamcmd +force_install_dir /home/valheim-server +login anonymous +app_update 896660 validate +quit
# Run SteamCMD.exe from its install folder
.\steamcmd.exe +force_install_dir "C:\valheim-server" +login anonymous +app_update 896660 validate +quit
Create a startup script for the server
The server needs a world name, server name, and a password. Pick a password — Valheim requires one for dedicated servers. The -public 0 flag keeps it off the public server browser since friends will connect directly through the tunnel.
#!/bin/bash
export SteamAppId=892970
./valheim_server.x86_64 \
-name "My Home Server" \
-port 2456 \
-world "MyWorld" \
-password "yourpassword" \
-public 0
set SteamAppId=892970
valheim_server.exe -name "My Home Server" -port 2456 -world "MyWorld" -password "yourpassword" -public 0
Start the Valheim server and confirm it's listening
Run the startup script and wait for the "Game server connected" log line. Then verify the process is actually bound to UDP 2456 before setting up the tunnel.
chmod +x start_server.sh && ./start_server.sh
# In a second terminal, verify the port:
ss -ulnp | grep 2456
netstat -ano | findstr :2456
Download and authenticate the Localtonet agent
Head to localtonet.com/download and grab the binary for your OS. Copy your auth token from My Tokens and run the auth command once.
chmod +x localtonet
./localtonet authtoken YOUR_TOKEN_HERE
.\localtonet.exe authtoken YOUR_TOKEN_HERE
Create and start the UDP tunnel from the dashboard
In the Localtonet dashboard, open TCP/UDP Tunnels. Set Protocol to UDP, Local Port to 2456, and click Save. The tunnel appears in your list. Click Start. Localtonet assigns a public address like example.localto.net:14521 and shows it in the dashboard. That's everything. Send that address to your friends. In Valheim they add it under Join Game → Add server → IP.
Setting Up a Palworld Dedicated Server
The process for Palworld is nearly identical. The dedicated server binary is App ID 2394010 on SteamCMD, and the default game port is UDP 8211. Download and run it the same way, then create a UDP tunnel pointing at local port 8211 instead of 2456.
steamcmd +force_install_dir /home/palworld-server +login anonymous +app_update 2394010 validate +quit
cd /home/palworld-server
./PalServer.sh -port=8211 -players=16
In the Localtonet dashboard, create a UDP tunnel with Local Port set to 8211. Friends connect in Palworld under Multiplayer → Connect using the public address from the dashboard. The server also exposes a Steam query port at UDP 27015 if you want server browser visibility, but for direct-connect play only the 8211 tunnel is required.
Palworld's server settings live in Pal/Saved/Config/LinuxServer/PalWorldSettings.ini (or the Windows equivalent). Set PublicPort=8211 and PublicIP= to the public IP shown in your Localtonet tunnel. Without the correct PublicIP, the server may advertise the wrong address to connecting clients and cause join failures.
Port Reference for Common Game Servers
| Game | Protocol | Default Port | Tunnel Type |
|---|---|---|---|
| Valheim | UDP | 2456 | UDP |
| Palworld | UDP | 8211 | UDP |
| Minecraft Java | TCP | 25565 | TCP |
| Minecraft Bedrock | UDP | 19132 | UDP |
| CS2 | UDP | 27015 | UDP |
| Terraria | TCP | 7777 | TCP |
Your router's port forwarding is not the only firewall in the picture. The operating system on the server machine has its own firewall, and by default it blocks inbound UDP traffic on game ports even from localhost. The Localtonet tunnel delivers traffic to 127.0.0.1:2456, but if the OS firewall drops it, the server never sees the packets. On Linux, open the port with ufw allow 2456/udp. On Windows, add an inbound rule in Windows Defender Firewall for UDP 2456 (or 8211 for Palworld). This step is what most "server not showing up" reports come down to.
sudo ufw allow 2456/udp
sudo ufw allow 2457/udp
sudo ufw reload
Tips for a Stable Home Game Server
~/.config/unity3d/IronGate/Valheim/worlds_local/ on Linux. A nightly cron job copying that folder to an external drive takes 30 seconds to set up and has saved many save files.
Localtonet vs. Other Options for Game Server Hosting
| Feature | ngrok | Hamachi / ZeroTier | Cloudflare Tunnel | Localtonet |
|---|---|---|---|---|
| UDP support | ✘ | ✔ | ✘ | ✔ |
| No client install for friends | ✔ | ✘ | ✔ | ✔ |
| Works behind CGNAT | ✔ | ~ | ✔ | ✔ |
| Persistent address (no restart changes) | ~ | ✔ | ✔ | ✔ (paid) |
| Free tier available | ✔ | ✔ | ✔ | ✔ |
| Price (paid) | $10+/mo | Free / $5+/mo | Free (HTTP only) | ~$2/tunnel/mo |
Hamachi and ZeroTier are viable for small groups of technical friends, but they require every player to install a VPN client and join a virtual network before connecting. That's a significant barrier if you're inviting people who aren't comfortable with networking. Localtonet gives friends a plain IP address and port, nothing else to install.
Frequently Asked Questions
Do my friends need to install anything to connect to my server?
No. Friends connect using the public IP and port Localtonet assigns to your tunnel, the same way they'd connect to any dedicated server. They enter the address in the game's server list and hit Join. Nothing extra to install on their end.
Can I play on the same machine that runs the server?
Yes, for Valheim. Run the dedicated server in the background, then launch the game normally. To connect to your own server, use localhost:2456 in the Join Game menu instead of the public tunnel address. Palworld also supports this setup but the server is more RAM-heavy, so 16 GB is the comfortable minimum if you're playing and hosting on the same machine.
The server shows up in my dashboard but friends can't connect. What's wrong?
The most common cause is the OS firewall blocking the UDP port even though the tunnel is active. Run sudo ufw allow 2456/udp on Linux, or add an inbound UDP rule in Windows Defender Firewall. The second most common cause is the game server itself not yet fully started when the connection attempt arrives: wait for the "Game server connected" log line before sharing the address.
Will the tunnel address change every time I restart?
On the free plan, yes, the assigned port may change between agent restarts. On any paid plan, the port is persistent and stays the same indefinitely. For a regular game group where you want a stable invite link, the paid plan's ~$2/month is worth it so you set the address in your friends' server lists once.
How many players can I realistically host from home?
Valheim runs well with 5–10 players on a machine with 4 GB RAM and 4 CPU cores, consuming roughly 1–2 Mbps upload per active player. Palworld is heavier: 8 players needs around 8 GB RAM and a modern 4-core CPU. Your upload bandwidth is the real constraint: a 20 Mbps upload connection comfortably handles 10 simultaneous players on either game.
Can I run both a Valheim and a Palworld server at the same time?
Yes. Create two separate UDP tunnels in the Localtonet dashboard, one pointing at port 2456 (Valheim) and one at port 8211 (Palworld). Both tunnels run simultaneously from one agent process. Each gets its own public address.
Is leaving a tunnel running a security risk?
The tunnel exposes your game server port, not your whole machine. Anyone who finds the address can attempt to connect, but the game's own password protection handles that. For Valheim, always set a server password (Valheim requires it for dedicated servers). For Palworld, set a password in PalWorldSettings.ini using the ServerPassword field. Stop the tunnel when the server isn't in use to close the exposure entirely.
Does this work on a Raspberry Pi?
Localtonet runs on ARM and works fine on a Raspberry Pi 4 or 5. However, neither Valheim nor Palworld ship ARM-native server binaries. Valheim's server binary is x86-64 only, so you'd need to run it under an x86 emulation layer, which has a significant performance cost and isn't recommended for real play sessions. A Raspberry Pi works well as a Minecraft Bedrock or Terraria server, but Valheim and Palworld need an x86 machine.
Ready to Host Your Own Game Server?
Get a free Localtonet account and have your first UDP tunnel running in under five minutes. No credit card required, no router configuration, works behind any ISP.
Get Started Free →