Skip to content
Valheim
Free, no sign-up, in your browser

Valheim Console Commands: List & Cheats

Valheim console commands and cheat codes at your fingertips: search the command list for spawn, god, fly, kick, or “teleport” and copy an example into the console. For each Valheim command, see whether you need devcommands and whether it works in single-player, as host, or as a server admin. Includes a command generator, admin setup, and launch parameters. Free, no sign-up, right in your browser.

Built by Dimitri Heissler

Found the commands? Use them on your own server.

Searches command names, explanations, syntax, and notes. All search words must match.

Frequently searched:

97 of 97 commands

As of Valheim 1.0.16

kick

Admin on server

Kicks a player from the current game. This is not a permanent ban; use ban for that.

Syntax
kick <name|ip|userID>
Example
kick Thorfinn

Kicks the player “Thorfinn” from the server.

Good to know: On a server, you can only do this if your platform ID is in adminlist.txt.
See also:

ban

Admin on server

Bans a player. They are kicked and cannot rejoin the server until you unban them with unban.

Syntax
ban <name|ip|userID>
Example
ban Thorfinn

Bans the player “Thorfinn”.

Good to know: The ban is saved in bannedlist.txt in the server’s storage folder.
See also:

unban

Admin on server

Unbans a player. You need their ID or IP from the ban list.

Syntax
unban <ip|userID>
Example
unban Steam_76561197986247731

Releases the Steam ID for reuse.

See also:

banned

Admin on server

Shows all banned players.

Syntax
banned
Example
banned
See also:

save

Admin on server

Saves the world immediately and resets the autosave timer.

Syntax
save
Example
save

Useful before a restart or risky commands.

See also:

optterrain

Admin on server

Optimizes old terrain changes in the world. Create a Backup first.

Syntax
optterrain
Example
optterrain
See also:

players

Admin on serverrequires devcommands

Forces the difficulty to match the specified number of players. Set it to 0 to use the actual player count again.

Syntax
players <number>
Example
players 4

Scales enemies as if there were four players.

genloc

Admin on server

Regenerates all locations in the world, including dungeons, ruins, and altars.

Syntax
genloc
Example
genloc
Good to know: Use only with a fresh Backup of the world, and not on a world where players are currently building.

ping

Everywhere

Measures the server's response time.

Syntax
ping
Example
ping

info

Everywhere

Outputs system information and the game's memory usage in the console.

Syntax
info
Example
info

god

Singleplayer / Hostrequires devcommands

Toggles invincibility mode. You no longer take damage. Use on or off to set it explicitly.

Syntax
god [on|off]
Example
god
See also:

ghost

Singleplayer / Hostrequires devcommands

Toggles ghost mode. Enemies will no longer notice you. Use on or off to set it explicitly.

Syntax
ghost [on|off]
Example
ghost
See also:

fly

Same command: debugmode

Singleplayer / Hostrequires devcommands

Toggles flight mode. You can fly freely through the world.

Syntax
fly
Example
fly
See also:

nocost

Singleplayer / Hostrequires devcommands

Toggles building without material costs. Use on or off to set it explicitly.

Syntax
nocost [on|off]
Example
nocost
See also:

heal

Singleplayer / Hostrequires devcommands

Instantly restores health, stamina, and Eitr.

Syntax
heal
Example
heal
See also:

puke

Singleplayer / Hostrequires devcommands

Empties your stomach; you lose all food you've eaten.

Syntax
puke
Example
puke

raiseskill

Singleplayer / Hostrequires devcommands

Increases a skill by the specified number of levels.

Syntax
raiseskill <skill> [amount]
Example
raiseskill Run 10

Increases Running by 10 levels.

Good to know: Valid names: Swords, Knives, Clubs, Polearms, Spears, Blocking, Axes, Bows, ElementalMagic, BloodMagic, Unarmed, Pickaxes, WoodCutting, Crossbows, Jump, Sneak, Run, Swim, Fishing, Cooking, Farming, Crafting, Dodge, Ride.
See also:

resetskill

Singleplayer / Hostrequires devcommands

Resets a skill to level 0.

Syntax
resetskill <skill>
Example
resetskill Swords
See also:

resetcharacter

Singleplayer / Hostrequires devcommands

Resets your character data, including your character’s skills and progress.

Syntax
resetcharacter
Example
resetcharacter
Good to know: This cannot be undone. Back up your character first.

addstatus

Singleplayer / Hostrequires devcommands

Gives you a status effect, such as Rested, Burning, SoftDeath, or Wet.

Syntax
addstatus <name>
Example
addstatus Rested
See also:

clearstatus

Singleplayer / Hostrequires devcommands

Removes all status effects from you.

Syntax
clearstatus
Example
clearstatus
See also:

setpower

Singleplayer / Hostrequires devcommands

Sets your active Guardian Power and clears its cooldown, for example GP_Eikthyr or GP_TheElder.

Syntax
setpower <name>
Example
setpower GP_Eikthyr

adrenaline

Singleplayer / Hostrequires devcommands

Sets your adrenaline level.

Syntax
adrenaline <amount>
Example
adrenaline 10

stats

Singleplayer / Host

Shows your character's stats.

Syntax
stats
Example
stats

nomap

Everywhere

Disables the map for this character. If you're the host, this applies to everyone who joins from now on.

Syntax
nomap
Example
nomap

die

Everywhere

Kills your character. Useful if you're stuck.

Syntax
die
Example
die
See also:

resetspawn

Everywhere

Resets your respawn point.

Syntax
resetspawn
Example
resetspawn
See also:

respawntime

Singleplayer / Hostrequires devcommands

Sets the time until respawn.

Syntax
respawntime <seconds>
Example
respawntime 3

resetknownitems

Everywhere

Forgets all items and recipes known to your character.

Syntax
resetknownitems
Example
resetknownitems

tutorialreset

Everywhere

Resets all previously seen tutorial hints.

Syntax
tutorialreset
Example
tutorialreset

spawn

Singleplayer / Hostrequires devcommands

Generates items, creatures, or building pieces in front of you. The name must match the prefab name. The following number is the quantity; the next is the level. Use p, e, or i to pick up the item immediately, equip it, or spawn it only if you don't already have it.

Syntax
spawn <prefab> [amount] [level] [radius] [p|e|i]
Example
spawn Wood 50

Generates 50 wood.

Good to know: A * at the end of a name spawns anything containing that term. For creatures, level 1 has no star and level 3 has two stars. Items and building pieces spawned with cheats usually don't unlock achievements.
See also:

itemset

Singleplayer / Hostrequires devcommands

Generates a preset item set. Use keep to avoid dropping your current items. The name appears in tab completion.

Syntax
itemset <name> [level] [keep]
See also:

repairall

Singleplayer / Hostrequires devcommands

Repairs all your equipment.

Syntax
repairall
Example
repairall

inventorysize

Singleplayer / Hostrequires devcommands

Sets the size of your inventory.

Syntax
inventorysize <size>
See also:

inventoryclean

Everywhere

Drops all items in invalid inventory slots.

Syntax
inventoryclean
Example
inventoryclean
See also:

setfuel

Singleplayer / Hostrequires devcommands

Sets the fuel of all lights and fires to the specified value. The default is 10.

Syntax
setfuel [amount]
Example
setfuel 10

forcedelete

Singleplayer / Hostrequires devcommands

Deletes all objects within a radius, optionally only those with a matching name. Default is 5, maximum is 150.

Syntax
forcedelete [radius] [name]
Example
forcedelete 10 Boar

Removes all wild boars within a radius of 10.

Good to know: This can remove entire structures. Back up the world first.

pos

Everywhere

Shows your current position.

Syntax
pos
Example
pos
See also:

goto

Singleplayer / Hostrequires devcommands

Teleports you to the x and z coordinates. The game sets the height automatically.

Syntax
goto <x> <z>
Example
goto 1000 -2500

Teleports you to x 1000, z -2500.

See also:

recall

Singleplayer / Hostrequires devcommands

Brings all players to you, optionally only those with a matching name.

Syntax
recall [name]
Example
recall
See also:

find

Singleplayer / Hostrequires devcommands

Searches loaded objects and places by name and highlights them with a ping on the map. With a pingmax above 1, it places pins instead.

Syntax
find <text> [pingmax]
Example
find Troll
See also:

findtp

Singleplayer / Hostrequires devcommands

Like find, but teleports you to the nearest match outside melee range. Use index to jump to another match.

Syntax
findtp <text> [index] [closerange]
See also:

findbiome

Singleplayer / Hostrequires devcommands

Marks the center of every biome of this type on the map.

Syntax
findbiome <name>
Example
findbiome Plains
See also:

findbiometp

Singleplayer / Hostrequires devcommands

Teleports you to the nearest biome matching your input.

Syntax
findbiometp <name>
Example
findbiometp Mountain
See also:

biomeinfo

Singleplayer / Hostrequires devcommands

Shows information about the biome sector at your position.

Syntax
biomeinfo
Example
biomeinfo

height

Everywhere

Shows the world generation height at your position.

Syntax
height
Example
height

exploremap

Singleplayer / Hostrequires devcommands

Reveals the entire map.

Syntax
exploremap
Example
exploremap
See also:

resetmap

Singleplayer / Hostrequires devcommands

Resets the explored portion of the map.

Syntax
resetmap
Example
resetmap
See also:

resetsharedmap

Everywhere

Removes shared map data from the cartography table.

Syntax
resetsharedmap
Example
resetsharedmap
See also:

location

Singleplayer / Hostrequires devcommands

Generates a location, such as a dungeon, at your position.

Syntax
location <name> [SAVE]
Good to know: Without the additional SAVE option, world saving is disabled until you restart.
See also:

tod

Singleplayer / Hostrequires devcommands

Sets the time of day to a value between 0 and 1, as a fraction of the day. Use -1 to restore normal time.

Syntax
tod <0-1>
Example
tod 0.5
See also:

skiptime

Admin on serverrequires devcommands

Advances game time by the specified number of seconds.

Syntax
skiptime <seconds>
Example
skiptime 600
See also:

sleep

Admin on serverrequires devcommands

Skips the night and sets the time to the next morning.

Syntax
sleep
Example
sleep
See also:

time

Everywhere

Shows the current playtime.

Syntax
time
Example
time
See also:

timescale

Singleplayer / Hostrequires devcommands

Changes the game speed. 1 is normal. With fadetime (up to 3), the transition is smooth.

Syntax
timescale <target> [fadetime]
Example
timescale 2
See also:

env

Singleplayer / Hostrequires devcommands

Forces a weather condition, such as Clear, Rain, LightRain, ThunderStorm, Snow, SnowStorm, or Misty.

Syntax
env <name>
Example
env Clear
See also:

resetenv

Singleplayer / Hostrequires devcommands

Removes forced weather.

Syntax
resetenv
Example
resetenv
See also:

wind

Singleplayer / Hostrequires devcommands

Sets wind direction (angle) and wind strength.

Syntax
wind <angle> <intensity>
Example
wind 90 1
See also:

resetwind

Singleplayer / Hostrequires devcommands

Removes the forced wind.

Syntax
resetwind
Example
resetwind
See also:

snow

Singleplayer / Hostrequires devcommands

Adds snow to or removes it from all nearby building pieces.

Syntax
snow <amount>

nospawn

Singleplayer / Hostrequires devcommands

Toggles natural monster spawning. Use on or off to set it explicitly.

Syntax
nospawn [on|off]
Example
nospawn

killall

Singleplayer / Hostrequires devcommands

Kills all nearby creatures.

Syntax
killall
Example
killall
See also:

killenemies

Same command: killenemycreatures

Singleplayer / Hostrequires devcommands

Kills only nearby hostile creatures.

Syntax
killenemies
Example
killenemies
See also:

killtame

Singleplayer / Hostrequires devcommands

Kills all nearby tamed creatures.

Syntax
killtame
Example
killtame
See also:

tame

Singleplayer / Hostrequires devcommands

Instantly tames all nearby tamable creatures.

Syntax
tame
Example
tame
See also:

aggravate

Singleplayer / Hostrequires devcommands

Makes all nearby neutral creatures aggressive.

Syntax
aggravate
Example
aggravate

stopfire

Singleplayer / Hostrequires devcommands

Extinguishes all spreading fires and clears the smoke.

Syntax
stopfire
Example
stopfire

event

Singleplayer / Hostrequires devcommands

Starts an event at your position, such as an attack. Known names: army_eikthyr, army_theelder, army_bonemass, army_moder, army_goblin, foresttrolls, blobs, skeletons, surtlings, wolves.

Syntax
event <name>
Example
event army_eikthyr

Starts Eikthyr’s animal attack.

See also:

randomevent

Singleplayer / Hostrequires devcommands

Starts a random event.

Syntax
randomevent
Example
randomevent
See also:

stopevent

Singleplayer / Hostrequires devcommands

Ends the current event.

Syntax
stopevent
Example
stopevent
See also:

setkey

Admin on server

Sets a global world key. Use it to enable world rules such as nomap, nobuildcost, playerevents or passivemobs, or to mark bosses as defeated, for example with defeated_eikthyr.

Syntax
setkey <key>
Example
setkey nomap

Disables the map for the entire world.

Good to know: Keys that also appear in the world modifiers menu do not count as cheats. The game only sets other keys, such as defeated_eikthyr, if you have enabled cheats, and achievements may be disabled for the world.
See also:

removekey

Admin on server

Removes a global world key.

Syntax
removekey <key>
Example
removekey nomap

Re-enables the map for the world.

See also:

listkeys

Admin on serverrequires devcommands

Lists all set global world keys and your character's keys.

Syntax
listkeys
Example
listkeys
See also:

resetkeys

Admin on serverrequires devcommands

Deletes all global world keys and your character's personal keys.

Syntax
resetkeys
Example
resetkeys
Good to know: Defeated bosses are among the global keys. Back up the world first.
See also:

setkeyplayer

Singleplayer / Hostrequires devcommands

Sets a key for your character only.

Syntax
setkeyplayer <key>
See also:

removekeyplayer

Singleplayer / Hostrequires devcommands

Removes a key from your character.

Syntax
removekeyplayer <key>
See also:

setworldpreset

Admin on server

Sets all world modifiers to a preset: Normal, Casual, Easy, Hard, Hardcore, Immersive or Hammer.

Syntax
setworldpreset <name>
Example
setworldpreset hard
See also:

setworldmodifier

Admin on server

Sets one world modifier: combat, deathpenalty, resources, raids, or portals, each with an appropriate value.

Syntax
setworldmodifier <name> <value>
Example
setworldmodifier raids none

Disables raids.

See also:

resetworldkeys

Admin on server

Resets all world modifiers to their defaults.

Syntax
resetworldkeys
Example
resetworldkeys
See also:

help

Everywhere

Shows the list of commands. For example, help 2 4 shows the second quarter.

Syntax
help [part] [parts]
Example
help

devcommands

Admin on server

Enables cheat commands; entering it again disables them. Without this step, cheat commands report that cheats have not been enabled.

Syntax
devcommands
Example
devcommands
Good to know: On a server, the command is sent to the server. It only affects players in adminlist.txt.
See also:

clear

Everywhere

Clears the console window.

Syntax
clear
Example
clear

bind

Everywhere

Binds a command to a key. This may conflict with game controls.

Syntax
bind <keycode> <command>
Example
bind F6 god

F6 now toggles invulnerability mode.

See also:

unbind

Everywhere

Removes all commands bound to a key.

Syntax
unbind <keycode>
Example
unbind F6
See also:

printbinds

Everywhere

Shows all keys placed.

Syntax
printbinds
Example
printbinds
See also:

resetbinds

Everywhere

Resets all custom keys to the default developer commands.

Syntax
resetbinds
Example
resetbinds
See also:

fov

Everywhere

Changes the camera’s field of view.

Syntax
fov <value>
Example
fov 90

maxfps

Everywhere

Sets a frame rate limit.

Syntax
maxfps <fps>
Example
maxfps 120

lodbias

Everywhere

Sets the distance at which object graphics become less detailed.

Syntax
lodbias <value>

freefly

Everywhere

Toggles free photo mode.

Syntax
freefly
Example
freefly
See also:

ffsmooth

Everywhere

Sets camera movement smoothing in photo mode.

Syntax
ffsmooth <value>
See also:

dpsdebug

Singleplayer / Hostrequires devcommands

Toggles the display of damage dealt.

Syntax
dpsdebug
Example
dpsdebug

printcreatures

Singleplayer / Hostrequires devcommands

Shows how many creatures are active at each level.

Syntax
printcreatures
Example
printcreatures
See also:

printnetobj

Singleplayer / Hostrequires devcommands

Counts nearby network objects by name; the default radius is 5. Helps identify lag caused by too many objects.

Syntax
printnetobj [radius]
Example
printnetobj 50
See also:

printlocations

Singleplayer / Hostrequires devcommands

Shows how many locations are currently loaded.

Syntax
printlocations
Example
printlocations
See also:

exclusivefullscreen

Everywhere

Switches between exclusive fullscreen and borderless windowed mode.

Syntax
exclusivefullscreen
Example
exclusivefullscreen

say

Same command: s, w

Everywhere

Sends a chat message from the console. s shouts, while w <spieler> <text> whispers to a specific player.

Syntax
say <text>
Example
say Server startet in 5 Minuten neu

Expected result

What the Valheim command list shows you

Search for a command or keyword to get the syntax, an explanation, usually an example you can copy, and whether you need devcommands and where the command works. Three examples:

Example 1: Look up a command

Input:

spawn

Output: a card with these details

Command
spawn
Syntax
spawn <prefab> [amount] [level] [radius] [p|e|i]
What it does
Generates items, creatures, or building pieces in front of you. The name must match the prefab name. The following number is the quantity; the next is the level. Use p, e, or i to pick up the item immediately, equip it, or spawn it only if you don't already have it.
Example to copy
spawn Wood 50 (Generates 50 wood.)
Requirement
devcommands must be enabled; Singleplayer / Host

In words: spawn creates items, creatures, or building pieces in front of you. You must enable devcommands first, and the command only works in single-player or in a world you host yourself. spawn Wood 50 places 50 wood in front of you.

Example 2: Filter by category

Input: select category “Server & Admin”

Output: all admin commands

Commands in the Server and Admin category
CommandWhere?Devcommands required?
kickAdmin on serverno
banAdmin on serverno
unbanAdmin on serverno
bannedAdmin on serverno
saveAdmin on serverno
optterrainAdmin on serverno
playersAdmin on serverYes
genlocAdmin on serverno
pingEverywhereno
infoEverywhereno

In words: The category contains 10 commands. kick, ban, unban, banned, and save are everyday server admin commands and do not require cheats.

Example 3: Generate a command

Input in the command generator:

Prefab name
Troll
Quantity
empty
Level
3

Output:

spawn Troll 1 3

In words: The generator sets the quantity to 1 because Valheim reads the quantity before the level. The troll appears at level 3, with two stars. You can copy the completed command to the console with one click.

How it works

How to use the Valheim command list

Four steps from search term to console command—no account, no download.

Step 1

Enter a command or keyword

Type a command like spawn or god, or a word like weather, teleport, or admin, in the search field. Results appear instantly as you type.

Step 2

Filter by category and use case

Narrow the list to a category such as Server & Admin, or to commands that also run on a server. That way, you can quickly see what works for your situation.

Step 3

Copy example

Most commands include an example with a copy button. If you need custom values, use the command generator to build spawn, event, or goto commands.

Step 4

Run in console

In your world, open the console with F5. For cheat commands, enter devcommands first, then paste the command with Ctrl+V. Press Enter to run it.

Cheat sheet

Key Valheim commands at a glance

The 14 commands and cheat codes you’ll need most often. Find more in the command list above.

devcommands

Enables cheat commands; entering it again disables them. Without this step, cheat commands report that cheats have not been enabled.

devcommands

god

Toggles invincibility mode. You no longer take damage. Use on or off to set it explicitly.

god

ghost

Toggles ghost mode. Enemies will no longer notice you. Use on or off to set it explicitly.

ghost

fly

Toggles flight mode. You can fly freely through the world.

fly

nocost

Toggles building without material costs. Use on or off to set it explicitly.

nocost

spawn

Generates items, creatures, or building pieces in front of you. The name must match the prefab name. The following number is the quantity; the next is the level. Use p, e, or i to pick up the item immediately, equip it, or spawn it only if you don't already have it.

spawn Wood 50

goto

Teleports you to the x and z coordinates. The game sets the height automatically.

goto 1000 -2500

heal

Instantly restores health, stamina, and Eitr.

heal

sleep

Skips the night and sets the time to the next morning.

sleep

event

Starts an event at your position, such as an attack. Known names: army_eikthyr, army_theelder, army_bonemass, army_moder, army_goblin, foresttrolls, blobs, skeletons, surtlings, wolves.

event army_eikthyr

env

Forces a weather condition, such as Clear, Rain, LightRain, ThunderStorm, Snow, SnowStorm, or Misty.

env Clear

kick

Kicks a player from the current game. This is not a permanent ban; use ban for that.

kick Thorfinn

ban

Bans a player. They are kicked and cannot rejoin the server until you unban them with unban.

ban Thorfinn

save

Saves the world immediately and resets the autosave timer.

save

Server & Admin (10)

Manage players, save progress, and maintain the world: kick, ban, save, and more. These are the commands for server admins.

Players (20)

Everything about your character: invulnerability, flying, skills, status effects, and respawning.

Spawning & Items (7)

Spawn items, creatures, and building pieces, repair equipment, and remove objects again.

World (30)

Time, weather, map, teleportation, and nearby creatures.

Events & World Rules (12)

Start and end raids, set global keys such as defeated bosses, and adjust world modifiers.

Console & Debug (18)

Help, enable cheats, assign keys, and display and performance settings.

Singleplayer or server

Which commands work where?

Not every command works everywhere. The game distinguishes between playing alone, hosting the world yourself, and playing on a dedicated server. This classification comes from the game code.

Everywhere

Works in any world, even as a player on someone else’s server. The command affects only you.

25 commands, for example:

ping, info, nomap, die, resetspawn, resetknownitems, tutorialreset, inventoryclean, pos, height, resetsharedmap, time, help, clear

Admin on server

On a server, the command is sent to and executed by the server, but only for players in adminlist.txt. In single-player and as host, it runs directly on your machine.

18 commands, for example:

kick, ban, unban, banned, save, optterrain, players, genloc, skiptime, sleep, setkey, removekey, listkeys, resetkeys

Singleplayer / Host

Runs locally only: in single-player or when you host the world yourself. On someone else's or a dedicated server, the game reports that the command is not valid in the current context.

54 commands, for example:

god, ghost, fly, nocost, heal, puke, raiseskill, resetskill, resetcharacter, addstatus, clearstatus, setpower, adrenaline, stats

Setup

Enable the console and become an admin

How to access the console, enable cheats, and make yourself an admin on your server.

In-game console and cheats

  1. Enable “Activate console” in the game options or launch Valheim with the Steam launch option -console. The launch option overrides the setting.
  2. Load your world and press F5. The console opens over the game.
  3. Enter devcommands and confirm. This enables cheat commands; entering it again disables them.
  4. Type a command like god or spawn Wood 50 and press Enter.

Items and structures created with cheats usually don't trigger achievements. It's best to use cheats in a world you don't mind changing, or back up the world first.

Admin on your server

  1. Get your platform ID. You can find it in the server log or in-game with F2. The format is Platform_ID, for example Steam_76561197986247731 or Xbox_2535431065746529. The Admin ID formatter converts your SteamID64.
  2. Add the ID to the adminlist.txt file in the server's save folder, one ID per line.
  3. Save the file and join the server. If the change does not take effect immediately, restart the server.
  4. Open the console with F5. On a server, you can now use kick, ban, unban, banned, and save. Use devcommands for the other admin commands.

On Linux, adminlist.txt, bannedlist.txt, and permittedlist.txt are located in ~/.config/unity3d/IronGate/Valheim by default. You can change the folder with -savedir. Note: If someone is listed in permittedlist.txt, everyone else is excluded from the server.

Dedicated Server

Server startup parameters

Add these arguments to valheim_server.x86_64 in your startup script. The details come from the Valheim Dedicated Server manual, version 1.0.16.

-name

"My server"

Name displayed for the server in the server list.

-port

2456

The port on which the server accepts connections. Valheim uses this port and the next one.

Default 2456, so it uses 2456 and 2457. The included startup script recommends opening 2456 through 2458.

-world

"Dedicated"

World name. If it doesn't exist, it will be created; otherwise, the existing world will be loaded.

-password

"secret"

Password players need to join.

At least 5 characters; it must not appear in the server name.

-savedir

/home/valheim/data

Overrides the storage location for worlds and the files adminlist.txt, bannedlist.txt, and permittedlist.txt.

Default on Linux: ~/.config/unity3d/IronGate/Valheim.

-public

1

1 shows the server in the server list; 0 hides it. You can then connect using “Join by IP”.

The default is 1.

-logFile

/home/valheim/valheim.log

Sets where the log file is written.

-saveinterval

1800

Automatic save interval in seconds.

Default 1800, meaning every 30 minutes.

-backups

4

How many automatic Backups to keep. The first is a short Backup; the rest are long Backups.

Default 4: one Backup after 2 hours and three more at 12-hour intervals.

-backupshort

7200

Time until the first automatic Backup, in seconds.

Default 7200, meaning 2 hours.

-backuplong

43200

Time between subsequent automatic Backups, in seconds.

Default 43200, meaning 12 hours.

-crossplay

Starts the server on the crossplay backend (PlayFab). Players on any platform can then join.

Without this option, the server uses Steam, and only Steam players can see it.

-instanceid

"1"

A unique identifier when multiple servers use the same port on the same machine.

-preset

hard

Sets a world preset and overrides previous modifiers: Normal, Casual, Easy, Hard, Hardcore, Immersive or Hammer.

-modifier

raids none

Sets a single world modifier. If you combine it with a preset, place it after the preset.

Modifiers: Combat, DeathPenalty, Resources, Raids, Portals.

-setkey

nomap

Enables a world modifier as a toggle.

Valid: nobuildcost, playerevents, passivemobs, nomap.

A complete startup command (from the included start_server.sh):

./valheim_server.x86_64 -name "My server" -port 2456 -world "Dedicated" -password "secret" -crossplay

Discover more

More tools

FAQ

Frequently Asked Questions About Valheim Commands

Quick answers about Valheim commands, the console, and admin setup.

Enable “Activate console” in the game settings or launch Valheim with the Steam launch option -console. Then press F5 while in your world. With a controller, press both analog sticks at once to show or hide the console. The launch option overrides the setting. If F5 does nothing, the console usually isn’t enabled yet.

Open the console with F5 and enter devcommands. This enables cheat commands such as god, fly, nocost, and spawn; enter devcommands again to disable them. Without this step, the game reports that cheats are not enabled. Items and structures created with cheats normally don't trigger achievements.

The syntax is spawn Name Amount Level. spawn Wood 50 creates 50 wood, spawn Boar 4 creates four boars, and spawn Troll 1 3 creates a level 3 troll with two stars. The name is the in-game prefab name, such as Wood, Stone, Troll or Eikthyr. An * at the end spawns everything containing the term. The command generator above offers more than 50 common names to choose from.

god makes you invulnerable, so you no longer take damage. ghost prevents enemies from noticing you. fly enables flight mode; it's also called debugmode. All three require devcommands and work only in single-player or on a world you host yourself. You can use on or off to explicitly enable or disable god, ghost, and nocost.

That depends on the command. The game sends commands such as kick, ban, unban, banned, and save to the server, which executes them only for players in adminlist.txt. Commands marked “Admin on server,” such as sleep, skiptime, and setworldpreset, also run on the server. Valheim 1.0.16 runs cheat commands such as spawn, god, and fly only locally: in single-player or when you host the world yourself. As a player on someone else's server, the game reports “is not valid in the current context”.

Add your platform ID to the adminlist.txt file in the server's save folder, one ID per line. The format is Platform_ID; for Steam, for example, Steam_76561197986247731. You can find the ID in the server log or in-game with F2. Our Admin ID Formatter converts your SteamID64 to the correct format. You can then access server commands in the console as an admin.

exploremap reveals the entire map; resetmap clears your explored areas. goto 1000 -2500 teleports you to coordinates x 1000 and z -2500; pos shows your current position. findbiometp Mountain takes you to the nearest biome of that type. exploremap, resetmap, goto, and findbiometp require devcommands and work only in single-player or a world you host yourself. pos works everywhere.

env Clear forces clear weather; other options are Rain, LightRain, ThunderStorm, Snow, SnowStorm, and Misty. resetenv reverses it. sleep skips the night, tod 0.5 sets the time of day to a value between 0 and 1, and skiptime 600 advances time by 600 seconds. sleep and skiptime also work as an admin on a server; env and tod only work locally.

Any more questions?

Contact Support
Want to host your own Valheim server?

A ZAP-Hosting Valheim Game Server is ready in 60 seconds

Reliably hosted and easy to manage in the panel – including admin, ban, and whitelist management.

4.4/5 Trustpilot32,000+ Active serversSince 2010

No setup. No risk. Online in seconds.

Flexible TermCancel anytimeOnline in 60 seconds

Command list and data: Valheim 1.0.16. Looking for more tools? View all Valheim tools