# Valheim Server Launch Parameters Reference (/docs/valheim/server-launch-parameters)



Valheim servers are configured through startup parameters (command-line arguments). On XGamingServer, these are managed through the **Startup** page.

Core Parameters [#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 [#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 [#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]

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 nobuildcost
```

Common Configurations [#common-configurations]

Standard Public Server [#standard-public-server]

```
-name "My Server" -port 2456 -world "MyWorld" -password "mypass" -public 1
```

Private Casual Server [#private-casual-server]

```
-name "Chill Vikings" -port 2456 -world "CasualWorld" -password "secret" -public 0 -preset casual
```

Hardcore Server [#hardcore-server]

```
-name "Hardcore Vikings" -port 2456 -world "HardWorld" -password "tough" -public 1 -preset hardcore -setkey nomap
```

Creative Building Server [#creative-building-server]

```
-name "Build Server" -port 2456 -world "Creative" -password "build" -public 0 -setkey nobuildcost -modifier raids none
```

Configuring on XGamingServer [#configuring-on-xgamingserver]

<div className="fd-steps">
  <div className="fd-step">
    Go to Startup [#1-go-to-startup]

    In the sidebar, click **Startup**.
  </div>

  <div className="fd-step">
    Set parameters [#2-set-parameters]

    Most parameters are exposed as form fields — server name, port, world name, password, crossplay toggle, and world modifiers.
  </div>

  <div className="fd-step">
    Restart your server [#3-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](/docs/valheim/world-modifiers).
  </div>
</div>

Related Guides [#related-guides]

See also: [Configure World Modifiers](/docs/valheim/world-modifiers) | [Change Difficulty](/docs/valheim/difficulty-presets) | [Crossplay](/docs/valheim/crossplay-setup)

If you need help, join our [Discord](https://discord.xgamingserver.com/).
