Free tool · Valheim

Valheim dedicated server start script

Fill in the name, world and password and you get your whole start_headless_server.bat (Windows) or start_server.sh (Linux), ready to copy. Before you try it, it tells you anything that would stop it from starting. If you already have one, paste it to change it.

Where does the server run?

The server

With crossplay you don't need to open ports on the router; without it, open the port and the next one, UDP.

Saving and game backups

Empty = the default, and it isn't written.

World modifiers (optional)

Paste the -preset, -modifier and -setkey here. Pick them with buttons in Valheim world modifiers.

Already have the file? Paste it

The server line is read and everything above is filled in.

Your file

All good: it starts like this.

start_headless_server.bat
@echo off
set SteamAppId=892970
REM Make a copy of this file: Steam rewrites the original when it updates.
echo Starting the server. Press Ctrl+C in this window to stop it
valheim_server -nographics -batchmode -name "Vikingos de Ana" -port 2456 -world "Vikingos" -password "hidromiel42" -public 1

Save it as start_headless_server.bat in the server folder, next to valheim_server, and double-click it.

Free Valheim server

At NapNodes there's no file: name, password, world, crossplay and backups are in the panel's “Settings”, on the free server too, and it doesn't depend on your PC being on.

What each one does

  • -name: the name shown in the server list.
  • -world: the world it loads, by the name of its folder in worlds_local. If it doesn't exist, a new one is created with that name.
  • -password: at least 5 characters and not inside the server name or the world name. It's case sensitive.
  • -port: the port (2456 if you leave it). It uses that one and the next.
  • -public: 1 to show in the list, 0 to join only with the address.
  • -crossplay: crossplay with consoles and Game Pass; with it you can also join by code and you don't need to open ports.
  • -saveinterval, -backups, -backupshort and -backuplong: how often it saves and the backups the game keeps next to the world.

The full steps, from downloading the server to your friends joining, in the guide Valheim dedicated server on your PC. If it still won't start with a good file, see Valheim server not starting.

At NapNodes, no file

On a NapNodes Valheim server you don't edit any .bat: in the panel, “Settings” has the server name, the password, the world, “Show in the public list”, “Crossplay (consoles and Game Pass)” and “Saving and the game's backups”, each with its own field; it saves by itself and applies on restart. And it doesn't depend on your PC being on.

Frequently asked questions

Why does my Valheim server close as soon as I open it?

Almost always the password: it's shorter than 5 characters or it's inside the server name (or the world name). Valheim won't start like that. Paste your file into the tool and it tells you what's wrong.

Where is start_headless_server.bat?

In the dedicated server folder, “Valheim Dedicated Server” in your Steam library (right-click → Manage → Browse local files). Make a copy and edit the copy: Steam rewrites the original every time it updates.

Which ports do I need to open?

The one you set in -port and the next one, UDP: 2456 and 2457 if you don't change it. With crossplay (-crossplay) you don't need to open any. All of it in the Valheim ports guide.

How do I stop the server without losing progress?

With Ctrl+C in its window, never with the X: that way it saves the world before closing.

Can I use accents or emojis in the name?

Yes. On Windows, the tool adds “chcp 65001” at the top of the .bat so the console reads them properly; save the file as UTF-8, which is what Notepad does by default.

Don't want to leave your PC on?

At NapNodes you get a free Valheim server, no card needed: you start it when you want to play and it stops by itself when nobody's on. If you want it on all the time, you move to a plan and keep the same world. And if you already have a world, bring it along: here's how.

Create your free Valheim server

Guides that explain it

More free tools

All the tools