Introduction
Valheim admin commands are powerful tools that allow server administrators to manage and customize their server. These commands can help you control the gameplay experience, manage players, and troubleshoot issues. In this guide, we'll cover the essential admin commands, how to enable them, and best practices for using them effectively.
Enabling Admin Commands
Step 1: Become an Admin
To use admin commands, you need to be listed as an admin on your server. Follow these steps:
-
Access the Admin List:
- Log in to your hosting panel and navigate to the Files tab.
- Locate and open the
adminlist.txtfile. This file is usually found in the root directory of your Valheim server.
-
Add Your Steam ID:
- Add your Steam ID to the
adminlist.txtfile. Each Steam ID should be on a new line.76561198012345678 - Replace
76561198012345678with your actual Steam ID. You can find your Steam ID by visiting your Steam profile and checking the URL.
- Add your Steam ID to the
-
Save and Close the File:
- Save the changes to the
adminlist.txtfile and close it.
- Save the changes to the
Step 2: Enable Dev Commands on Your Client
To use admin commands in-game, you need to enable developer (dev) commands on your client:
-
Open Valheim:
- Launch Valheim on your PC.
-
Enable Console:
- In the Valheim game properties on Steam, add
-consoleto the launch options:- Right-click Valheim in your Steam library and select Properties.
- In the General tab, enter
-consolein the Launch Options field.
- In the Valheim game properties on Steam, add
-
Open the Console:
- Press
F5while in-game to open the console.
- Press
-
Enable Dev Commands:
- Type
devcommandsin the console and pressEnterto enable developer commands. - Note: In multiplayer servers, only admins can use dev commands.
- Type
Basic Admin Commands
Here are some essential admin commands you can use to manage your Valheim server:
-
Help Command:
- Displays a list of all available commands.
help
- Displays a list of all available commands.
-
Kick a Player:
- Kicks a player from the server.
kick <PlayerName> - Replace
<PlayerName>with the actual player's name.
- Kicks a player from the server.
-
Ban a Player:
- Bans a player from the server.
ban <PlayerName> - Replace
<PlayerName>with the actual player's name.
- Bans a player from the server.
-
Unban a Player:
- Unbans a player from the server.
unban <PlayerName> - Replace
<PlayerName>with the actual player's name.
- Unbans a player from the server.
-
List Banned Players:
- Lists all banned players.
banned
- Lists all banned players.
-
Save the World:
- Saves the current world state.
save
- Saves the current world state.
Advanced Admin Commands
For more advanced server management, use the following commands:
-
Teleport:
- Teleports you to specified coordinates.
goto <X> <Y> <Z> - Replace
<X> <Y> <Z>with the desired coordinates.
- Teleports you to specified coordinates.
-
Spawn Items:
- Spawns specified items.
spawn <ItemName> <Quantity> - Replace
<ItemName>with the item name and<Quantity>with the number of items.
- Spawns specified items.
-
Set Time of Day:
- Changes the time of day.
tod <Value> - Replace
<Value>with a number between 0 and 1 (e.g., 0.5 for noon).
- Changes the time of day.
-
Change Weather:
- Changes the weather.
weather <WeatherType> - Replace
<WeatherType>with the desired weather (e.g.,Clear,Rain,ThunderStorm).
- Changes the weather.
-
God Mode:
- Enables invincibility.
god
- Enables invincibility.
-
No-Stamina Mode:
- Disables stamina usage.
nostamina
- Disables stamina usage.
-
Kill All Enemies:
- Kills all enemies in the area.
killall
- Kills all enemies in the area.
-
Free Camera Mode:
- Enables free camera mode for taking screenshots.
freefly
- Enables free camera mode for taking screenshots.
-
Set World Modifier:
- Sets a world modifier to customize the gameplay experience.
setworldmodifier <ModifierName> - Replace
<ModifierName>with the desired modifier (e.g.,hardcore,casual). Click here for list of modifiers
- Sets a world modifier to customize the gameplay experience.
Security Considerations
When using admin commands, it's essential to ensure your server remains secure:
-
Limit Admin Access:
- Only grant admin privileges to trusted individuals.
-
Monitor Admin Activity:
- Regularly review server logs to monitor admin activities.
-
Use Commands Responsibly:
- Avoid using commands that could disrupt the gameplay experience for other players.
Conclusion
Admin commands are powerful tools that can help you effectively manage and customize your Valheim server. By following this guide, you can enable and use these commands to enhance your server's functionality and ensure a smooth gaming experience for all players. If you need further assistance, feel free to contact our support team.
