Devcommands (previously known as cheat commands) in Valheim allow server administrators to manipulate the game environment, spawn items, and manage players directly through the in-game console. This guide will show you how to install Devcommands, enable them, and use them on your Valheim server hosted with BananaServers.
Step 1: Install Devcommands on Your Server
BepInEx is pre-installed on all BananaServers Valheim servers, so no additional installation is required for server-side functionality. Simply follow the steps below to enable Devcommands.
Step 2: Install Devcommands on Your Client
-
Download BepInExPack for Valheim from a trusted modding site like NexusMods or Thunderstore.
-
Extract the downloaded files to your Valheim installation folder:
-
Typically located at
C:\Program Files (x86)\Steam\steamapps\common\Valheim.
-
-
If required, place the Devcommands plugin
.dllfile in the/BepInEx/pluginsfolder. -
Launch the game to ensure the mod loads correctly.
Step 3: Enable Console Commands
To use Devcommands, the in-game console must be enabled:
-
Launch Valheim on your computer.
-
In your Steam Library, right-click Valheim and select Properties.
-
In the General tab, find the Launch Options section.
-
Enter the following in the text box:
-console
-
Close the properties window and launch Valheim.
Step 4: Join Your Server as an Admin
To access Devcommands, you must be an admin on your server. Follow the steps in this guide for detailed instructions on adding yourself as an admin.
Step 5: Using Devcommands In-Game
-
After joining your server, press F5 to open the console.
-
Type the following command to enable cheat commands:
devcommands
-
Press Enter to activate it.
Step 6: Useful Devcommands for Valheim
Here are some common and helpful Devcommands for server admins:
| Command | Description |
|---|---|
god |
Enables God Mode (invincibility). |
fly |
Enables flying mode. |
nocost |
Removes crafting costs. |
spawn [item] [qty] |
Spawns specified item in desired quantity. |
freefly |
Enables a no-clip camera mode. |
hammer |
Enables Hammer Mode (for rapid building). |
nocost |
Removes material requirements when using Hammer Mode. |
difficulty [value] |
Changes difficulty level (0 = easy, 1 = normal, 2 = hard). |
kick [playername] |
Kicks a player from the server. |
ban [playername] |
Bans a player from the server. |
unban [playername] |
Unbans a previously banned player. |
resetspawn |
Resets the world spawn point. |
For a complete list of world modifiers and difficulty settings, refer to this guide.
Example Commands
To spawn 100 pieces of Iron, use:
spawn Iron 100
To enable Hammer Mode for quick building:
hammer
To enable Hammer Mode with no resource cost:
nocost
To set the difficulty to hard mode:
difficulty 2
Step 7: Disabling Devcommands
For security and fair gameplay, it's a good idea to disable Devcommands once finished. Simply type:
devcommands
This will toggle the command system off.
Troubleshooting
"Command Not Found" Error
-
Ensure you have typed
devcommandsfirst to enable cheat mode. -
Confirm that your Steam ID is added to the
adminlist.txtfile and that you restarted the server.
Console Doesn't Open
-
Verify that
-consoleis set in your Steam launch options.
Final Thoughts
Using Devcommands responsibly can enhance your Valheim server management and provide powerful tools for troubleshooting, testing, and moderation. For the best Valheim hosting experience, consider BananaServers for reliable performance and excellent support.
