By default you can't use devcommands such as flying and spawning items in a multiplayer server, however the Server devcommands mod makes it possible to use these in multiplayer.
1. Open the Mods (BepInEx) tab
2. Enable BepInEx
1. Download Server devcommands from this page
2. Extract the file and inside you'll find ServerDevcommands.dll
3. Open the File Manager
4. Navigate to /steamcmd/valheim/BepInEx/plugins/
5. Drag ServerDevcommands.dll
into the plugins folder
6. Restart the server
1. In Steam, right click Valheim and select Properties
2. Type -console
into the launch options box
3. Download and install r2modman, a mod manager for Valheim and other games
4. Select Valheim and search for “devcommands”. Download Server_devcommandsby JereKuusela
5. Ensure the mods are enabled and click Start modded. You will now be able to use devcommands in game.
*Note: You must also be an admin