Server Startup Parameters
Complete reference for all Valheim dedicated server startup parameters and launch options.
Valheim servers are configured through startup parameters (command-line arguments). On XGamingServer, these are managed through the Startup page.
Core Parameters
| Parameter | Description | Example |
|---|---|---|
-name | Server name shown in browser | -name "My Valheim Server" |
-port | Server port (uses port and port+1) | -port 2456 |
-world | World name (creates new if doesn't exist) | -world "MyWorld" |
-password | Server password (min 5 characters) | -password "secret" |
-public | Show in server browser (1=yes, 0=no) | -public 1 |
World Modifier Parameters
| Parameter | Values | Description |
|---|---|---|
-preset | default, easy, hard, hardcore, casual, hammer, immersive | Apply a difficulty preset |
-modifier combat | veryeasy, easy, hard, veryhard | Combat difficulty |
-modifier deathpenalty | casual, veryeasy, easy, hard, hardcore | Death penalty severity |
-modifier resources | muchless, less, more, muchmore | Resource gathering rate |
-modifier raids | none, muchless, less, more, muchmore | Raid frequency |
-modifier portals | casual, hard, veryhard | Portal item restrictions |
-setkey | nomap, playerevents, passivemobs, nobuildcost | Toggle special keys |
Network Parameters
| Parameter | Description | Example |
|---|---|---|
-crossplay | Enable crossplay (Steam + Xbox + MS Store) | -crossplay |
-savedir | Custom save directory path | -savedir "/saves" |
-saveinterval | Auto-save interval in seconds (default: 1800) | -saveinterval 900 |
-logFile | Custom log file path | -logFile "/logs/valheim.log" |
Set Keys
Set keys enable special world rules:
| Key | Effect |
|---|---|
nomap | Disable the map entirely |
playerevents | Only trigger events near players |
passivemobs | Creatures don't attack unless provoked |
nobuildcost | Building requires no materials (creative mode) |
Apply via startup parameter:
-setkey nomap -setkey nobuildcostCommon Configurations
Standard Public Server
-name "My Server" -port 2456 -world "MyWorld" -password "mypass" -public 1Private Casual Server
-name "Chill Vikings" -port 2456 -world "CasualWorld" -password "secret" -public 0 -preset casualHardcore Server
-name "Hardcore Vikings" -port 2456 -world "HardWorld" -password "tough" -public 1 -preset hardcore -setkey nomapCreative Building Server
-name "Build Server" -port 2456 -world "Creative" -password "build" -public 0 -setkey nobuildcost -modifier raids noneConfiguring on XGamingServer
Go to Startup
In the sidebar, click Startup.
Set parameters
Most parameters are exposed as form fields — server name, port, world name, password, crossplay toggle, and world modifiers.
Restart your server
Changes take effect on the next server start.
📝 Note: World modifiers set via startup parameters are applied when a world is first created. To change modifiers on an existing world, use in-game console commands. See World Modifiers.
Related Guides
See also: Configure World Modifiers | Change Difficulty | Crossplay
If you need help, join our Discord.
How is this guide?
