How to use this command
- Stop your Valheim server.
- Put the command in your start script (
start_server.shon Linux,start_headless_server.baton Windows) in place of the existing line that starts the server. - Keep the password at least 5 characters, and make sure it is not part of the server name.
- Open UDP ports
port,port + 1andport + 2on your router or firewall, then start the server.
Hosting with PlayNHost? The panel sets the ports and starts the server for you. Change the name, password, world and the options in the panel under Settings.
Run your Valheim server on PlayNHost
Instant setup, DDoS protection, automatic backups and a 72-hour money-back guarantee. Change these settings in the panel, no file editing.
See plansQuestions
What ports does a Valheim server need?
Three UDP ports in a row, starting at the port you set. With the default 2456 that is 2456, 2457 and 2458.
Why does the server refuse my password?
The password must be at least 5 characters and must not be contained in the server name.
Can I change world modifiers on an existing world?
Modifiers are set when a world is created. Check the game's documentation for what can change later.
Good to know
- Flag names follow the dedicated server manual that ships with the game. Valheim changes between updates, so check the manual in your server folder if an option is rejected.
- World modifiers and presets only apply to a new world or are set when the world is created. See the game's own documentation for details.
- Back up your world files before you change anything.