Valheim: Using Cheat Commands
Unfortunately, the cheat commands built into Valheims console don't work on dedicated servers. Instead, you would have to look at mods/plugins that can achieve what you’re looking for. For example, we have a one-click installer for Valheim Plus that could change how the game is being played.
There are also other popular mods such as SkToolbox which has similar functionality as the console commands and extends it further. Do note that SKToolbox would be installed only on your computer and not DatHost servers.