Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

alainmcd

[HowTo] Run a Dedicated Server from your PC - without SteamCMD or the Dedicated Server Tool

Recommended Posts

BigBBB    2
11 minutes ago, Zillvr said:

Hello @BigBBB, welcome to the forums. The code is simply:


c_shutdown()

The parenthesis is empty. So input only that into both windows to shut them down. I hope that helps, cheers.

@Zillvr @alainmcd

thank you for yours answers. But when i try to run RunDSTServer.bat the console always disappear so i can't type anything 

Share this post


Link to post
Share on other sites
Zillvr    1,634

@alainmcd ah, I remember something like that back when ran private servers. Sorry, I assumed it was an incorrect code since they said they still had nullrenderer.exe running and thanks for clarifying.

I also want all the skins pls.

Share this post


Link to post
Share on other sites
alainmcd    889

When you run RunDSTServer.bat, the window will shortly after close itself, but it launches another two windows: one for the overworld shard and one for the caves shard. Isn't that the case? When you want to close your server, you have to type c_shutdown() into both windows, AFAIK there's no command to close both shards at the same time.

Share this post


Link to post
Share on other sites
Zillvr    1,634

Heads up, if by any chance you have OneNote active on your PC (assuming you're on Windows), that conflicts with the default file path of your document files and places them in a different location which the dontstarve_dedicated_server_nullrenderer.exe does not know. So disable OneNote if you have it and check to make sure your files are in the correct location. In this case, make sure that the Cluster_5 is in C:\Users\Username\Documents\Klei\DoNotStarveTogether.

Share this post


Link to post
Share on other sites
canada11    0

I modified the linux command, it works for me if it's like so:

#!/bin/bash

cd "$HOME/.local/share/Steam/steamapps/common/Don't Starve Together/bin"

./dontstarve_dedicated_server_nullrenderer -cluster Cluster_5 -monitor_parent_process $$ -shard Master  | sed 's/^/Master:  /' &
./dontstarve_dedicated_server_nullrenderer -cluster Cluster_5 -monitor_parent_process $$ -shard Caves | sed 's/^/Caves: /'

 

I couldn't get the variables to work so I just got rid of them and put everything in the two lines

 

Was it a conscious decision to have windows start the Master first and then Caves but have Linux & Mac start Caves first and then Master?

Share this post


Link to post
Share on other sites
canada11    0

I'm also getting the E_INVALID_TOKEN error even after generating a new token. - one of the output lines does say 'No auth token could be found' - I don't know if that's a generic debug printed line that's hard coded (i.e. the token is there even though it says none found) or if it actually didn't find a token, but it is in the DoNotStarveTogether folder and the cluster folder. This is on a computer running Linux Mint

Share this post


Link to post
Share on other sites
alainmcd    889

@canada11, welcome to the forums!

It doesn't matter if the Caves or Master server is started first, the server.ini file for your Master server will be set up appropriately (is_master = true) when creating the cluster.

A little testing suggests E_INVALID_TOKEN is shown if there's no cluster_token.txt in the cluster folder or if the file is empty, and E_EXPIRED_TOKEN if the token is invalid. Also note that I originally wrote in the guide that the token file should be named cluster_token.ini instead of the correct cluster_token.txt, I've corrected it. If moving/copying the file to your cluster folder doesn't work, I can only suggest generating anoter code by login into the game, pressing the Account button, then the Generate Server Token button and pasting the new code into the cluster_token.txt file in your cluster folder. Other than that I can't think of anything else.

Share this post


Link to post
Share on other sites
canada11    0

Figured it out for my issue: If anyone has this in the future: I was getting the invalid token issue because way at the top of the logs that print out when the server starts it had a couple errors that it then responded to by making the default persistent storage Cluster_1, and for me I had nothing there so the error was correct in saying there was no cluster_token.txt file there, because there wasn't! An error made it default to the Cluster_1 folder interestingly enough.

Thanks again @alainmcd for the great simple instructions! You should update the Linux instructions on the first post - they're wrong = ) (but close!)

Share this post


Link to post
Share on other sites
alainmcd    889

@Soulk, it should.

@Scrubberinos, something's preventing your server from launching. Usually it's either a mod crashing (try hosting a world without mods) or the ports are already in use (could be an instance of the dedicated server tool running, for example). If you're still having issues, post your client_log.txt (Documents\Klei\DoNotStarveTogether\client_log.txt) and your master server's server_log.txt (Documents\Klei\DoNotStarveTogether\Cluster_5\Master\server_log.txt).

Share this post


Link to post
Share on other sites
Darklokey    16

Works well enough for just me, except that no one besides me can join caves. Which is terrible, always had this issue since caves came out, anyone with the same problem got any help?

Share this post


Link to post
Share on other sites
Zillvr    1,634

Hey @Darklokey do your players get the "something went awry while connect..." window prompt? If so, try and add DST to your antivirus whitelist and see if other players would be able to join the caves then. If still not, ask them to do the same. Cause doing so fixed it for this other person:

 

Share this post


Link to post
Share on other sites
lilmist    0

Hey I need help! I was in the server seemed to work fine, then it said something about my mods not working properly so I opt to disable them and then all of sudden it crashed and now when I try to get back in I don't see it anywhere and neither to my friends, and now under cave it says: [00:14:24]: [Skin Announcement] LiLMist body_trimmed_blouse_yellow_flax
[00:15:53]: [Shard] Error while registering slave server: AUTH_ERROR_E_EXPIRED_TOKEN
[00:16:42]: [Death Announcement] LiLMist was killed by Starvation. He became a spooky ghost!
[00:18:51]: [Leave Announcement] LiLMist
[00:18:53]: Sim paused
[00:20:53]: [Shard] Error while registering slave server: AUTH_ERROR_E_EXPIRED_TOKEN
[00:25:53]: [Shard] Error while registering slave server: AUTH_ERROR_E_EXPIRED_TOKEN
[00:30:21]: [200] Account Failed (6): "E_EXPIRED_TOKEN"
[00:30:21]: [Connect] PendingConnection::Reset(true)
[00:30:53]: [Shard] Error while registering slave server: AUTH_ERROR_E_EXPIRED_TOKEN
[00:35:53]: [Shard] Error while registering slave server: AUTH_ERROR_E_EXPIRED_TOKEN

Then under Master it says: 

[00:16:42]: [Death Announcement] LiLMist was killed by Starvation. He became a spooky ghost!
[00:16:43]: Could not find anim [death] in bank [ghost]
[00:16:43]: Serializing user: session/79B42B2191F3D70B/A7I9UU3JAV1A/0000000008
[00:18:52]: [Steam] SendUserDisconnect for '76561198205540765'
[00:18:51]: [Leave Announcement] LiLMist
[00:18:52]: Connection lost to 192.168.1.74|56870 <381996121624997952>
[00:18:52]: [Shard] (KU_IVU7DNmg) disconnected from [SHDMASTER](1)
[00:18:53]: Serializing user: session/79B42B2191F3D70B/A7I9UU3JAV1A/0000000008
[00:18:53]: Sim paused
[00:30:21]: [200] Account Failed (6): "E_EXPIRED_TOKEN"
[00:30:21]: [Connect] PendingConnection::Reset(true)
 

Also I didn't die by starvation? i got kicked out. 

help?

 

Share this post


Link to post
Share on other sites
lilmist    0
10 hours ago, alainmcd said:

Hi @lilmist, welcome to the forums!

Check the section "Help! E_INVALID_TOKEN or E_EXPIRED_TOKEN" in the OP.

Hi since I am way new to this, I do shutdown the server first right? then fix the token and then run it again? 

ok I think i have figured that out, but now when i go to run the RunDSTServer.bat do i need to go ahead and disconnect my current game/console window and run the file, then reopen the game? or can i leave it be and just run the bat file?

Share this post


Link to post
Share on other sites
lilmist    0

Hi Ok i think i have got it now thank you!, do you have a guide onto what to do if you need to remove or add mods? I don't want to mess anything up. 

Share this post


Link to post
Share on other sites
lilmist    0
1 hour ago, lilmist said:

Hi Ok i think i have got it now thank you!, do you have a guide onto what to do if you need to remove or add mods? I don't want to mess anything up. 

Ok so now I am having mod issues basically kicking me out or telling me that I need to either exit game or disable mods :( 

Share this post


Link to post
Share on other sites