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
| Option | What it does |
|---|---|
-name | The name shown in the server list. |
-port | The port the server communicates on. Valheim uses this port and the one after it. |
-world | The world name. If a world with that name does not exist, it is created. You can also give the name of an existing world. |
-password | The password players must enter to join. |
Options for control and tidiness
| Option | What it does |
|---|---|
-public | 1 is the default and lists the server in the browser. Set it to 0 and people can only join with the Join IP button. |
-savedir | Overrides the default save path where worlds and permission files are stored. |
-logFile | Where to write the log file. |
-saveinterval | How often the world is saved. Default 30 minutes (1800 seconds). |
-backups | How many automatic backups to keep. |
-backupshort / -backuplong | The 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.