Jump to content

Dedicated Server Quick Setup Guide - Windows


Recommended Posts

Hi! I have successfully created a server but I cannot enable the mods that I want. can anyone please help me? 

This one doesnt work on me:

Quote

return {
    ["workshop-350811795"] = { enabled = true },
    ["workshop-387028143"] = { enabled = true },
    ["workshop-361336115"] = { enabled = true,
        configuration_options =
        {
            hunt_time = 6,
            ["String Phrase Option Name"] = "some value",
        }
    },
    ["workshop-336882447"] = { enabled = true }
}

also this:

Quote

ForceEnableMod("workshop-345692228")
ForceEnableMod("workshop-346968521")
ForceEnableMod("workshop-352373173")

It does tell me that it's downloaded but not enabled can anyone please help?

Link to comment
Share on other sites

On 4/4/2020 at 10:26 PM, thomas4846 said:

i don't have the "StartDSTServers.bat file"

Hello thomas4846, welcome to the forums. You'll have to manually generate/create the .bat file OR .batch file by opening a Notepad and copy pasting the contents of Step 7 into notepad. Then follow the steps below:

  • Click File > Save As 
  • Select "All Files" for Save as type
  • Enter "StartDSTServers.bat" for File name:
  • Save to \Documents\Klei\

The file should be seen as a Windows Batch File under File type if you folder View to Details.

On 4/11/2020 at 3:14 AM, TheJoePilato said:

I thought I had my server up and running (second one on the same machine, running at different times for different groups) but it reset itself after a week away. Any idea what might cause this?

We played the first session for a couple of hours and all was well. Everybody left then I shut the server down using c_shutdown(). A week later I fire the server back up but it's not appearing in my Previously Visited list. I key in the server name specifically, find it, sign in, and it's like a brand new server. Day 1, no character progress, different map. We played through again but now I'm scared to open it because I fear it will be erased. Any idea what is causing this and whether I can fix it without having to restart?

I suspect it has to do with the ports in the server.ini files and the cluster.ini file, as that bit still confuses me a little. Is there a list of suggested ports or will anything work so long as the correct ones match and don't match? Also, can I get a refresher on which ones need to match and not match if I want to have two different servers on the same machine and I DON'T want to run them simultaneously? Thank you all.

 

EDIT: Also, what should be in the folder DoNotStarveTogetherDedicated? Before and after initial server startup.

If your worlds don't seem to be saving, it could possibly be due to permission restrictions of the game not being able to read AND write to the Documents folder (which DST needs by default afaik). To make sure you have permissions, Set the following to "Run program as administrator" in their Properties found in Steam\steamapps\common\Don't Starve Together\bin:

  • dontstarve_dedicated_server_nullrenderer.exe - this program actually hosts the servers for you
  • dontstarve_steam.exe - this program is the client you play on

With regards to which port should be which, refer to this dev post:

 

On 4/18/2020 at 12:31 AM, panchan said:

Hi! I have successfully created a server but I cannot enable the mods that I want. can anyone please help me? 

This one doesnt work on me:

also this:

It does tell me that it's downloaded but not enabled can anyone please help?

Those workshop-###'s aren't the same. If those are all the text you have in your .lua files for both modoverrides.lua and dedicated_server_mods_setup.lua then you are not downloading the correct mods AND enabling the mods that you do have. Also make sure those mods are actually still compatible with the current version of the game. Another possibility is that the mods are conflicting with each other (if they modify the same parts of the game).

Your server_log.txt should shed some more light on what could be going wrong. It is found in the Master folder of your dedicated server.

  • Thanks 1
Link to comment
Share on other sites

Hello @XiaoNO3, welcome to the forums. To add mods you need TWO STEPS. Step 1: Download/move mods to correct mod folder. Step 2: Enable specific mods you want. Adding admins to control the world at the bottom

STEP 1: dedicated_server_mods_setup.lua - downloads mods to correct mod folder.

Automatic Method: To get SteamCMD to download the mods directly, you have to edit dedicated_server_mods_setup.lua in SteamCMD\steamapps\common\Don't Starve Together Dedicated Server\mods. Instructions inside, but basically if you want to for example use the following mod:

https://steamcommunity.com/sharedfiles/filedetails/?id=574636989, you take the steamwork page # id which is 350811795 of that linked URL.

Then edit the dedicated_server_mods_setup.lua and add the ServerModSetup("350811795"), shown below:

servermods.PNG.c5ff9ac278333797ccac6778fae7abb5.PNG

OR

Manual Method: Simply copy pasting mod folders from Steam's DST directory to SteamCMD's  DST 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

STEP 2: modoverrides.lua - enable specific mods you want.

I'd recommend a method that would probably be best when making modoverrides.lua, cause with this method you wouldn't have to fiddle around with typing out every data and making sure you're using the right syntax. This involves generating an in-client server with mods that you want to use configured to the way you want it to and then just copying it over to your own dedicated server's folder. The method is as follows:

Spoiler
  • Start up DST
  • Click Host Game
  • Click New Server in Slot 1
  • Set the server intention in the Server Settings so the world can start
  • Toggle the mods you want to use
  • Configure the mods as you see fit
  • You don't have to make caves for this
  • Once done, generate the world
  • Once connected to the world, disconnect from the server
  • Go to this location Documents\Klei\DoNotStarveTogether\Cluster_1\
  • Under the Master folder, get the modoverrides.lua and that is the modoverrides.lua you'd want to use for your server
  • Now paste that modoverrides.lua in your own dedicated server
  • AFAIK, there should be a modoverrides.lua file in both the Master and Caves folder of your dedicated server beside each server.ini

Admins List - manually creating an adminlist.txt file

You'll only need two things, the Klei user id of the player you want to make an admin AND creating a .txt file called adminlist. You can have your friends that you want to make admins check their https://accounts.klei.com/account/info and let them tell you their Klei User ID. Looks like "KU_XXXXXX".

OR

For the first part you'll only need to look through the server_log.txt file and check for the Klei User ID that corresponds to the player, so once you have your server running make sure that the player you want as an admin is in the server too. Then once they're in, their KU id will reflect in the server_log. Simply search for "KU_" and look for something like this:

[00:00:17]: Client authenticated: (KU_XXXXXXXX) Zillvr

Now that you know their corresponding KU_ID, copy it and create a .txt file and name it "adminlist" in your server folder. You server_log.txt should say the location you need to place the adminlist.txt (use CTRL+F and search your server_log.txt for adminlist.txt). AFAIK it should be in Klei//DoNotStarveTogether/client_save/adminlist.txt. Once you make the adminlist file, open it then paste the KU_ID's of the players you want to be admins on your server. Final result should look something like this:

KU_XXXXXXXX 
KU_ID 
KU_ID
KU_ID

There should be a line break between each KU_ID. After you've correctly saved the file, simply start up your dedicated server again and the players you added should be admins now. Also be sure that the server is closed before making/adding changes to your server files, just to be safe.

That should be it.

Link to comment
Share on other sites

Hello @Edelharn, welcome to the forums. As with any issues with the game, the first place you should always look is at the game logs. Preferrably in this case is the server_log.txt found in both Master and Caves folder of your dedicated server. Go to those locations and then drag and drop those two server_log.txt and attach them to your next reply in this thread.

The server is not responding could be due to many different reasons. Your logs will be more specific on why.

 

Link to comment
Share on other sites

@Edelharn This is all based on my minimal knowledge of understanding logs but from what I can see your caves seems to be failing for some reason. Possibly due to conflicts with permission to save game sessions cause you logs says the game keep trying to create new game sessions then fails until closed. You could perhaps set "dontstarve_dedicated_server_nullrenderer.exe" found in...

c:\steamcmd\steamapps\common\Don't Starve Together Dedicated Server\bin\dontstarve_dedicated_server_nullrenderer.exe

To Run as administrator. Method below:

  • Right click the dontstarve_dedicated_server_nullrenderer.exe file
  • Properties
  • Compatibility
  • Check Run program as administrator

See if that helps the issue.

Link to comment
Share on other sites

Hi, sorry to answer that now, i could try what you said only today and i still have the same issue :/

I wonder if i haven't a corrupted game because of a mod. Is that normal that i got a folder name "minimap" in this way "C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Together\data" ? I already try to delete all mods and even this folder but when i do that steam ask me to check the intigrety of my files games and download again the file "minimap".

(Sorry for my english if sometimes you can't understand me)

Link to comment
Share on other sites

@Edelharn you are following this specific guide correct? This guide only operates within SteamCMD and not Steam. Based on the logs you have the correct files installed (c:\steamcmd\steamapps\common\Don't Starve Together Dedicated Server\). With regards to MODS, if you haven't added mods to c:\steamcmd\steamapps\common\Don't Starve Together Dedicated Server\mods there there shouldn't be any worry. Although if that concerns you, you could try having SteamCMD redownload Don't Starve Together Dedicated Server again.

Method # 2 - reinstall dedicated server executable

So if you want a clean reinstallation of your Don't Starve Together Dedicated Server program that operates through SteamCMD, simply delete the following folder called "Don't Starve Together Dedicated Server" in

c:\steamcmd\steamapps\common\

Then RUN your StartDSTServers.bat file again.

Method # 3 - whitelist dedicated server executable

If setting the c:\steamcmd\steamapps\common\Don't Starve Together Dedicated Server\bin\dontstarve_dedicated_server_nullrenderer.exe to Run program as administrator doesn't work, then the next option you should probably the following:

  • Open anti virus program
  • Look for how to Add new program to Whitelist for your Anti Virus Program
  • Add the executable called "dontstarve_dedicated_server_nullrenderer.exe" in c:\steamcmd\steamapps\common\Don't Starve Together Dedicated Server\bin\ to your whitelist
  • Then start up Servers again

OR

  • Fully close/disable Anti Virus Program
  • Then start up Servers again

 

Link to comment
Share on other sites

Can you guys maybe update this? It's 2020 and your steps no longer work or perhaps never did. I'm really getting frustrated with this company. I'm getting a error with my token and Download Settings does not work inside the steam client. Any process should be easy, as long as the steps are correct and coherent. Clearly that's not the case. It shouldn't be so difficult setting up a dedicated server.

Link to comment
Share on other sites

Hello, I have a problem with the ports. Each time I start the server with overworld and caves, only caves are logged in, and the overworld server writes SOCKET_PORT_ALREADY_IN_USE. About 20 times changed ports. in the server settings, having previously opened them in the router, but it still doesn’t help, only caves work

Link to comment
Share on other sites

Hello @foxpaw474, welcome to the forums.

I'd recommend getting appropriate files from Klei Account: DST Games Server Data.

  • At bottom of that page, Give unique server name in text box
  • Then click Add Server
  • Page would reload and look for the Unique Server Name you entered in step 1
  • Click the green Configure button for you server
  • Edit configurations as you please
  • Click download settings
  • Once downloaded, unzip the downloaded file caled MyDediServer.zip
  • Take the corresponding server.ini's for master and cave and cluster.ini and cluster_token, to your dedicate server files.

Based on your SOCKET_PORT_ALREADY_IN_USE log, could be due to many different things, e.g.:

  • Not actually a .ini file - for this make sure to use *all files* when saving as the file. File should be seen as a Configuration Settings for File Type if you view windows folder in Details mode.
  • Incorrectly editing the wrong files and the files your .bat file opens are a different location - your .bat file must have the same "server name" used for the server folder. In this guide, the server name used is "MyDediServer".

Extra info you may want to read to learn what each port's purpose is, which may give insight on what could be going wrong: 

However, instead of trying to troubleshoot every possibility of what could be going. I suggest you start over with the method I mentioned above.

Link to comment
Share on other sites

Hi guys, so I've been at this for hours trying out all sorts of guides and online videos etc. Finally reached this one which is posted by a developer but is so long ago I'm not sure if its still viable. So anyways, everything launches then when I finally try to join the server (managed to get it on the server list), it returns the "The server is not responding" issue I see plenty of others have as well. Not sure what is going on when I read the server logs too. At this point I'm just praying someone is able to do something to resolve this issue, or at least have an official video guide on this. 

Annotation 2020-06-20 013548.jpg

Link to comment
Share on other sites

@Lemi_11, welcome to the forums. "Missing file permissions" means that the executable file named "steamcmd.exe" that you have in c:\steamcmd\steamcmd doesn't not have administator privileges. To fix this, either set the program to "Run this program as Administrator" OR have your PC User Account have administrator status. Googling either of those should rectify, "Missing file permissions".

@Relaysoul, welcome to the forums. You'll have to check your server_log.txt files cause "The server is not responding..." is a catch-all for the server failing to allow/permit user entry into the server. Attach copies of your server_log.txt file from both Master and Caves folder of your dedicated server folder in your next reply.

@MonkeyDJonh, welcome to the forums. There is very little to go on with just "server won't start". As previously mentioned (to user relaysoul above), "The server is not responding..." is a catch-all for the server failing to allow/permit user entry into the server. So do the same and attach copies of your server_log.txt file from both Master and Caves folder of your dedicated server folder in your next reply.

  • Like 1
Link to comment
Share on other sites

Actually I already found what was going on, it was my firewall that was blocking. But thanks for the response. Since you' already here can you help me with other problem. I simply cant host a server because the lag is always very high :/, I made a dedicated server wondering the lag would reduce, but didnt work. With 2 more people still good, but more than it became unplayble.

Link to comment
Share on other sites

On 2/12/2016 at 11:30 AM, V2C said:

@Zillvr you're a life saver for all the troubleshooting along the way, i just started play DST and created a server, i wouldnt dare to reset and retry cause I miraculously managed to get a working token, if not i will be stuck with the error, so i was just wonderring, is there anyway i can set the world settings to longer autumn, endless etc. cause when i created the world i did it based on default settings

 

Link to comment
Share on other sites

Hello @MonkeyDJonh, sorry I don't get notified that someone is making a reply towards me unless they use the mention function (typing @ + username, should show as @Zillvr). With regards to game performance dropping when playing multiplayer in-game hosted or dedicated server hosted both require a certain level of specifications. Refer to: Klei Support Article: Don't Starve Together System Requirements.

Although if you have a relatively good hardware should fit the bill, refer to Klei Support Article: Network and Performance Troubleshooting Guide and hopefully you can determine the cause of your lag. Sorry again for taking too long to reply.

Hello @krazytown1, welcome to the forums. If you don't mind losing the current world, you would have to force the game to regenerate again after making your World Settings changes. What I recommend for changing world settings is the following:

  1. Close Dedicated Server.
  2. Open DST Game Client.
  3. Start random server in in-game Host Game screen. (For ease of reference, use Slot #5).
  4. Edit World Settings as you see fit.
  5. Generate world.
  6. Exit World.
  7. Close DST Game Client.
  8. Open \Documents\Klei\DoNotStarveTogether\Cluster_5\Master (Notice, Cluster_# where # is 5 because the files in this Cluster_# corresponds to Slot # of Host Game screen you started the in-game generated server in Step 5).
  9. Inside the Master folder is a leveldataoverride.lua file that has your custom World Settings that you entered in Step 4 of this method. Now you can simply copy that file.
  10. Then go to your own dedicated server's Master folder and paste the new leveldataoverride.lua file.
  11. Once done start up dedicated server again.
  12. Open DST Game Client.
  13. Enter your Dedicated Server world.
  14. Open Console with tilde sign "~" and enter "c_regenerateworld()" (make sure Remote: mode is toggled so you commands pushes through to the server).
  15. World will now reset and regenerate with your applied settings from Step 4.

However, as mentioned this method requires losing the world with default settings. I do not know if there is a way to change already existing worlds world setting without regenerating it.

I hope that helps at least, cheers.

Link to comment
Share on other sites

On 2/12/2016 at 11:30 AM, V2C said:

@Zillvr thanks for the swift reply! and yeah now that you mentioned, i tried  "c_regenerateworld()" in console, but nothing happens, how do i rectify that, any console commands doesnt work for me

 

@Zillvr i just tried it, it doesn't seem to let me do any commands, the server is on my PC, is there anyway i can make myself the admin or how does the server detect that i am the admin

Link to comment
Share on other sites

@krazytown1 If you can also directly enter "c_regenerateworld()" in the server windows that you shown in the screenshot directly instead. The other method I mentioned supposedly should be easier to understand.

Perhaps you weren't in "Remote:" mode when you entered the command in to the console while in-game with the game client. To toggle "Remote:" mode, press Ctrl while the Console is opened with tilde sign "~". If I recall correctly, "Remote:" mode is active when you can see the purple text "Remote:" beside the console text box.

With regards to adminlist.txt, you can see where you should place it through the command prompt/console window of the server. As seen: DoNotStarveTogether/MyDediServer/adminlist.txt. Admin list should only contain KU_ID of user you want as admin, and if you want to make yourself an admin, look for your KU_ID in the log files (nowadays the KU_ID also written beside steam name in the logs. Shouldn't be difficult to find). Other method to find your KU_ID is by logging in to https://accounts.klei.com/ with your steam account.

 

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