← Blog

Configurer un serveur Valheim dédié étape par étape

Par Benjamin Dayan · PDG

· Mis à jour le October 17, 2026 · Lecture 5 min

Contents

Valheim server configuration is the difference between a stable co-op world that survives months of raids and a box that crashes every time someone opens a portal. This guide walks through the actual files and flags that matter: the start_headless_server script, the three network ports Valheim needs, and the plain-text lists that control who gets in.



Valheim Server Configuration: start_headless_server Parameters

On Linux, the Valheim dedicated process ships as a Bash script called start_headless_server.sh, wrapped around the valheim_server.x86_64 binary. Every meaningful piece of Valheim server configuration happens through the arguments passed to this script, not through a graphical menu.

Core Launch Flags

Here's a typical launch line, the kind you'd find inside the script or call directly:

./valheim_server.x86_64 -nographics -batchmode \
  -name "Fly-Serv Test World" \
  -port 2456 \
  -world "MyWorld" \
  -password "SuperSecret123" \
  -public 1 \
  -savedir "/home/steam/valheim/saves"
  • -name: the label shown in the server browser.
  • -port: the base UDP port (defaults to 2456, see the next section).
  • -world: the world save name, used to generate or load the .db and .fwl files.
  • -password: required if -public 1 is set; Valheim enforces a minimum length and rejects passwords containing the world or server name.
  • -public: 1 lists the server in the community browser, 0 keeps it private (direct IP/Steam invite only).
  • -savedir: where world and character data are written, useful when you want saves outside the default Steam path.

Crossplay and Logging Flags

Two additional flags are worth setting on most setups:

-crossplay
-logFile "/home/steam/valheim/logs/valheim.log"

-crossplay enables the Xbox/PC crossplay network layer; without it, only Steam clients can connect. The log file flag keeps a persistent record you can grep for crash traces or connection errors instead of relying on console scrollback.

If you'd rather skip the manual scripting entirely and get the binary, ports and lists ready out of the box, our Valheim server hosting handles the whole setup for you.



Opening Ports 2456-2458 for Steam and Game Traffic

Valheim uses a block of three consecutive UDP ports starting at the base port defined with -port. With the default value of 2456, the full configuration is 2456-2458/UDP.

What Each Port Does

PortProtocolPurpose
2456UDPMain game traffic
2457UDPGame traffic (second channel)
2458UDPSteam query port, used by the server browser and connection handshake

Firewall Rules on Linux

On a machine running ufw, open the range before starting the process:

sudo ufw allow 2456:2458/udp
sudo ufw status verbose

If you change the base port with -port 2466, for example, remember the whole block shifts: you'd then open 2466-2468/UDP instead of the default range.

Router Port Forwarding

For a box behind NAT, forward the same UDP range to the local IP of the machine running the process. Skipping this step is the single most common reason a world shows up as "online" locally but unreachable from a friend's client. A quick way to confirm the ports are actually open is an external port checker or asking a friend outside your network to try connecting by direct IP before worrying about anything else in the configuration.



World Name, Password and Save Data

The -world and -password flags are tied together: Valheim refuses to run a public server without a valid password, and it rejects weak ones (too short, or matching the world/server name).

Save File Locations

World files are stored as a pair: a .db file holding terrain and structures, and a .fwl file holding seed and metadata. On a standard Steam install they live under:

~/.config/unity3d/IronGate/Valheim/worlds_local/

If you set -savedir, both files move to that path instead. Keep that path consistent across restarts — pointing the script at a different -savedir or a renamed -world value generates a brand-new map rather than loading the existing one.

Backup Strategy for World Files

Because the entire world state lives in two small files, backing them up is simple: a cron job copying the worlds_local folder to a dated archive is enough to recover from a corrupted save or a bad mod update.

0 */6 * * * tar -czf /home/steam/backups/valheim-$(date +\%F-\%H).tar.gz \
  /home/steam/valheim/saves/worlds_local/

If you're running this on a machine you manage yourself, a Linux VPS gives you full control over that cron schedule and the storage behind it.



Admin, Permitted and Banned Lists

Valheim's access control relies on three plain-text files, each containing one SteamID64 per line (no Steam name, no quotes).

Syntax of the List Files

FileLocationEffect
adminlist.txtsame folder as the save filesgrants in-game admin console access (kick, ban, god mode via commands)
permittedlist.txtsame folder as the save filesturns the world into a whitelist-only instance when populated
bannedlist.txtsame folder as the save filesblocks the listed SteamID64 from connecting at all

Example content of adminlist.txt:

76561198000000001
76561198000000002

Reloading Lists Without a Restart

If the process was launched with -console, you can edit these files while the server keeps running and reload them from the in-game console or server console with:

adminlist
permittedlist
bannedlist

Typing the command name alone (without an argument) both displays the current list and forces a reload from disk, so a banned SteamID64 takes effect for new connection attempts immediately, without disconnecting players already in the world.

Common Mistakes

  • Using a Steam friend code or custom URL instead of the numeric SteamID64 — the files only accept the 17-digit ID.
  • Forgetting that permittedlist.txt being non-empty silently switches the world to whitelist mode.
  • Editing the files with a word processor that adds hidden formatting; stick to a plain text editor or nano.

For a wider look at how these settings compare across other titles, browse all our game servers or the Fly-Serv blog for more configuration guides.



Conclusion

Getting Valheim server configuration right comes down to four moving parts: correct start_headless_server flags, the 2456-2458 UDP range open on both firewall and router, a world name paired with a strong password, and clean adminlist, permittedlist and bannedlist files kept in sync with the save folder.



FAQ

Why does my Valheim world generate a new map instead of loading the old one?

Check that the -world value and the -savedir path match exactly what was used previously. Any mismatch in name or path makes Valheim treat it as a fresh world.

Do I need to open port 2458 if I'm not using the public server browser?

Yes. Port 2458 handles the Steam query handshake used for direct-connect as well, not only browser listings. Leaving it closed causes connection timeouts even with a direct IP.

How do I remove someone from the bannedlist.txt file?

Delete their SteamID64 line from bannedlist.txt, save the file, then run the bannedlist command in the console to force a reload without restarting the process.

Read next