Orders are paused while we move to a new game panel. Tell me when they reopen
  1. Home
  2. Guides
  3. Valheim

Valheim guide

Valheim dedicated server settings: name, world, password and backups

Short answer. Valheim is configured with start options on the start line of the server script: -name, -port, -world and -password are the four you always set. The game uses the port you choose and the one after it, and the default range is 2456-2457.

Where the settings go

Iron Gate's own guide says the settings sit on one line of the server's start script (start_headless_server.bat on Windows, start_server.sh on Linux), the line that starts with start valheim_server. You change the options on that line, save, and restart the server. If you rent a server and use a web panel, the same options are usually exposed as fields; the names below are what to look for.

The four options you always set

OptionWhat it does
-nameThe name shown in the server list.
-portThe port the server communicates on. Valheim uses this port and the one after it.
-worldThe world name. If a world with that name does not exist, it is created. You can also give the name of an existing world.
-passwordThe password players must enter to join.

Options for control and tidiness

OptionWhat it does
-public1 is the default and lists the server in the browser. Set it to 0 and people can only join with the Join IP button.
-savedirOverrides the default save path where worlds and permission files are stored.
-logFileWhere to write the log file.
-saveintervalHow often the world is saved. Default 30 minutes (1800 seconds).
-backupsHow many automatic backups to keep.
-backupshort / -backuplongThe intervals between backups, in seconds.

Private by default for a group of friends

If you only want your own group on the server, set a password and set -public 0. The server then does not appear in the public browser, and friends use the Join IP button with your address and port. Add a password in every case: the options page does not list a password rule, so pick something long enough that nobody can guess it, and tell your friends in a private message.

For a tighter list of who may join, use the permitted list described in the permission files guide.

Ports and the firewall

The default port range is 2456-2457, because the server uses the port you set and that port plus one. If you change -port, open both numbers on whatever sits between the server and the internet. On Windows, if a firewall pop-up appears the first time the server runs, tick all the boxes so the server can talk to the internet.

There is also a crossplay option. When the server runs on the crossplay backend (PlayFab), players from any platform can join, and because it transmits data through a relay server it does not need port forwarding. Use it if some of your group are on a console.

Where the world is saved

By default, the saves are in:

  • Windows: %USERPROFILE%/AppData/LocalLow/IronGate/Valheim
  • Linux: ~/.config/unity3d/IronGate/Valheim

Worlds and the permission files live in that save path, or in the folder you give to -savedir. If you run the server in a container, the guide says they sit inside the directory you mount.

Automatic backups, in plain terms

The server keeps automatic backups for you. Out of the box that is one backup about 2 hours old, then three backups 12 hours apart (-backupshort 7200 and -backuplong 43200). The first backup uses the short interval and the rest use the long one. Raise -backups if your group plays heavily and you would like more steps to roll back to. Automatic backups sit alongside the world, so for real protection also copy the save folder somewhere else every now and then, especially before an update or before experimenting with a new world name.

An example start line shape

valheim_server -name "Our Valheim" -port 2456 -world "OurWorld" -password "choose-your-own" -public 0

The exact line in your script has more on it (the official script already contains the executable name and paths), so edit the options in place rather than pasting this over the whole line.

Quick answers

Which ports does a Valheim server use?

The port you set with -port and the next one; the default range is 2456-2457.

How do I stop my Valheim server appearing in the public list?

Set -public 0. Players then join with the Join IP button.

Where does Valheim save its worlds?

On Windows in %USERPROFILE%/AppData/LocalLow/IronGate/Valheim and on Linux in ~/.config/unity3d/IronGate/Valheim, unless you set -savedir.