Preface
This guide presumes you have a Valheim Dedicated setup on your windows machine using the plethora of guides on the internet/steam.
This is aimed mostly toward advanced users, and as always…
BACKUP YOUR WORLD BEFORE STARTING
I TAKE NO RESPONSIBILITY
(This is also my first guide on Steam, feedback is appreciated)
Downloading NSSM – the Non-Sucking Service Manager
First you visit https://nssm.cc/download, and download the the Featured pre-release.
Extract the appropriate NSSM.exe from the download to your c:\windows\system32 folder (64bit if you’re on a 64bit os, 32 for 32)
Configuration of NSSM
Open a Command Prompt (cmd), and enter the following
nssm install Valheim
(You will be asked for Administrative changes, Allow)
NSSM will open, ready for input
Click on the Path’s button [..], and find your valheim_server.exe, and select it. It will auto fill the path and startup directory
Now the Arguments. Open your server’s launch batch file, and copy/paste your settings into the Arguments field (I’m using the dummy batch file as an example)
Go to the Details Tab. Choose Automatic Delayed Start (It’s not a windows critical service). Optionally, give it a description.
On the Logon Tab, you must enter your Window’s account username and password, this is so the server will have access to your stored saved games. If you mistakenly choose Local System Account, the server will look for and save your world in a different, more difficult to access location (not what we want)
Now, since we won’t be able to see a console anymore, using NSSM we can save that output to log files, for diagnosing any problems if the server does not load, crashes, etc (the folder the logs go into must exist, NSSM will not create these folders automatically)
And the final tweak….
That’s it. Click on Install Service and you’re done.
Open services and start the Valheim service.
This is all about Valheim – Dedicated Server as a Windows Service (NSSM); I hope you enjoy reading the Guide! If you feel like we should add more information or we forget/mistake, please let us know via commenting below, and thanks! See you soon!
- All Valheim Posts List
Hey, im trying to set it up like you did but i get an error “Enviroement Variable should comprise strings of the form KEY=VALUE” could you let me know how to fix ?
Did you find a resolution to this?