Your Valheim server shuts down seconds after starting, even though the command looks fine? Often the install is not the problem — the password is. It has to be at least five characters long, and it must not appear anywhere inside the server name. Small rules like that decide whether a dedicated server comes up on the first try or stalls before it ever creates a world.

Requirements and hardware
Valheim is undemanding on the server side, and it is built for roughly ten players at most. A small to medium world with up to five players runs on 2 to 4 GB of RAM. For a larger world with up to ten players, 4 to 8 GB is the better bracket. Add a decent CPU and an SSD.
The dedicated server is a separate application, not the Valheim client. It needs no graphics card and runs headless, which is why it starts with -nographics -batchmode. The client's heavier requirements — a GPU and 8 GB of RAM or more — do not carry over to the server.
Downloading it differs too. The dedicated server has its own Steam app ID and can be pulled with +login anonymous. Running a server therefore does not require a Steam account that owns Valheim; you only need a copy of the game to play on it.
If the server lives on your home connection, it needs a public IPv4 address unless you use crossplay. On DS-Lite or CGNAT lines a normal port forward often cannot be set up at all, and crossplay via the PlayFab backend is the way around it. If you would rather not run the machine yourself, DeinServerHost offers a ready-made Valheim server.
Installing on Windows
Windows needs SteamCMD from Valve. Extract it to C:\steamcmd and run steamcmd.exe once so it can update itself. Then pull the server files:
steamcmd.exe +login anonymous +app_update 896660 validate +quit
App ID 896660 is the Valheim dedicated server. The client has a different app ID, and 896666 does not exist — a digit off and you get nothing.
Create a start.bat in the server directory. A complete start command looks like this:
valheim_server.exe -nographics -batchmode -name "My Server" -port 2456 -world "MyWorld" -password "secret123" -public 1
The world named in -world is created on first launch. Server name, world and password are all set through start parameters, not a config file.
Installing on Linux
On Debian or Ubuntu, give the server its own user account and install SteamCMD:
sudo adduser --disabled-password --gecos "" valheim
sudo dpkg --add-architecture i386
sudo apt update && sudo apt install -y steamcmd
Switch to that user and install the server files into /home/valheim/vhserver:
sudo -iu valheim
steamcmd +login anonymous +force_install_dir /home/valheim/vhserver +app_update 896660 validate +quit
For a server that comes back on its own after a reboot, use systemd. Create /etc/systemd/system/valheim.service:
[Unit]
Description=Valheim Dedicated Server
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=valheim
WorkingDirectory=/home/valheim/vhserver
ExecStart=/home/valheim/vhserver/valheim_server.x86_64 -nographics -batchmode -name "My Server" -port 2456 -world "MyWorld" -password "secret123" -public 1
Environment=LD_LIBRARY_PATH=/home/valheim/vhserver/linux64
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
Reload systemd, enable the service and watch the log:
sudo systemctl daemon-reload
sudo systemctl enable --now valheim
sudo journalctl -u valheim -f
The Valheim process now runs under its own user and restarts ten seconds after a crash. A unit like this looks the same for any dedicated server; it is broken down in more detail in the section on running permanently in how to create a Minecraft server.
World, password and crossplay
-world "Name" decides which world the server loads. If no world by that name exists yet, it is created on first launch.
The password has two hard rules: at least five characters, and it must not occur as a substring of the -name value. A server called My secret123 Server with the password secret123 will refuse to start. This is the single most common reason a fresh install never comes up.
-public 1 lists the server publicly; -public 0 keeps it off the list.
Crossplay is switched on with -crossplay. The connection then runs through the PlayFab backend and players join with a join code instead of an address. No port forwarding is involved, which is what makes it useful on DS-Lite and CGNAT connections where inbound IPv4 cannot reach your machine in the first place.
-crossplay is the direct way out when there is no public IPv4 for a classic port forward.Changing difficulty and rules with world modifiers
Since the Ashlands update Valheim ships an official system for world rules. A lot of what people used mods for is now set directly when the world is created.
-preset loads a complete rule package. -modifier changes a single slider. -setkey turns individual extra rules on.
Several modifiers in one line:
-modifier Combat hard -modifier DeathPenalty casual -modifier Resources more
These are the sliders and their accepted values:
Combat—veryeasy,easy,hard,veryhardDeathPenalty—casual,veryeasy,easy,hard,hardcoreResources—muchless,less,more,muchmore,mostRaids—none,muchless,less,more,muchmorePortals—casual,hard,veryhard
Anything you leave out keeps the standard value of a normal game. For a relaxed run, -modifier DeathPenalty casual -modifier Resources more does the job. For a considerably harsher one, try -modifier Combat veryhard -modifier DeathPenalty hardcore -modifier Raids more.
The Portals slider causes a second misunderstanding. It only governs what players may carry through a portal — ore, for instance. None of its values disables portals. Playing without portals at all needs a separate switch via -setkey.
Ports and firewall
Without crossplay, Valheim uses two consecutive UDP ports. The port you set with -port, 2456, carries the game. 2457 follows automatically as -port plus one and handles the Steam server query.
| Purpose | Protocol and port |
|---|---|
| Game port | UDP 2456 |
| Steam server query | UDP 2457 |
Opening TCP alone does nothing here.
On Windows, create the inbound rule from an elevated PowerShell:
New-NetFirewallRule -DisplayName "Valheim 2456-2457 UDP" -Direction Inbound -Protocol UDP -LocalPort 2456-2457 -Action Allow
On Linux with UFW:
sudo ufw allow 2456:2457/udp
On a home connection both UDP ports also have to be forwarded to the server in the router. With -crossplay enabled, the port forward is not needed at all.
Connecting to the server
Without crossplay, add the server in Steam under View → Servers → Favorites as IP:2456. It then shows up in the game under Join → Favorites.
With crossplay active you join from inside the game under Join → Crossplay and enter the join code. Either way, players need the server password.
Admins, whitelist and bans
Access is handled through three text files in the save directory, one SteamID64 per line.
adminlist.txtholds the administrators.permittedlist.txtacts as a whitelist — only listed players may join.bannedlist.txtholds banned players.
Restart the server after editing any of them. Administrators can also moderate in game through the F5 console.
Installing mods with BepInEx
BepInEx is the mod loader for Valheim. Mods hook into the server through it and go into the plugins folder; Thunderstore is the usual source.
For anything server-side, server and client need the same mods at the same versions. Mismatched versions produce errors or dropped connections when players try to join. After a Valheim update, bring BepInEx up to date first, then the mods.
Plenty of older guides still point to Valheim Plus or uMod. Neither is a good default for a current server. The original Valheim Plus has been unmaintained since December 2022 and was hidden as outdated on Nexus Mods in March 2026. A community fork exists, but it is increasingly avoided on 1.0 servers.
The reason is how deeply it patches the game code, which makes it a frequent source of instability on current builds. Meanwhile the official world modifiers now cover a large share of what people originally installed it for.
uMod is no better a foundation for a production server. Only development builds are available, and they are explicitly marked as unstable. The more sensible order is to check whether world modifiers already cover what you want; if they do not, a maintained single-purpose mod through BepInEx is the safer choice.
Backups and moving a world
A Valheim world is two files sharing one name. WorldName.db is the world itself, WorldName.fwl holds its metadata. They belong together and have to be backed up together.
Local worlds live here on Windows:
%USERPROFILE%\AppData\LocalLow\IronGate\Valheim\worlds_local\
And here on Linux:
~/.config/unity3d/IronGate/Valheim/worlds_local/
Stop the server first for a clean backup. To move a world, copy both the .db and the .fwl file into the new server's worlds_local directory and start it with the same -world name. Copy only one of the two and the world either goes missing or is not recognised properly.
-savedir "PATH" lets you put the save directory wherever you want, which helps if world data should sit apart from the server files.
Updating the dedicated server
Updates go through SteamCMD again:
steamcmd +login anonymous +app_update 896660 validate +quit
Back up WorldName.db and WorldName.fwl together before every update. On Linux, restart the systemd service afterwards:
sudo systemctl restart valheim
Troubleshooting
| Problem | Cause or fix |
|---|---|
| Server does not start | The password is shorter than five characters or appears as a substring of the server name. |
| Server missing from the server list | UDP 2456 and 2457 are blocked, or the server runs with -public 0. |
| Connection fails | Wrong IP or port, no router forward, or the line uses DS-Lite or CGNAT. In that last case, use crossplay. |
| Crossplay code does not work | -crossplay is missing, or the server has not finished starting. |
| Errors when joining with mods | Server and client are not on the same server-side mods at the same versions. |
| World missing after a move | Only one world file was copied. .db and .fwl have to travel together. |
| World modifiers have no effect | They are set at world creation and generally cannot be changed for an existing world. |
Portals still usable despite the Portals slider | The slider only controls what may be carried through. Disabling portals entirely uses a separate switch. |
| Mods do not load | BepInEx is missing or outdated after a Valheim update. |
| Valheim Plus causes crashes | The original is unmaintained. World modifiers or maintained single mods through BepInEx are the better alternative. |
Frequently asked questions about Valheim servers
How much RAM does a Valheim server need? A small to medium world with up to five players runs on 2 to 4 GB. For a larger world with up to ten players, plan for 4 to 8 GB. An SSD and a decent CPU belong to a sensible baseline as well.
Which ports does a Valheim server need? UDP 2456 and UDP 2457 by default. 2456 is the game port you set with -port, and 2457 follows automatically for the Steam server query. Opening TCP does not work for this.
How does crossplay work in Valheim? Crossplay is enabled with -crossplay and runs through the PlayFab backend. Players join with a join code and no port forward has to be set up, which is what makes it useful on DS-Lite or CGNAT connections.
Why will my Valheim server not start? Check the value you passed to -password first. It needs at least five characters and must not appear as a substring of the server name. Breaking either rule stops the server from launching.
Where are the world and save files? On Windows in %USERPROFILE%\AppData\LocalLow\IronGate\Valheim\worlds_local\, on Linux in ~/.config/unity3d/IronGate/Valheim/worlds_local/. A world is always a .db and a .fwl file sharing the same name. -savedir "PATH" points the server at a different directory.
How do I install mods on a Valheim server? Install BepInEx in the server directory and put the mods themselves into the plugins folder, usually from Thunderstore. For server-side mods, server and client have to run the same versions.
How do I set the difficulty? Through the official world modifiers, applied when the world is created: -modifier and -preset, plus -setkey for individual extra rules. -modifier Combat veryhard raises combat difficulty, for example. These settings generally cannot be changed for an existing world.
Do I still need Valheim Plus? For most new servers it should no longer be the first choice. The original has been unmaintained since December 2022 and was hidden as outdated on Nexus Mods in March 2026. Many of its former uses are covered by world modifiers today, and maintained single mods through BepInEx fit the rest.
Do I need a Steam account that owns Valheim to run a dedicated server? No. The server files are pulled with SteamCMD using +login anonymous and app ID 896660. You only need a purchased copy of Valheim once you want to play on the server yourself.