Valheim start_headless_server.bat generator
Valheim has no config file at all — everything is command-line arguments on the launch script, which is why editing files never seems to change anything.
Start from a preset
Visual Settings
start_headless_server.bat
How start_headless_server.bat syntax works
Settings are flags passed to the server executable: name, port, world and password each take a value, and values containing spaces need quotes. The world argument names a save file rather than creating one from a seed, so a typo silently starts a fresh world instead of loading the one you meant.
The mistake that costs people hours
The password rules will stop your server booting and the reason is not obvious. It must be at least five characters, and it must not contain the server name or the world name. A server called Valhalla with the password valhalla123 simply refuses to start. If your server exits immediately after launch, check the password before anything else.