Menu
 

Better Networking

Valheim: Eliminating Desync & Better Networking

In **Valheim**, the networking system uses a "Peer-to-Peer within a Dedicated Server" hybrid model. This often leads to the infamous **Desync**—where one player sees a door as closed while another sees it as open. This is primarily caused by strict internal limits on the "Data Rate" (packet size) the game is allowed to send per second.

1. The Packet Cap

By default, Valheim caps data transfer at roughly 64KB/sec. In large bases with 5,000+ building pieces, this cap is reached instantly, causing everything to "freeze" for the player.

2. Crossplay Conflicts

Using the **PlayFab** (Steam/Xbox Crossplay) backend can sometimes introduce higher latency than the pure Steam socket. Switch to Steam-only if all players are on PC.

3. Building Density

Each building piece is a "ZDO" (Z-Data Object). The more ZDOs in a 64m radius, the more data the server has to push to your client every time you move.

The "Better Networking" Solution

To fix these issues permanently, we recommend installing the Better Networking mod on both the server and all clients.

  • Increased Data Rate: Raises the internal cap from 64KB to 150KB+, allowing large bases to load without stuttering.
  • Compression: Compresses ZDO data packets, effectively doubling the amount of world info sent in the same bandwidth.
  • Queue Management: Fixes how Valheim handles outgoing packets, preventing "overflow" disconnects during boss fights.

Tuning Better Networking

Open the Configuration Manager (F1) to adjust settings. Here's how to diagnose and fix specific issues:

Problem Diagnosis Fix
Player A sees desync, but Player B's character looks fine Player B's outgoing queue is too small Player B: Increase queue size
Player A sees desync including Player B's character Player B's update rate is too high Player B: Decrease update rate and/or queue size
NPCs are skipping/teleporting Everyone's update rate too aggressive Everyone: Set update rate to 75%, queue size to 48KB
A specific player is skipping Their queue size is too large That player: Reduce queue size to 32KB, then reduce update rate if still issues

Compatibility Warning: Better Networking is incompatible with other networking mods including VNO, NetworkFix, and sometimes Serverside Simulations. Remove conflicting mods before installing.

Manual Fix (The assembly_valheim.dll Hack)

If you don't want to use mods, you can manually increase the data rate in the game's assembly file. Warning: This must be redone every time the game updates!

Setting Default Value Recommended Value
m_dataPerSec61,440245,760 (4x Increase)
m_dataPerSecLow30,720122,880
m_minSendQueueSize2,0488,192

Network Debugging (F5 Console)

To see your current network health in-game:

  1. Press F5 to open the console (ensure -console is in your Steam launch options).
  2. Type ping to see your latency to the server.
  3. Type lqd (Log Quiet Desync) to see if you are losing packets. If you see high numbers here, your internal buffer is overflowing.

Pro Tip: Most desync is caused by the player with the Worst Internet Connection entering a zone first. In Valheim, the first person in an area becomes the "Network Owner" for that zone. Always let the player with the best ping lead the way into the base.

General Network Optimization

Before or alongside Better Networking, apply these client-side optimizations:

1. Use Wired Ethernet

WiFi introduces latency and packet loss. Switching to a wired connection often eliminates desync entirely without any mods.

2. Optimize Steam Settings

  • Open Steam → Settings → In-Game
  • Change "In-game server browser: Max pings/minute" from 5000 to 250
  • Consider launching Valheim directly from valheim.exe instead of Steam library

3. Disable IPv6 (If Issues Persist)

Some networks have IPv6 routing issues. Try disabling IPv6 on your network adapter:

  • Windows: Network Settings → Adapter Properties → Uncheck "Internet Protocol Version 6"
  • Linux: Add net.ipv6.conf.all.disable_ipv6=1 to sysctl.conf

4. Disable Crossplay (Steam-Only Groups)

If all players are on Steam, disable crossplay for better performance. The PlayFab backend used for crossplay can introduce additional latency compared to pure Steam networking.

Ashlands Performance Warning

The Ashlands biome sends significantly more data than other biomes due to its complex terrain, lava mechanics, and enemy density. Since the Ashlands update, even powerful systems see performance degradation.

Ashlands-Specific Tips:

  • Limit concurrent players in Ashlands to 3-4 maximum
  • Better Networking is almost mandatory for Ashlands multiplayer
  • Avoid building large bases in Ashlands - build in Meadows and portal in
  • Expect performance hits even with optimizations - it's a known issue

Build without fear of the "Desync Devil." Host your Valheim server with Supercraft and enjoy high-bandwidth routing optimized specifically for large-scale Viking architecture.

Top