# Enable Dev Commands on Your Valheim Server (/docs/valheim/enable-devcommands)



import { Step, Steps } from 'fumadocs-ui/components/steps';

Valheim **blocks dev commands on dedicated servers by default** — typing `devcommands` in the console does nothing. To unlock them you need the **Server Devcommands** mod from Thunderstore.

Why Dev Commands Are Blocked [#why-dev-commands-are-blocked]

Vanilla Valheim only allows dev commands in singleplayer to prevent abuse on public servers. The Server Devcommands mod re-enables them but limits use to admins listed in `adminlist.txt`.

Install the Server Devcommands Mod [#install-the-server-devcommands-mod]

<Steps>
  <Step>
    Switch to BepInEx mode [#switch-to-bepinex-mode]

    In the [XGamingServer Panel](https://panel.xgamingserver.com), click **Mods** in the sidebar. If your server is in **Vanilla** mode, click the **BepInEx** card to switch.

    > **Warning:** Switching modes reinstalls the server and erases all data. Back up first via **Backups** in the sidebar.

    {/* Screenshot needed: Mod Manager mode selector */}
  </Step>

  <Step>
    Search and install [#search-and-install]

    In the **Browse Mods** tab, search for **Server devcommands**. Click **Install** on the matching mod from the search results.

    {/* Screenshot needed: Search results showing Server Devcommands */}
  </Step>

  <Step>
    Restart the server [#restart-the-server]

    Go to **Console** and restart.
  </Step>

  <Step>
    Connect and enable [#connect-and-enable]

    Join the server, press **F5** to open the console, and type:

    ```
    devcommands
    ```

    You should see `devcommands = true`.
  </Step>
</Steps>

> You must be on the [admin list](/docs/valheim/admin-setup) to use dev commands, even with the mod installed. Non-admins are blocked.

Useful Dev Commands [#useful-dev-commands]

Item Spawning [#item-spawning]

```
spawn SwordIron 1
spawn ArrowFire 50
spawn Wood 100
spawn Coins 999
```

See [Spawn Items](/docs/valheim/spawn-items) for the full item ID reference.

Movement [#movement]

| Command        | Effect                                  |
| -------------- | --------------------------------------- |
| `fly`          | Toggle flight (Space = up, Ctrl = down) |
| `ghost`        | Enemies ignore you                      |
| `god`          | Toggle invincibility                    |
| `goto <x> <z>` | Teleport to world coordinates           |

World Management [#world-management]

| Command      | Effect                       |
| ------------ | ---------------------------- |
| `exploremap` | Reveal the entire map        |
| `resetmap`   | Reset map fog of war         |
| `killall`    | Kill all nearby enemies      |
| `tame`       | Tame all nearby creatures    |
| `genloc`     | Regenerate dungeon locations |

Time and Weather [#time-and-weather]

| Command                    | Effect                              |
| -------------------------- | ----------------------------------- |
| `tod <0-1>`                | Set time (0 = midnight, 0.5 = noon) |
| `skiptime <seconds>`       | Skip forward in time                |
| `sleep`                    | Skip to next morning                |
| `wind <angle> <intensity>` | Control wind                        |
| `resetwind`                | Reset to natural wind               |

Server-Side Only [#server-side-only]

Server Devcommands is **server-side only** — clients don't need to install anything. Players who are admins on the server can use dev commands from their game client without modifying their installation.

Security Considerations [#security-considerations]

* Only admin-listed players can use dev commands
* Dev commands trivially break game balance (instant endgame items, infinite resources)
* Monitor **Console** for command usage by admins
* Consider restricting which commands specific admins can use via the mod's access list

Related Guides [#related-guides]

* [Console Commands](/docs/valheim/console-commands)
* [Spawn Items](/docs/valheim/spawn-items)
* [Admin Setup](/docs/valheim/admin-setup)
* [Install Mods](/docs/valheim/mod-setup)
