Game Hosting home

Valheim Dedicated Server Options: 16 Flags Explained

See what Valheim dedicated server options the official manual documents, which defaults it states, and how to verify one safe change at a time.

Difficulty
NormalDifficulty Normal
Time to do
12 min
Reading
11 min
Updated
By
Game Hosting team

You will need

  • Installed Valheim Steam dedicated-server files and their bundled guide
  • Access to the startup script, service or hosting panel that launches the server
  • A protected or disposable world before experimenting
  • Permission to stop and restart the server and inspect its log

The official Valheim dedicated-server manual lists 16 launch arguments, but it does not publish a default for every example. Use the installed manual to identify the native options, keep each value attached to the right script or panel, and change one thing at a time. This reference groups the documented flags by job and separates stated defaults from sample text; it is not a claim that every parser behavior has been independently tested.

Valheim dedicated server options start with the installed manual#

Start with the guide shipped with the Steam Dedicated Server files. Iron Gate’s dedicated-server guide says a copy is included with the download, identifies the Windows start_headless_server.bat and Linux start_server.sh scripts, and recommends editing a copy because Steam updates reset the original. The web guide is dated April 11, 2024; your installed copy is the practical reference for the server files you are about to launch.

Write down the server package or build identifier shown by your installation, the date you checked it, and the manual bundled beside it. Do not turn an app build ID into a game version unless a source explicitly maps the two. The public manual does not identify its semantic game version, so this page describes its listed arguments rather than promising compatibility with every release or distribution.

Argument What it controls Manual-stated default or values
-name Name shown in the server list Not stated; “My server” is an example
-port Port used by the server; Steam uses this port and the next one 2456 (default range 2456–2457)
-world World to create or load by name Not stated; “Dedicated” is an example
-password Password required to join Not stated; “Secret” is an example, not a recommended password
-savedir Overrides the world and permission-file directory OS-specific fallback paths are listed; no single path applies everywhere
-public Controls browser visibility; 0 makes it invisible and joinable through Join IP 1
-logFile Path for the server log Not stated; the path is an example
-saveinterval Time between world saves, in seconds 1800 seconds
-backups Number of automatic backups kept 4: one short and three long
-backupshort Interval between short backups, in seconds 7200 seconds
-backuplong Interval between subsequent long backups, in seconds 43200 seconds
-crossplay Selects PlayFab relay; without it the manual says Steam backend is used Not stated as a value; the flag is optional
-instanceid Unique PlayFab ID for servers sharing a port from the same MAC address Not stated; manual documents a unique value per server for that case
-preset Selects a world-modifier preset; a preset overwrites earlier modifiers Normal, Casual, Easy, Hard, Hardcore, Immersive, Hammer; no default stated
-modifier Sets a chosen modifier and value; if paired with a preset, place it after Combat, DeathPenalty, Resources, Raids and Portals, with values listed below
-setkey Sets a world-modifier checkbox key nobuildcost, playerevents, passivemobs, nomap; no default stated

For -modifier, the manual lists these value pairs: Combat (veryeasy, easy, hard, veryhard); DeathPenalty (casual, veryeasy, easy, hard, hardcore); Resources (muchless, less, more, muchmore, most); Raids (none, muchless, less, more, muchmore); and Portals (casual, hard, veryhard). This is the official manual’s list of 16 arguments, not a claim that the executable has no other parser options. “Not stated” is useful information: sample text is not automatically a published default. For the full install sequence, follow the Windows dedicated-server setup walkthrough; this page focuses on interpreting a launch line.

If you are still deciding where the server should run, compare the dedicated-server routes for a Valheim crew first. The route determines whether you are editing a Windows batch file, Linux shell script, container wrapper or generated panel field; the native Valheim arguments remain a separate layer.

Set server identity and access deliberately#

Use -name for the name shown in the server list, -password for the join password, and -public to choose listing visibility. The manual’s example -name "My server" does not mean every server is named that, and -password "Secret" is not a safe password to reuse. Keep the real password out of screenshots, public issue reports, shared logs and the article itself.

-public 1 is the documented default and makes the server visible in the browser. Setting it to 0 makes it invisible and joinable through Join IP; Iron Gate describes that as an option for a local LAN server. Visibility is not an access-control list. Preserve the actual password and permitted-player policy used by your crew.

-crossplay changes the backend. With the flag, Iron Gate says the server uses PlayFab relay and does not require router port forwarding for external access. Without it, the Steam backend is used and only Steam users can see and join. That choice has networking consequences, so read the separate guide to Steam ports and the crossplay relay before editing firewall or router rules. Crossplay does not make a local or loopback address a supported relay join route.

The exact syntax for multiword values depends on how your script passes arguments. The official guide shows quoted examples, but does not define a complete escaping grammar for every Windows command shell, Linux shell or hosting panel. Keep the syntax already used by the platform’s shipped script and verify the effective command after editing. Do not paste a generic quoting recipe into a panel and assume its parser behaves the same way.

Choose the port, world name and save directory#

The manual documents -port as the server port and says Valheim uses the selected port plus the next one. The default pair is 2456–2457. For Steam, that pair must be reachable through the network setup. With -crossplay, the relay means router forwarding is not required for outside access; the configured port still distinguishes servers sharing a public IP. The port guide covers how to check the chosen backend and route.

-world names the world the server creates or loads. It is not a seed option, and changing its text can select a different world name rather than alter the terrain seed of the existing world. Stop before experimenting if you cannot identify the world files the current script will load. Keep a copy of the effective startup line and verify the resulting world name from the server’s own output before moving a campaign.

-savedir overrides the default location for world and permission files. Iron Gate lists different fallback paths for Windows and Linux, so there is no single path that applies to every host. A relative path also depends on the process’s working directory. Confirm the directory exists, that the service account can write there, and that it is the directory your backup process actually protects. If you need operating-system-specific installation steps, use the setup walkthrough rather than copying a path from another platform.

Do not confuse the world name, save location and game seed. The dedicated-server manual documents the first two; it does not document a seed launch argument. If a control is supplied by a container, service wrapper or hosting panel, label it as belonging to that layer rather than as a native Valheim option.

Send logs somewhere useful#

-logFile sets where the server writes its log file. The manual’s example path is a sample location, not a universal Windows or Linux destination. Pick a path the server process can create or overwrite and that you can inspect after a restart. If you are running the server as a service, check permissions as that service account; a path that works in your interactive terminal can still fail when the service launches.

Use logs to answer a narrow question: did the intended process launch with the configuration you changed? First record where the current log is written. After a restart, inspect the new timestamp and the relevant startup lines. If nothing changed, check whether you edited the effective script, service command or generated panel field. Seeing an old log is not evidence that a new argument was accepted.

Treat the panel or Docker wrapper as a separate configuration layer. An image might expose environment variables for server arguments, data volumes or automatic updates, but those names are defined by that image. The Valheim manual does not list them as native launch flags. Keep a note of which setting belongs to the server binary and which belongs to its wrapper so an image update does not silently change your assumptions.

Read save and backup defaults before changing them#

The manual states these persistence defaults. It gives the interval arguments in seconds, so keep the units beside the number when comparing settings.

Argument Meaning in the manual Stated default
-saveinterval Time between world saves 1800 seconds (30 minutes)
-backups Number of automatic backups retained 4 total: one short and three long
-backupshort Interval for the short backup 7200 seconds (2 hours)
-backuplong Interval for each subsequent long backup 43200 seconds (12 hours)

These are documented settings, not a restoration test or a guarantee that your separate storage process keeps a copy. Before tuning them, identify the current world directory, who can write to it, how much space is available and which independent copy you could restore. A backup is useful only if the files you care about are included and the recovery route has been checked. The planned article on save and backup tuning is not published yet, so this reference stays with the manual’s definitions and defaults rather than giving a custom retention recipe.

Do not infer that four backups means four long-term restore points. The manual explains the first as the short backup and the remaining three as long backups; it separately states the intervals. If the server is managed by a panel, check its own backup behavior and avoid assuming these native arguments control that panel’s snapshots.

Keep modifiers and special cases in their own lane#

The manual lists -preset, -modifier and -setkey. These change world rules, so treat them as a group rather than mixing them into a basic server identity edit. Iron Gate says a preset overwrites modifiers that came before it. The dedicated-server modifiers guide explains modifier argument precedence and syntax; its examples and exact supported values should be checked against your installed manual too.

The manual also documents -instanceid for a specific situation: multiple servers using the same port from the same MAC address should each use a unique value to obtain unique PlayFab IDs. That is the manual’s stated purpose. This article did not independently launch multiple servers to test the behavior, and the guide does not declare a default value. Use the option only when your setup matches that condition and your installed guide still documents it.

Another common mix-up is treating a container variable as one of these flags. For example, a wrapper’s DOCKER_DATA_VOLUME belongs to that wrapper’s storage setup; the Valheim server manual does not list it. Find the image’s own documentation before changing wrapper variables, and do not move them into the server argument field unless the image author says to do so.

Verify one launch argument without risking a world#

Use a protected test world if the edit could change its identity, path, access or gameplay rules. This is a conservative review routine, not a test result from our environment:

  1. Record the server build identifier and the bundled manual you checked.
  2. Find the startup script, service command or panel field that actually launches the process; save a copy of its current value.
  3. Change one documented argument. Do not add a second change to “clean up” the line at the same time.
  4. Restart using the same control that normally launches the server. Inspect the fresh log and confirm it corresponds to the new process.
  5. Check the specific outcome that argument is documented to affect. A startup log can confirm the process started; it cannot prove a friend can join, a world restored correctly or a workload performs well.
  6. If the expected outcome is absent, restore the saved line and investigate the layer that owns the setting before trying another flag.

Keep the difference between “the manual documents this” and “I tested this on my build” in your notes. Do not claim a working remote connection without a real join from the relevant client and network, or a successful recovery without actually restoring a separate copy. The official manual is a useful reference, but the values you observe belong to the process you run.

If the argument list is clear but you would rather hand off the host operating system and server process, compare the supported configuration options on Game Hosting’s Valheim page. The integrated game panel provides settings and restarts alongside three free backup slots; check the controls that matter to your crew rather than assuming every native launch flag is exposed. Running the official server yourself remains a flexible route when you are comfortable maintaining its machine, startup script and world files.

Quick answers

Are Docker environment variables Valheim server launch flags?

No. Variables such as a container image’s data-volume or argument settings belong to that wrapper; the official manual lists arguments consumed by the Valheim server.

Does changing -world change the seed of an existing world?

No. The manual uses -world to create or load a world by name. It does not document this argument as a seed control.

Can I copy every option from an older Valheim server guide?

Compare each spelling and behavior with the guide bundled beside your installed server files. Older examples may mix wrapper variables, assumptions and native arguments.