Valheim Server Settings Generator
Choose your server name, password and world, turn on crossplay, and set the world presets and modifiers Valheim 1.0 supports. We write the start script for Windows or Linux, plus the launch options a host's control panel asks for.
How to use the start script
- Install the Valheim Dedicated Server: it is in the Tools section of your Steam library, or SteamCMD app 896660.
- Download the script for your system and save it in the server folder. Use your own file name, because a server update can overwrite the start script that ships with the server.
- Forward the UDP ports shown in the script on your router and firewall. Crossplay servers do not need this.
- Run the script. The first start creates the world you named.
- On a rented server, paste the launch options into your host's startup parameters field instead.
Valheim dedicated server settings reference
Every option this generator writes, with Valheim's default and the values it accepts. Options left at their default are not written into the script.
| Setting | Launch option | Default | Values | What it does |
|---|---|---|---|---|
| Server name | -name | My Valheim server | Text | Shown in the server browser. |
| Password | -password | — | 5 or more characters | At least 5 characters, and not part of the server name. |
| World name | -world | Dedicated | Text | A new name creates a new world; an existing name loads that world. |
| Port | -port | 2456 | 1024 to 65533 | Valheim uses this port and the one above it. Forward it and the next two, UDP. |
| List it in the server browser | -public | On | On or off | Off hides it; players then join with Join IP. |
| Crossplay | -crossplay | Off | On or off | Lets Xbox, PC Game Pass, PlayStation 5, Switch 2 and Mac players join. No port forwarding needed. |
| World preset | -preset | None (default world) | None (default world), Normal, Casual, Easy, Hard, Hardcore, Immersive, Hammer | Iron Gate's ready-made world settings. Hammer counts as a cheat and blocks some achievements. |
| Combat | -modifier Combat | Normal (default) | Normal (default), Very easy, Easy, Hard, Very hard | How hard enemies hit and how much damage they take. |
| Death penalty | -modifier DeathPenalty | Normal (default) | Normal (default), Casual, Very easy, Easy, Hard, Hardcore | What you lose when you die. |
| Resources | -modifier Resources | Normal (default) | Normal (default), Much less, Less, More, Much more, Most | How many resources you gather. |
| Raids | -modifier Raids | Normal (default) | Normal (default), None, Much less, Less, More, Much more | How often enemies raid your base. |
| Portals | -modifier Portals | Normal (default) | Normal (default), Casual, Hard, Very hard | Which items can travel through portals. |
| No build cost | -setkey nobuildcost | Off | On or off | Building costs no materials. |
| Player-based raids | -setkey playerevents | Off | On or off | Raids follow each player's own progress instead of the world's. |
| Passive enemies | -setkey passivemobs | Off | On or off | Enemies only fight back when attacked. |
| No map | -setkey nomap | Off | On or off | Turns off the map. |
| Save every (seconds) | -saveinterval | 1800 | 60 to 86400 | How often the world saves. The default is 30 minutes. |
| Backups to keep | -backups | 4 | 0 to 100 | The first backup uses the short interval, the rest the long one. |
| First backup after (seconds) | -backupshort | 7200 | 60 to 604800 | The default is 2 hours. |
| Later backups every (seconds) | -backuplong | 43200 | 60 to 604800 | The default is 12 hours. |
| Save folder | -savedir | — | A folder path | Where worlds and the admin, ban and permitted lists are kept. Optional. Letters, numbers, spaces, slashes, colons, dots, dashes and underscores only. |
| Log file | -logFile | — | A file path | Writes the server log to this file. Optional. Letters, numbers, spaces, slashes, colons, dots, dashes and underscores only. |
| Instance ID | -instanceid | — | Text | Only for several crossplay servers on one machine: give each a different ID. |
Checked against Iron Gate's guide to dedicated servers, Iron Gate's patch notes on .
World presets and modifiers
A preset applies a set of world modifiers in one go. Valheim requires any -modifier options to come after the -preset option, so a modifier you choose here changes that part of the preset and leaves the rest. Iron Gate does not publish exactly which modifiers each preset sets, so we do not guess them here.
The keys at the end of the list are switches: No build cost, Player-based raids, Passive enemies and No map. Admins can also change these in game with the console commands setworldpreset, setworldmodifier and setkey.
Saves, backups and Valheim 1.0
By default the server saves every 30 minutes and keeps four backups: the first after two hours, the rest every twelve hours. Valheim 1.0 stores each world as a folder instead of a single file and makes a backup the first time it loads an older world.
Next steps
Valheim server settings FAQ
Why won't my Valheim server start with my password?
The notes in the start script that ships with the server say the password needs at least 5 characters and must not appear anywhere in the server name. The generator checks both before it writes the script.
Which ports does a Valheim server need?
Iron Gate's manual says the server uses the port you choose and the one above it: 2456 and 2457 by default. The start scripts that ship with the server say to forward 2456-2458, so forward all three, UDP. Our test server opened UDP ports only. A crossplay server does not need port forwarding.
Can I change world modifiers on an existing world?
Yes. Change the options and restart the server with the new script. Admins can also use the console commands setworldpreset and setworldmodifier in game.
Does this work for a rented server?
Yes. Copy the launch options and paste them into your host's startup parameters field. Most hosts set the name, password and world in their own panel, so check which fields they already have.
Is there a setting for the number of players?
No. Valheim has no launch option for it: a server holds up to 10 players.
Did Valheim 1.0 change the server settings?
No. Iron Gate's 1.0 notes keep the same launch options. 1.0 changed how worlds are saved (as folders) and added more crossplay platforms.
