Jump to content

Dedicated Server Quick Setup Guide - Windows


Recommended Posts

Hello @Raiden_Sola, welcome to the forums. If you've placed the autogenerated cluster_token.txt file in the correct file location yet you still get the same error, then it's likely an issue with the directory syntax used in your .bat file to run the servers. Did you use the same default name given by the guide you used (gameserversetup)?

They utilized MyDedicatedServer as the server folder name. Can you confirm you used the same folder name?

Link to comment
Share on other sites

well as I said in my previous post, I'm NOT using the autogenerated cluster token, because the steam browser that is opened when I click the in-game link as instructed does not provide me with one.  Clicking the button to download the settings file and the cluster token doesn't do anything.  I've manually created a cluster token file per the instructions linked in my previous post, copying and pasting the exact cluster token displayed to me by the web page in the steam browser.  The folder and files are named correctly, and are in the correct place.  The syntax of the coding within the .BAT does not reference the location of the cluster file so I am not entirely sure why this is mentioned.

  • c:\steamcmd\steamcmd.exe +login anonymous +app_update 343050 validate +quit
    cd /D "c:\steamcmd\steamapps\common\Don't Starve Together Dedicated Server\bin"
    start dontstarve_dedicated_server_nullrenderer -console -cluster MyDediServer -shard Master
    start dontstarve_dedicated_server_nullrenderer -console -cluster MyDediServer -shard Caves

my .BAT, as per both guides.  All referenced file and folders are in those same locations.  The .BAT runs fine up until it tries to query the token file.

Link to comment
Share on other sites

Hello @Raiden_Sola, So you're using "MyDediServer" as the server folder name then? And not "MyDedicatedServer" as instructed by the gameserversetup site you referenced earlier. Cause looking at the contents of the .BAT file you attached, it references the folder name MyDediServer.

Do you have your dedicated server folder named as "MyDediServer" or "MyDedicatedServer"? Which ever it is, you have to make sure these are the same names used in the .BAT file and in the actual location of the server folder.

Since you mentioned earlier that you started with the gameserversetup site's guide (which uses MyDedicatedServer as the server folder name).

In the .BAT file, notice the command line "-cluster MyDediServer":

c:\steamcmd\steamcmd.exe +login anonymous +app_update 343050 validate +quit
cd /D "c:\steamcmd\steamapps\common\Don't Starve Together Dedicated Server\bin"
start dontstarve_dedicated_server_nullrenderer -console -cluster MyDediServer -shard Master
start dontstarve_dedicated_server_nullrenderer -console -cluster MyDediServer -shard Caves

That is the part of the .BAT file that looks for the cluster information in the server folder called "MyDediServer". And if the two shards match clusters, then they are linked.

Link to comment
Share on other sites

In fact I have two .BATs and two folders with the same files in it, both the full "Dedicated" and the shortened "Dedi" that I did when I was first trying to figure out what the problem was.  Both create identical error messages when I attempt to run them.  Either version hates the manually-created token file.

Link to comment
Share on other sites

@Raiden_Sola but did you also change the default "MyDediServer" server name in the syntax of the .BAT files when you have shortened them as "Dedi"?

Can you attach a screenshot of your dedicated server folders within Documents\Klei\DoNotStarveTogether and a screenshot of the contents of your .BAT files?

Link to comment
Share on other sites

Well there is a new wrinkle on the situation that developed earlier today.  After changing antivirus software, the server now appears to launch fine with no problems.  Either the old antivirus (which admittedly was annoying me with other programs) was somehow interfering, or a couple of the threats the new antivirus removed were responsible.  Either way I'm now able to proceed with further testing of my server. 

Thanks for the assistance.  Even though the problem seems to have sorted itself, you still jumped on it much faster than any other support I've had to seek in the past, and that has my deepest appreciation :)

Link to comment
Share on other sites

Alright, new problem - the world generation is not respecting the worldgenoverride.lua file I have placed in my dedicated server folder.  I've deleted the world save a couple of time and had it regenerate, but when I access the server in-game and look at the world options, none of the items I modified are showing on the world info (ex: less often on frog rain and hound attacks, more often generation of carrots, ect.)  I've attached screenshots of where I have the .LUA as well as the coding as it currently is.

settingstrouble1.PNG

settingstrouble2.PNG

Link to comment
Share on other sites

@Raiden_Sola well that's good it resolved itself. INVALID_TOKEN often are commonly caused by incorrect file names and such which is why I tried to rule that out first and foremost.

With worldgenoverride.lua files. Your file type is correct (notice under Type "LUA"). However the location is incorrect. The worldgenoverride.lua for OVERWORLD should be placed in the Master folder. While the worldgenoverride.lua for CAVES should be placed in the Caves folder.

Alternatively, you can use the game to generate these files for you and you just have to transfer them over. To do so:

  • Open DST
  • Click Play
  • Click Host Game
  • Select Server Slot #5 (slot number has a significance later)
  • Modify the world settings as you see fit
  • Enable the Caves settings if you want Caves too
  • Modify cave settings too as you see fit
  • Generate World
  • Once world finishes generating, play any character
  • Once inside world, Save and exit
  • Open file location Documents\Klei\DoNotStarveTogether\Cluster_5\, (notice #5, this corresponds to the server used in Slot 5)
  • Under the Documents\Klei\DoNotStarveTogether\Cluster_5\Master folder you will have leveldataoverride.lua (same as a worldgenoverride.lua), copy this over to your Documents\Klei\DoNotStarveTogether\MyDedicatedServer\Master
  • Under the Documents\Klei\DoNotStarveTogether\Cluster_5\Caves folder you will have leveldataoverride.lua (same as a worldgenoverride.lua), copy this over to your Documents\Klei\DoNotStarveTogether\MyDedicatedServer\Caves
  • Now, since the world was already previously generated when you first started it up, you have to reinitiate the world generation sequence again.
  • So once you have all the leveldataoverride.lua in the correct locations, start up your dedicated server
  • Once dedicated server is up and running, enter the following command directly into the console (the dedicated server master's prompt that was started up by the batch file)
c_reset()
  • Or use c_regenerateworld(), either commands should work and after it regenerates your settings will now have been applied.
Link to comment
Share on other sites

okay,hopefully this will correct another problem that has come up as well, which is a friend and I went on to do some server testing while waiting and found the cave are not behaving as caves either, they're generating as a second surface world.  I'll try snatching the premade files using saveslot 5.  I'm assuming I'll need to rename the files from "leveldata" to "worldgen" once I have moved them?

Add: Also I put the .LUA in that location under great suspicion, but that was where the fan wiki said to put it, and strangely no-one else covers this detail, including your guide.  Thanks for clarifying XD

Edited by Raiden_Sola
Add
Link to comment
Share on other sites

@Raiden_Sola afaik, you may not need to rename the leveldataoverride.lua files into worldgenoverride.lua cause both work. Worldgenoverride was the old naming convention for the world settings, while the leveldataoverride is the newest name used by the game currently. Though I believe both names would work, you might be better off just copying the files over as is.

If the caves also looks like the overworld, then the leveldataoverride.lua wasn't in the correct place or you might've copied the same file that is used in for the Master folder of your dedicated server.

I believe that incident where the caves also looked liker another surface world was because of the initial file placement of your worldgenoverride.lua file. The game might've applied the same world settings cause that was the only world settings present in your dedicated server folders. Although I haven't personally tested it, so that's just my guesstimate assumption.

Link to comment
Share on other sites

Minor question while I am trying the server reset, the settings for the antlion tribute option, does this prevent the antlion from appearing at all, or does it simply slow/stop the frequency of its tantrums?  I don't want to opt out of having it on the server, but the people I play with have a general hatred for that guy XD

Link to comment
Share on other sites

might  to just got test it myself to see what happens.

Alright your help's starting to make the server look great (after a minor incident with with my settings making dozens of clockwork bishops spawn at the portal...) and the caves are generating correctly.  Thanks so much for the assistance.

Now is a matter of things less in our control, the implementation of mods.  Can I do similar with the level override files, and implement the mods on a locally hosted server and then just copy the settings over to my dedicated server folder?

Update: I've added the mod .LUAs from my hosted game to my dedicated folder to duplicate my cluster5 folder with no success.  Following other suggestions online, I copied the mod folder from my DST game into the dedicated server folder and still no sign of the mods loading.  Doing a full server reload/reset with the mod folder duplicated in both the master and cave folders and trying to dig up other guide but the info I'm finding is all very old.

Update2: Weirdness continues.  I went back to square one, deleted any modifications I did attempting to get the mods loaded, simply went back to my host game and added an additional mod, ran server, copied and dumped the updated mod .LUA in the dedicated master/cave folders, and now the mods are finally loading.  The most recent mod does not seem to be functioning, but I'm doing another server reset to see if that then implements it.  I'm left very confused, but at least things are starting to work now.

Edited by Raiden_Sola
update 2
Link to comment
Share on other sites

@Raiden_Sola you are using SteamCMD to start up your servers, correct?

You're right with thinking doing the same thing we did for leveldataoverride/worldgenoverride.lua be autogenerated by the game. With mods, once you've configured your mod settings in the Host Game screen and finished generating the world. Instead go look for the modoverrides.lua files from Cluster_#\Master, and transfer them to your server's Master folder and Caves folder.

However, that's only the part that calls which mods to use. You now then need to get the mods to be downloaded into the SteamCMD's directory. So follow this:

  • Close out dedicated server
  • Go to Steam\steamapps\common\Don't Starve Together\mods, and highlight all the mod folders called workshop-### and copy them.
  • Then go to SteamCMD\steamapps\common\Don't Starve Together Dedicated Server\mods, then paste all the workshop-### folders there.
  • Start up dedicated server
  • Done

To get SteamCMD to download the mods instead, you have to edit dedicated_server_mods_setup.lua in SteamCMD\steamapps\common\Don't Starve Together Dedicated Server\mods.

Refer to: https://dontstarve.fandom.com/wiki/Guides/Simple_Dedicated_Server_Setup#Mods

Link to comment
Share on other sites

Sorry I hadn't checked back in a bit, been busy going back and forth with the mods now.  I'm getting a conflict with some of them and having to figure out which ones don't like each other, but otherwise the server is now working great, thanks for the assistance.

I do still have one minor oddity but it doesn't seem to be effecting the server - I am stuck with ??? for a latency reading, as seen by me, who lives in the house with the server computer, and by one of my friends elsewhere.  I've seen online that this can happen when port forwarding isn't used, however Port forwarding has been set up for the server and the server has a static IP, but the question marks remain.  Is there anything else that might cause this?

Link to comment
Share on other sites

@Raiden_Sola With regards to ??? ping, I've seen people suggest port forwarding but I haven't seen any testimonies of it actually working. And I don't experience the ??? myself, so I can't guarantee how effective it is. So unfortunately, I can't be much help with that issue.

However, if you haven't seen this Klei Article: Network and Performance Troubleshooting Guide yet. Then I recommend trying to set the dedicated server program (in your steamCMD which is what functions for the server when you start them up with a .BAT file), to whitelist it in your firewall and/or add the same program to your antivirus.

Do the same with the game client versions, as some users have reported that antivirus can conflict with the communication between servers and clients.

Aside from that, I can't be much help. If I do come across a credible solution to the ??? ping, I'll let you know. Good luck.

Link to comment
Share on other sites

@marioneff, welcome to the forums.

Have you tried to generate your Cluster Token, through Klei Accounts? It'll require you to login with the Klei User ID that is tied to the platform version you are playing from. If you play from steam then log in with your steam account. Once logged in, click GAMES Tab > Don't Starve Together Servers > Enter a Friendly Name to be able to distinguish your new token then > Click Add New Server (at bottom of page)

Page will refresh and look for the Friendly Name. Click the Green Configure Button to change info and download the settings. The downloaded file is a zip file with bare bones files for running a server. From there you can take the cluster_token from the zip file and put it in your dedicated server files.

Make sure you are placing them in the correct folders. Look at previous troubleshooting methods we've done in previous pages concerning File Locations, SteamCMD locations, etc.

Link to comment
Share on other sites

@marioneff at a glance, everything seems to be in running order. No errors, or drastic failures in the logs. However, if it wont show up in your Browse Games > Set Connection Filter to: LAN (if you're running the dedicated server on the same home network.

Another possibility is your antivirus might be interfering with the communications between then caves server and master server. Whitelist the server program (E:\more games from instalers\steam\steamapps\common\Don't Starve Together Dedicated Server\bin\dontstarve_dedicated_server_nullrenderer.exe) on your specific antivirus program including your game client. Based on the logs, it seems you've already authorized the game files for your firewall. Try the antivirus method if you have any antivirus programs running.

If you're using external hosting options, and you're still not seeing the server in Browse Games.

THEN it's highly possible that it's due to version mismatch between dedicated server files and your game client files. Make sure both are updated to the latest version of the game. So confirm that the Server Version number from the logs is the same with the Game Client's version (press Backspace to see game client version while DST is open).

I could also be missing important information from your logs, so I'll let you know if I notice anything else iffy from the logs.

Link to comment
Share on other sites

@Zillvr Hello i feel like this should be a simple issue. I do not have the \\Documents\Klei\StartDSTServers.bat pathway. i have all of the other necessary files the quick start guide says i should:

  • \\Documents\Klei\DoNotStarveTogether\MyDediServer\cluster_token.txt
  • \\Documents\Klei\DoNotStarveTogether\MyDediServer\cluster.ini
  • \\Documents\Klei\DoNotStarveTogether\MyDediServer\Master\server.ini
  • \\Documents\Klei\DoNotStarveTogether\MyDediServer\Caves\server.ini
  • \\Documents\Klei\DoNotStarveTogether\MyDediServer\Caves\worldgenoverride.lua

but the Documents\Klei folder does not contain a StartDSTServers.bat  file or document

I have generated a server and adjusted the settings for my preference but the server settings page will not save and my server name is not appearing in the list. however i do have the key:

 

snip DST server.PNG

file Directory.PNG

Edited by ui7j3w
additional info added via photo
Link to comment
Share on other sites

Hello @ui7j3w, welcome to the forums.

The StartDSTServers.bat file does not exist automatically because you'll have to create it. To create the .bat file also known as a Batch File, simply follow the method below:

  • Open Notepad
  • Copy the Text in Step 7 of this guide
  • Click File
  • Click Save As
  • Select Save as type: to "All Files"
  •  Enter in filename "StartDSTServers.bat"
  • Save
  • Double check the File Type for your .bat file should be "Windows Batch File"

If everything is as it should be, opening the StartDSTServers.bat file will AT FIRST open one command prompt (this will install the SteamCMD's necessary DST dedicated server files). But once that's set up, two command prompts would appear. One would be your Master Server and the second would be the Caves Server. You wouldn't need to fiddle with these command prompts, but you can enter console commands directly in these server prompts if you wish to.

  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...