Valheim – Dedicated Server as a Windows Service (NSSM)

Valheim – Dedicated Server as a Windows Service (NSSM) 11 - steamlists.com
Valheim – Dedicated Server as a Windows Service (NSSM) 11 - steamlists.com
How to run a Windows Valheim Dedicated Server as soon as the computer boots, without logon.

 
 

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. 
Valheim - Dedicated Server as a Windows Service (NSSM) 
 
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) 
Valheim - Dedicated Server as a Windows Service (NSSM) 
 
 
 

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 
 
Valheim - Dedicated Server as a Windows Service (NSSM) 
 
Click on the Path’s button [..], and find your valheim_server.exe, and select it. It will auto fill the path and startup directory 
 
Valheim - Dedicated Server as a Windows Service (NSSM) 
 
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) 
 
Valheim - Dedicated Server as a Windows Service (NSSM) 
 
Go to the Details Tab. Choose Automatic Delayed Start (It’s not a windows critical service). Optionally, give it a description. 
 
Valheim - Dedicated Server as a Windows Service (NSSM) 
 
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) 
 
Valheim - Dedicated Server as a Windows Service (NSSM) 
 
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) 
Valheim - Dedicated Server as a Windows Service (NSSM) 
 
Valheim - Dedicated Server as a Windows Service (NSSM) 
 
And the final tweak…. 
Valheim - Dedicated Server as a Windows Service (NSSM) 
 
That’s it. Click on Install Service and you’re done. 
Open services and start the Valheim service. 
 

Written by Tsusai

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!
 
 
 
 


2 Comments

  1. 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 ?

Leave a Reply

Your email address will not be published.


*