Skip to content
/SLASHPLAY

Valheim console commands

All 19 settings and 4 commands from the game's own list, with defaults and examples to copy.

23 commands

  1. -world

    Sets which world the server loads. A new world with that name is created if it does not exist.

    Default Not listed

    Launch options

  2. -public

    Sets whether the server is listed in the public server browser: 1 to show it, 0 to hide it.

    Default 1 (Visible in the server list)

    Launch options

  3. -crossplay

    Runs the server on the crossplay backend (PlayFab) so players on any platform can join, with no port forwarding needed.

    Default Not listed

    Launch options

  4. -preset

    Sets the world modifier preset, such as casual, hard or hardcore, overwriting earlier modifiers.

    Default Not listed

    World modifiers

  5. -modifier

    Sets one world modifier, like combat, raids or portals, to a chosen value.

    Default Not listed

    World modifiers

  6. kick

    Removes a player from the server right away. They can rejoin unless you ban them.

    Command

    Admin commands

  7. ban

    Blocks a player from the server so they cannot rejoin, saved in bannedlist.txt.

    Command

    Admin commands

  8. -backuplong

    Sets the interval between the later automatic backups, in seconds. The default is 43200 (12 hours).

    Default 43200

    Launch options

  9. -backups

    Sets how many automatic world backups the server keeps. The default is 4.

    Default 4

    Launch options

  10. -backupshort

    Sets the interval for the first automatic backup, in seconds. The default is 7200 (2 hours).

    Default 7200

    Launch options

  11. -instanceid

    Sets a unique ID for each server when you host several crossplay servers with the same port from one machine.

    Default Not listed

    Launch options

  12. -logFile

    Sets the file path where the server writes its log.

    Default Not listed

    Launch options

  13. -name

    Sets the server name shown in the in-game server list.

    Default Not listed

    Launch options

  14. -password

    Sets the password players must enter to join the server.

    Default Not listed

    Launch options

  15. -port

    Sets the port the server uses. Valheim uses this port and the next one, so 2456 means 2456 and 2457.

    Default 2456

    Launch options

  16. -savedir

    Sets the folder where worlds and the admin, ban and permitted lists are saved, replacing the default path.

    Default Not listed

    Launch options

  17. -saveinterval

    Sets how often the world is saved, in seconds. The default is 1800 (30 minutes).

    Default 1800

    Launch options

  18. -setkey

    Turns on a world modifier checkbox: nobuildcost, playerevents, passivemobs or nomap.

    Default Not listed

    World modifiers

  19. banned

    Lists all players currently banned from the server.

    Command

    Admin commands

  20. unban

    Removes a player's ban so they can join again.

    Command

    Admin commands

  21. adminlist.txt

    Lists the players with admin rights on the server, one Platform User ID per line.

    Default Not listed

    Access lists

  22. bannedlist.txt

    Lists the players banned from the server, one Platform User ID per line.

    Default Not listed

    Access lists

  23. permittedlist.txt

    Sets a whitelist: once any ID is in it, only the listed players can join the server.

    Default Not listed

    Access lists

Questions

How do I run Valheim commands on my server?

Launch options go on the server's start line. Admin commands are typed in the in-game console (F5) by a player on the admin list.

Where does this list come from?

It is the game's own list: the Valheim Dedicated Server Manual that ships with the server. The descriptions and examples on the written pages are by SLASHPLAY.

Try them on
your own server.

From $0.03 an hour, only while it runs. New accounts get 6 free tokens.