Jump to content

[GUIDE] How to setup dedicated server with cave on Windows Server


Recommended Posts

This guide is for helping step by step to installed a dedicated server don't starve together with cave on Windows Server

 

Spoiler

I want to clarify that I will show my method to create a server on windows server,maybe it's not the best method,but at least it works fine, there are lots of ways to do this,

you can even make your own scripts, I just want to explain the installation with maximum information,I give just one example but you can customize your install as you wish

 

EDIT: im sorry but unfortunatly the forum doesn't accept many screenshot, I had to replace them with direct links

 

This tutorial is making on Windows Server 2008 R2 64 Bits,

I use VMware Workstation for make this guide,this software can virtualize any system

on your computer without change your current system,

so I don't use FTP client to transfer files as Filezilla or Flashfxp

but you can very well do for cluster.ini, server.ini, worldgenoverride.lua and other file

 

1) create user and install SteamCMD:

you need to create user and connect with him on your windows server:

login with account Administrator of your windows server for create user

 

Spoiler

Start => Control panel => User account => User account => Manage Accounts => Create New Account

put dst_server (or other username if you want)
choose Administrator
create account
click on your new account
create a password

http://nsa37.casimages.com/img/2015/12/13/151213121550533120.jpg

http://nsa38.casimages.com/img/2015/12/13/151213122105963239.jpg

 

log off of the session Administrator and login with dst_server

create folder steamcmd in C:\ (you can do it on another partition if you have one)

download steamcmd in this folder

 

Spoiler

go in local disk (C:)
click on New Folder
put steamcmd for name of this folder
go in folder steamcmd
download steamcmd: http://media.steampowered.com/installer/steamcmd.zip
extract steamcmd in same folder

http://nsa38.casimages.com/img/2015/12/13/151213021753593923.jpg

http://nsa37.casimages.com/img/2015/12/13/151213020333388595.jpg

http://nsa37.casimages.com/img/2015/12/13/151213021234448008.jpg

http://nsa37.casimages.com/img/2015/12/13/151213021332157593.jpg

 

2) Install the files for server don't starve together with SteamCMD

so you just need to execute software steamcmd in folder steamcmd

and install the server don't starve together in new folder with name server

 

 

3) script for start server Overworld and Cave

you need to create two batch files for start two instances for each of the servers (start.bat and start2.bat)

so you need to go in folder of the server and create two batch files

 

Spoiler

go in C:\server\bin
create Text Document
Open New Text Document

add this:
dontstarve_dedicated_server_nullrenderer -console -cluster MyDediServer -shard Master

save with this name: start.bat

stay in start.bat

add this:

dontstarve_dedicated_server_nullrenderer -console -cluster MyDediServer -shard Caves

save with this name: start2.bat

close the Text Document
now you can see you have your both batch files (start.bat and start2.bat)

http://nsa37.casimages.com/img/2015/12/13/1512130335218437.jpg

http://nsa38.casimages.com/img/2015/12/13/151213033525270900.jpg

http://nsa37.casimages.com/img/2015/12/13/151213033525150939.jpg

http://nsa38.casimages.com/img/2016/02/14/160214050626200241.jpg

http://nsa38.casimages.com/img/2016/02/14/160214051857262565.jpg

http://nsa38.casimages.com/img/2015/12/13/15121311402178943.jpg

http://nsa38.casimages.com/img/2016/02/15/160215110136904627.jpg

http://nsa37.casimages.com/img/2016/02/14/160214051857347828.jpg

http://nsa38.casimages.com/img/2015/12/13/15121311441082156.jpg

http://nsa37.casimages.com/img/2016/02/14/160214052045896148.jpg

 

here the option list for command line:

 

Spoiler

-persistent_storage_root

  • Change the directory that your configuration directory resides in. This should be an absolute path. The full path to your files will be <persistent_storage_root>/<conf_dir>/ where <conf_dir> is the value set by -conf_dir. The default for this option depends on the platform:
  • 
    Windows: <Your documents folder>/Klei
    Mac OSX: <Your home folder>/Documents/Klei
    Linux: ~/.klei

-conf_dir

  • Change the name of your configuration directory. This name should not contain any slashes. The full path to your files will be <persistent_storage_root>/<conf_dir> where <persistent_storage_root> is the value set by the -persistent_storage_root option. The default is: "DoNotStarveTogether".

-cluster

  • Set the name of the cluster directory that this server will use. The server will expect to find the cluster.ini file in the following location: <persistent_storage_root>/<conf_dir>/<cluster>/cluster.ini, where <persistent_storage_root> and <conf_dir> are the values set by the -persistent_storage_root and -conf_dir options. The default is "Cluster_1".

-shard

  • Set the name of the shard directory that this server will use. The server will expect to find the server.ini file in the following location:<persistent_storage_root>/<conf_dir>/<cluster>/<shard>/server.ini, where <persistent_storage_root>, <conf_dir>, and <cluster> are the values set by the -persistent_storage_root, -conf_dir, and -cluster options. The default is "Master".

-offline

  • Start the server in offline mode. In offline mode, the server will not be listed publicly, only players on the local network will be able to join, and any steam-related functionality will not work.

-console

  • Allow lua commands to be entered in the command prompt or terminal that the server is running in.

-bind_ip  <bind_ip>

  • Change the address that the server binds to when listening for player connections. This is an advanced feature that most people will not need to use.

-port <port_number>

  • Valid values: 1..65535
  • The UDP port that this server will listen for connections on. This option overrides the [NETWORK] / server_port setting in server.ini. If you are running a multi-level cluster, this port must be different for each server. This port must be between 10998 and 11018 inclusive in order for players on the same LAN to see it in their server listing. Ports below 1024 are restricted to privileged users on some operating systems.

-players <max_players>

  • Valid values: 1..64
  • Set the maximum number of players that will be allowed to join the game. This option overrides the [GAMEPLAY] / max_players setting in cluster.ini.

-steam_master_server_port <port_number>

  • Valid values: 1..65535
  • Internal port used by steam. This option overrides the [STEAM] / master_server_port setting in server.ini. Make sure that this is different for each server you run on the same machine.

-steam_authentication_port <port_number>

  • Valid values: 1..65535
  • Internal port used by steam. This option overrides the [STEAM] / authentication_port setting in server.ini. Make sure that this is different for each server you run on the same machine.

-backup_logs

  • Create a backup of the previous log files each time the server is run. The backups will be stored in a directory called "backup" in the same directory as server.ini.

-tick <tick_rate>

  • Valid values: 15 .. 60
  • This is the number of times per-second that the server sends updates to clients. Increasing this may improve precision, but will result in more network traffic. This option overrides the [NETWORK] / tick_rate setting in cluster.ini. It is recommended to leave this at the default value of 15. If you do change this option, it is recommended that you do so only for LAN games, and use a number evenly divisible into 60 (15, 20, 30).

 

4) now we going start and stop both server (it's going create settings folder Master and Caves)

you can launch both batch files for create Server Overworld (folder Master) and Server Cave (folder Caves)

 

Spoiler

execute start.bat and start2.bat
stop both MS-DOS prompt when you have "your server will not start"

http://nsa38.casimages.com/img/2015/12/13/151213035120918865.jpg

 

5) you need to settings both servers with cluster_token.txt, server.ini, worldgenoverride.lua

for find your token you just need to launch your game and go in your account info:

 

Spoiler

Go in Play

http://nsa38.casimages.com/img/2015/11/30/151130064422755494.jpg


Go in account info

http://nsa37.casimages.com/img/2015/11/30/151130064424523321.jpg

http://nsa37.casimages.com/img/2015/11/30/151130064419817130.jpg


now you can see your token (Klei Dedicated Server Token)
if you don't see your token, you just need to add in the white box Klei Dedicated Server Token and click on Generate Server Token
note and keep your token for use to the next step

 

 

6) so now we going put your token in cluster_token.txt

the token is mandatory without him your server can not be online, it allows for Klei to have the option to remove the server in case of violation or problem with this server

 

Spoiler

go in Documents\Klei\DoNotStarveTogether\MyDediServer
create Text Document
rename this file as: cluster_token.txt
open the cluster_token.txt
add your token in this file
save the file and quit

http://nsa38.casimages.com/img/2016/02/14/160214055107346549.jpg

http://nsa37.casimages.com/img/2016/02/14/160214055257101694.jpg

http://nsa37.casimages.com/img/2016/02/14/160214055519240681.jpg

http://nsa37.casimages.com/img/2016/02/14/160214055701695746.jpg

 

7) now you going add worldgenoverride.lua on both servers

worldgenoverride.lua represents the settings to generate the world for don't starve together, so you can adjust the season, monsters, or biomes and more

 

Server Overworld:

 

Spoiler

go in Documents\Klei\DoNotStarveTogether\MyDediServer\Master
create Text Document
open New Text Document
add this in this file:

return {
	override_enabled = true,
	preset = "SURVIVAL_TOGETHER", 			-- "SURVIVAL_TOGETHER", "MOD_MISSING", "SURVIVAL_TOGETHER_CLASSIC", "SURVIVAL_DEFAULT_PLUS", "COMPLETE_DARKNESS", "DST_CAVE", "DST_CAVE_PLUS"
	overrides = {
		-- MISC
		task_set = "default", 			-- "classic", "default", "cave_default"
		start_location = "default", 			-- "caves", "default", "plus", "darkness"
		world_size = "default", 			-- "small", "medium", "default", "huge"
		branching = "default", 			-- "never", "least", "default", "most"
		loop = "default", 			-- "never", "default", "always"
		autumn = "default", 			-- "noseason", "veryshortseason", "shortseason", "default", "longseason", "verylongseason", "random"
		winter = "default", 			-- "noseason", "veryshortseason", "shortseason", "default", "longseason", "verylongseason", "random"
		spring = "default", 			-- "noseason", "veryshortseason", "shortseason", "default", "longseason", "verylongseason", "random"
		summer = "default", 			-- "noseason", "veryshortseason", "shortseason", "default", "longseason", "verylongseason", "random"
		season_start = "default", 			-- "default", "winter", "spring", "summer", "autumnorspring", "winterorsummer", "random"
		day = "default", 			-- "default", "longday", "longdusk", "longnight", "noday", "nodusk", "nonight", "onlyday", "onlydusk", "onlynight"
		weather = "default", 			-- "never", "rare", "default", "often", "always"
		earthquakes = "default", 			-- "never", "rare", "default", "often", "always"
		lightning = "default", 			-- "never", "rare", "default", "often", "always"
		frograin = "default", 			-- "never", "rare", "default", "often", "always"
		wildfires = "default", 			-- "never", "rare", "default", "often", "always"
		touchstone = "default", 			-- "never", "rare", "default", "often", "always"
		regrowth = "default", 			-- "veryslow", "slow", "default", "fast", "veryfast"
		cavelight = "default", 			-- "veryslow", "slow", "default", "fast", "veryfast"
		boons = "default", 			-- "never", "rare", "default", "often", "always"
		prefabswaps_start = "default", 			-- "classic", "default", "highly random"
		prefabswaps = "default", 			-- "none", "few", "default", "many", "max"

		-- RESOURCES
		flowers = "default", 			-- "never", "rare", "default", "often", "always"
		grass = "default", 			-- "never", "rare", "default", "often", "always"
		sapling = "default", 			-- "never", "rare", "default", "often", "always"
		marshbush = "default", 			-- "never", "rare", "default", "often", "always"
		tumbleweed = "default", 			-- "never", "rare", "default", "often", "always"
		reeds = "default", 			-- "never", "rare", "default", "often", "always"
		trees = "default", 			-- "never", "rare", "default", "often", "always"
		flint = "default", 			-- "never", "rare", "default", "often", "always"
		rock = "default", 			-- "never", "rare", "default", "often", "always"
		rock_ice = "default", 			-- "never", "rare", "default", "often", "always"
		meteorspawner = "default", 			-- "never", "rare", "default", "often", "always"
		meteorshowers = "default", 			-- "never", "rare", "default", "often", "always"
		mushtree = "default", 			-- "never", "rare", "default", "often", "always"
		fern = "default", 			-- "never", "rare", "default", "often", "always"
		flower_cave = "default", 			-- "never", "rare", "default", "often", "always"
		wormlights = "default", 			-- "never", "rare", "default", "often", "always"

		-- UNPREPARED
		berrybush = "default", 			-- "never", "rare", "default", "often", "always"
		carrot = "default", 			-- "never", "rare", "default", "often", "always"
		mushroom = "default", 			-- "never", "rare", "default", "often", "always"
		cactus = "default", 			-- "never", "rare", "default", "often", "always"
		banana = "default", 			-- "never", "rare", "default", "often", "always"
		lichen = "default", 			-- "never", "rare", "default", "often", "always"

		-- ANIMALS
		rabbits = "default", 			-- "never", "rare", "default", "often", "always"
		moles = "default", 			-- "never", "rare", "default", "often", "always"
		butterfly = "default", 			-- "never", "rare", "default", "often", "always"
		birds = "default", 			-- "never", "rare", "default", "often", "always"
		buzzard = "default", 			-- "never", "rare", "default", "often", "always"
		catcoon = "default", 			-- "never", "rare", "default", "often", "always"
		perd = "default", 			-- "never", "rare", "default", "often", "always"
		pigs = "default", 			-- "never", "rare", "default", "often", "always"
		lightninggoat = "default", 			-- "never", "rare", "default", "often", "always"
		beefalo = "default", 			-- "never", "rare", "default", "often", "always"
		beefaloheat = "default", 			-- "never", "rare", "default", "often", "always"
		hunt = "default", 			-- "never", "rare", "default", "often", "always"
		alternatehunt = "default", 			-- "never", "rare", "default", "often", "always"
		penguins = "default", 			-- "never", "rare", "default", "often", "always"
		cave_ponds = "default", 			-- "never", "rare", "default", "often", "always"
		ponds = "default", 			-- "never", "rare", "default", "often", "always"
		bees = "default", 			-- "never", "rare", "default", "often", "always"
		angrybees = "default", 			-- "never", "rare", "default", "often", "always"
		tallbirds = "default", 			-- "never", "rare", "default", "often", "always"
		slurper = "default", 			-- "never", "rare", "default", "often", "always"
		bunnymen = "default", 			-- "never", "rare", "default", "often", "always"
		slurtles = "default", 			-- "never", "rare", "default", "often", "always"
		rocky = "default", 			-- "never", "rare", "default", "often", "always"
		monkey = "default", 			-- "never", "rare", "default", "often", "always"

		-- MONSTERS
		spiders = "default", 			-- "never", "rare", "default", "often", "always"
		cave_spiders = "default", 			-- "never", "rare", "default", "often", "always"
		hounds = "default", 			-- "never", "rare", "default", "often", "always"
		houndmound = "default", 			-- "never", "rare", "default", "often", "always"
		merm = "default", 			-- "never", "rare", "default", "often", "always"
		tentacles = "default", 			-- "never", "rare", "default", "often", "always"
		chess = "default", 			-- "never", "rare", "default", "often", "always"
		lureplants = "default", 			-- "never", "rare", "default", "often", "always"
		walrus = "default", 			-- "never", "rare", "default", "often", "always"
		liefs = "default", 			-- "never", "rare", "default", "often", "always"
		deciduousmonster = "default", 			-- "never", "rare", "default", "often", "always"
		krampus = "default", 			-- "never", "rare", "default", "often", "always"
		bearger = "default", 			-- "never", "rare", "default", "often", "always"
		deerclops = "default", 			-- "never", "rare", "default", "often", "always"
		goosemoose = "default", 			-- "never", "rare", "default", "often", "always"
		dragonfly = "default", 			-- "never", "rare", "default", "often", "always"
		bats = "default", 			-- "never", "rare", "default", "often", "always"
		fissure = "default", 			-- "never", "rare", "default", "often", "always"
		worms = "default", 			-- "never", "rare", "default", "often", "always"
	},
}

now you need to save your file with this name: worldgenoverride.lua (check screenshots) after that you can delete New Text Document

http://nsa37.casimages.com/img/2016/02/14/160214061454349520.jpg

http://nsa38.casimages.com/img/2016/02/14/160214061455398598.jpg

http://nsa38.casimages.com/img/2016/03/03/160303051413976821.jpg

http://nsa37.casimages.com/img/2016/03/03/160303051411454821.jpg

http://nsa38.casimages.com/img/2016/02/14/160214061455112600.jpg

 

Server Cave:

 

Spoiler

go in Documents\Klei\DoNotStarveTogether\MyDediServer\Caves
create Text Document
open New Text Document
add this in this file:

return {
	override_enabled = true,
	preset = "DST_CAVE", 			        -- "SURVIVAL_TOGETHER", "MOD_MISSING", "SURVIVAL_TOGETHER_CLASSIC", "SURVIVAL_DEFAULT_PLUS", "COMPLETE_DARKNESS", "DST_CAVE", "DST_CAVE_PLUS"
	overrides = {
		-- MISC
		task_set = "cave_default", 		-- "classic", "default", "cave_default"
		start_location = "default", 			-- "caves", "default", "plus", "darkness"
		world_size = "default", 			-- "small", "medium", "default", "huge"
		branching = "default", 			-- "never", "least", "default", "most"
		loop = "default", 			-- "never", "default", "always"
		autumn = "default", 			-- "noseason", "veryshortseason", "shortseason", "default", "longseason", "verylongseason", "random"
		winter = "default", 			-- "noseason", "veryshortseason", "shortseason", "default", "longseason", "verylongseason", "random"
		spring = "default", 			-- "noseason", "veryshortseason", "shortseason", "default", "longseason", "verylongseason", "random"
		summer = "default", 			-- "noseason", "veryshortseason", "shortseason", "default", "longseason", "verylongseason", "random"
		season_start = "default", 			-- "default", "winter", "spring", "summer", "autumnorspring", "winterorsummer", "random"
		day = "default", 			-- "default", "longday", "longdusk", "longnight", "noday", "nodusk", "nonight", "onlyday", "onlydusk", "onlynight"
		weather = "default", 			-- "never", "rare", "default", "often", "always"
		earthquakes = "default", 			-- "never", "rare", "default", "often", "always"
		lightning = "default", 		        -- "never", "rare", "default", "often", "always"
		frograin = "default", 		        -- "never", "rare", "default", "often", "always"
		wildfires = "default", 			-- "never", "rare", "default", "often", "always"
		touchstone = "default", 			-- "never", "rare", "default", "often", "always"
		regrowth = "default", 			-- "veryslow", "slow", "default", "fast", "veryfast"
		cavelight = "default", 			-- "veryslow", "slow", "default", "fast", "veryfast"
		boons = "default", 			-- "never", "rare", "default", "often", "always"
		prefabswaps_start = "default", 		        -- "classic", "default", "highly random"
		prefabswaps = "default", 		        -- "none", "few", "default", "many", "max"

		-- RESOURCES
		flowers = "default", 			-- "never", "rare", "default", "often", "always"
		grass = "default", 			-- "never", "rare", "default", "often", "always"
		sapling = "default", 			-- "never", "rare", "default", "often", "always"
		marshbush = "default", 			-- "never", "rare", "default", "often", "always"
		tumbleweed = "default", 			-- "never", "rare", "default", "often", "always"
		reeds = "default", 			-- "never", "rare", "default", "often", "always"
		trees = "default", 			-- "never", "rare", "default", "often", "always"
		flint = "default", 			-- "never", "rare", "default", "often", "always"
		rock = "default", 			-- "never", "rare", "default", "often", "always"
		rock_ice = "default", 			-- "never", "rare", "default", "often", "always"
		meteorspawner = "default", 			-- "never", "rare", "default", "often", "always"
		meteorshowers = "default", 			-- "never", "rare", "default", "often", "always"
		mushtree = "default", 			-- "never", "rare", "default", "often", "always"
		fern = "default", 			-- "never", "rare", "default", "often", "always"
		flower_cave = "default", 			-- "never", "rare", "default", "often", "always"
		wormlights = "default", 			-- "never", "rare", "default", "often", "always"

		-- UNPREPARED
		berrybush = "default", 			-- "never", "rare", "default", "often", "always"
		carrot = "default", 			-- "never", "rare", "default", "often", "always"
		mushroom = "default", 			-- "never", "rare", "default", "often", "always"
		cactus = "default", 			-- "never", "rare", "default", "often", "always"
		banana = "default", 			-- "never", "rare", "default", "often", "always"
		lichen = "default", 			-- "never", "rare", "default", "often", "always"

		-- ANIMALS
		rabbits = "default", 			-- "never", "rare", "default", "often", "always"
		moles = "default", 			-- "never", "rare", "default", "often", "always"
		butterfly = "default", 			-- "never", "rare", "default", "often", "always"
		birds = "default", 			-- "never", "rare", "default", "often", "always"
		buzzard = "default", 			-- "never", "rare", "default", "often", "always"
		catcoon = "default", 			-- "never", "rare", "default", "often", "always"
		perd = "default", 			-- "never", "rare", "default", "often", "always"
		pigs = "default", 			-- "never", "rare", "default", "often", "always"
		lightninggoat = "default", 			-- "never", "rare", "default", "often", "always"
		beefalo = "default", 			-- "never", "rare", "default", "often", "always"
		beefaloheat = "default", 			-- "never", "rare", "default", "often", "always"
		hunt = "default", 			-- "never", "rare", "default", "often", "always"
		alternatehunt = "default", 			-- "never", "rare", "default", "often", "always"
		penguins = "default", 		        -- "never", "rare", "default", "often", "always"
		cave_ponds = "default", 			-- "never", "rare", "default", "often", "always"
		ponds = "default", 			-- "never", "rare", "default", "often", "always"
		bees = "default", 			-- "never", "rare", "default", "often", "always"
		angrybees = "default", 		        -- "never", "rare", "default", "often", "always"
		tallbirds = "default", 		        -- "never", "rare", "default", "often", "always"
		slurper = "default", 			-- "never", "rare", "default", "often", "always"
		bunnymen = "default", 			-- "never", "rare", "default", "often", "always"
		slurtles = "default", 			-- "never", "rare", "default", "often", "always"
		rocky = "default", 			-- "never", "rare", "default", "often", "always"
		monkey = "default", 			-- "never", "rare", "default", "often", "always"

		-- MONSTERS
		spiders = "default", 			-- "never", "rare", "default", "often", "always"
		cave_spiders = "default", 			-- "never", "rare", "default", "often", "always"
		hounds = "default", 			-- "never", "rare", "default", "often", "always"
		houndmound = "default", 			-- "never", "rare", "default", "often", "always"
		merm = "default", 			-- "never", "rare", "default", "often", "always"
		tentacles = "default", 			-- "never", "rare", "default", "often", "always"
		chess = "default", 			-- "never", "rare", "default", "often", "always"
		lureplants = "default", 			-- "never", "rare", "default", "often", "always"
		walrus = "default", 			-- "never", "rare", "default", "often", "always"
		liefs = "default", 			-- "never", "rare", "default", "often", "always"
		deciduousmonster = "default", 			-- "never", "rare", "default", "often", "always"
		krampus = "default", 			-- "never", "rare", "default", "often", "always"
		bearger = "default", 			-- "never", "rare", "default", "often", "always"
		deerclops = "default", 		        -- "never", "rare", "default", "often", "always"
		goosemoose = "default", 			-- "never", "rare", "default", "often", "always"
		dragonfly = "default", 		        -- "never", "rare", "default", "often", "always"
		bats = "default", 			-- "never", "rare", "default", "often", "always"
		fissure = "default", 			-- "never", "rare", "default", "often", "always"
		worms = "default", 			-- "never", "rare", "default", "often", "always"
	},
}

now you need to save your file with this name: worldgenoverride.lua (check screenshots) after that you can delete New Text Document

http://nsa37.casimages.com/img/2016/02/14/160214064940444290.jpg

http://nsa38.casimages.com/img/2016/02/14/160214064941502777.jpg

http://nsa38.casimages.com/img/2016/03/03/160303051525991164.jpg

http://nsa38.casimages.com/img/2016/03/03/160303051523544485.jpg

http://nsa38.casimages.com/img/2016/02/14/160214064941724329.jpg

 

8) create and configure cluster.ini and server.ini

 

cluster.ini have settings of the server (server name, slots, gametype,)

 

here the option list cluster.ini:

 

Spoiler

[MISC]

max_snapshots

  • Default: 6
  • Maximum number of snapshots to retain. These snapshots are created every time a save occurs, and are available in the “Rollback” tab on the “Host Game” screen.

[SHARD]

shard_enabled

  • Default: false
  • Enable server sharding. This must be set to true for multi-level servers. For single-level servers, it can be omitted.

bind_ip

  • Overridable in server.ini
  • Default: 127.0.0.1
  • Required: If shard_enabled = true and is_master = true
  • This is the network address the master server will listen on for other shard servers to connect to. Set this to 127.0.0.1 if all of your servers in your cluster are on the same machine, or 0.0.0.0 if the servers in your cluster are on different machines. This only needs to be set for the master server, either in cluster.ini, or the master server's server.ini.

master_ip

  • Overridable in server.ini
  • Default: none
  • Required: If shard_enabled = true and is_master = false
  • This is the I.P. address that a non-master shard will use when trying to connect to the master shard. If all servers in a cluster are on the same machine, set this to 127.0.0.1

master_port

  • Overridable in server.ini
  • Default: 10888
  • This is UDP port that the master server will listen on, and that a non-master shard will use when trying to connect to the master shard. This should be set to the same value for all shards by having a single entry in cluster.ini, or omitted completely to use the default.

cluster_key

  • Overridable in server.ini
  • Default: none
  • Required if shard_enabled = true
  • This is a password used to authenticate a slave server to the master. If you are running servers on different machines that need to connect to each other, this value must be the same on each machine. For servers running on the same machine, you can just set this once in cluster.ini.

[STEAM]

steam_group_only

  • Default: false
  • When set to true, the server will only allow connections from players belonging to the steam group listed in the steam_group_id setting.

steam_group_id

steam_group_admins

  • Default: false
  • When this is set to true, admins of the steam group specified in steam_group_id will also have admin status on the server. 

[NETWORK]

offline_server

  • Default: false
  • Create an offline server. The server will not be listed publicly, and only players on the local network will be able to join, and any steam-related functionality will not work.

tick_rate

  • Default: 15
  • This is the number of times per-second that the server sends updates to clients. Increasing this may improve precision, but will result in more network traffic.

whitelist_slots

  • Default: 0
  • The number of reserved slots for whitelisted players. To whitelist a player, add their Klei UserId to the whitelist.txt file (Place this file in the same directory as cluster.ini)

cluster_password

  • Default: none
  • This is the password that players must enter to join your server. Leave this blank or omit it for no password.

cluster_name

  • The name for your server cluster. This is the name that will show up in server browser.

cluster_description

  • Default: empty
  • Cluster description. This will show up in the server details area on the “Browse Games” screen.

lan_only_cluster

  • Default: false
  • When set to true, the server will only accept connections from machines on the same LAN 

cluster_intention

  • Default: Varies, depending on game mode.
  • The cluster’s playstyle. This field is the equivalent of the “Server Playstyle” field on the “Host Game” screen. Valid values are cooperative, competitive, social, or madness.

[GAMEPLAY]

max_players

  • Default: 16
  • The maximum number of players that may be connected to the cluster at one time.

pvp

  • Default: false
  • Enable PVP.

game_mode

  • Default: survival
  • The cluster’s game mode. This field is the equivalent of the “Game Mode” field on the “Host Game” screen. Valid values are survival, endless or wilderness

pause_when_empty

  • Default: false
  • Pause the server when there are no players connected.

vote_kick_enabled

  • Default: false
  • Set to true to enable the “Vote to Kick” feature.

 

server.ini have settings for each server (server ports,steam port,activated master or slave)

 

here the option list server.ini:

 

Spoiler

[SHARD]

is_master

  • Default: none
  • Required: If shard_enabled = true
  • Sets a shard to be the master shard for a cluster. There must be exactly one master server per cluster. Set this to true in your master server’s server.ini, and false in every other server.ini.

name

  • Default: none
  • Required: if shard_enabled = true and is_master = false
  • This is the name of the shard that will show up in log files. It is ignored for the master server, which always has the name [SHDMASTER].

id

  • Default: Randomly generated number.
  • This is field is automatically generated for non-master servers, and is used internally to uniquely identify a server. Altering this or removing it may cause problems on your server if anybody’s character currently resides in the world that this server manages.

[STEAM]

authentication_port

  • Default: 8766
  • Internal port used by steam. Make sure that this is different for each server you run on the same machine.

master_server_port

  • Default: 27016
  • Internal port used by steam. Make sure that this is different for each server you run on the same machine.

[NETWORK]

server_port

  • Default: 10999
  • The UDP port that this server will listen for connections on. If you are running a multi-level cluster, this port must be different for each server. This port must be between 10998 and 11018 inclusive in order for players on the same LAN to see it in their server listing. Ports below 1024 are restricted to privileged users on some operating systems.

 

I'll just going give sample configuration about settings for both servers

 

cluster.ini:

 

Spoiler

go in Documents\Klei\DoNotStarveTogether\MyDediServer\
create Text Document
add this in this file:

[GAMEPLAY]
game_mode = survival
max_players = 10
pvp = false
pause_when_empty = true
 
[NETWORK]
cluster_name = TEST Server
cluster_description = Welcome
cluster_password =
cluster_intention = social
autosaver_enabled = true
enable_vote_kick = false

[MISC]
console_enabled = true
 
[SHARD]
shard_enabled = true
bind_ip = 127.0.0.1
master_ip = 127.0.0.1
master_port = 11001
cluster_key = dst

now you need to save your file with this name: cluster.ini (check screenshots) after that you can delete New Text Document

http://nsa38.casimages.com/img/2016/02/14/160214084635163657.jpg

http://nsa38.casimages.com/img/2016/02/14/160214084635544949.jpg

http://nsa38.casimages.com/img/2016/02/14/160214084854404745.jpg

http://nsa38.casimages.com/img/2016/02/14/160214084854514050.jpg

http://nsa37.casimages.com/img/2016/02/14/160214084854790650.jpg

 

server.ini for server Overworld:

 

Spoiler

go in Documents\Klei\DoNotStarveTogether\MyDediServer\Master
create Text Document
and add this: 

[NETWORK]
server_port = 10999


[SHARD]
is_master = true


[STEAM]
master_server_port = 12346
authentication_port = 12345

now you need to save your file with this name: server.ini (check screenshots) after that you can delete New Text Document

http://nsa38.casimages.com/img/2016/02/14/160214073231353416.jpg

http://nsa37.casimages.com/img/2016/02/14/160214073232231141.jpg

http://nsa37.casimages.com/img/2016/02/14/160214085527262691.jpg

http://nsa38.casimages.com/img/2016/02/14/160214085527372512.jpg

http://nsa38.casimages.com/img/2016/02/14/160214085527681145.jpg

 

server.ini for server Caves:

 

Spoiler

go in Documents\Klei\DoNotStarveTogether\MyDediServer\Caves
create Text Document
add this:

[NETWORK]
server_port = 11000


[SHARD]
is_master = false
name = Caves


[STEAM]
master_server_port = 12348
authentication_port = 12347

now you need to save your file with this name: server.ini (check screenshots) after that you can delete New Text Document

http://nsa37.casimages.com/img/2016/02/14/16021407544684964.jpg

http://nsa38.casimages.com/img/2016/02/14/160214075446998871.jpg

http://nsa37.casimages.com/img/2016/02/14/160214090025382271.jpg

http://nsa37.casimages.com/img/2016/02/14/160214090025975009.jpg

http://nsa38.casimages.com/img/2016/02/14/160214090026106502.jpg

 

9) Testing both servers

 

Spoiler

just need to execute start.bat and start2.bat for see if servers works or not

go in C:\server\bin
execute start.bat and start2.bat
check the log if both servers work together (check screenshots)
now go in the game for see if server is online
join the server and check if server overworld and cave works
if yes you can stop both servers for next step (close both MS-DOS prompt)

http://nsa37.casimages.com/img/2015/12/13/15121307520142015.jpg

http://nsa37.casimages.com/img/2016/02/14/160214090520828905.jpg

http://nsa38.casimages.com/img/2015/11/30/15113005072799970.jpg

http://nsa38.casimages.com/img/2015/11/30/151130050730741619.jpg

http://nsa37.casimages.com/img/2015/11/30/151130050731732392.jpg

 

if you have this error '[200] Account Failed (6): "E_EXPIRED_TOKEN"'

it's look like problem with token:

 

Do not simply copy and paste the contents of this file from one machine to another. Move the actual file from one machine to another.

 

The cluster_token.txt is a null byte terminated ASCII file (no line endings). If the GSA attempts to copy-paste the contents of the token file, the null byte will be omitted and a line ending will be appended to the end. The dedicated server software will not be able to properly parse the cluster_token.txt file in this case.

 

10) Create windows service for Batch Files

it's better to used a windows service rather than stay open DOS prompt

so we will create services for each batch file

by default, windows server can not create a service with a batch file, so let's use the software NSSM

you will quickly understanding, this is going to be very useful for next steps

 

Spoiler

download nssm: https://nssm.cc/release/nssm-2.24.zip
(i put on the desktop but you can place it where you want)

extract all in C:\
open DOS prompt run as administrator
make: cd C:\
make: cd nssm-2.24\win64\
now we can install service with this command: nssm install "name of service"

for server Overworld:

nssm install server_overworld

you just need to give some information about batch file and put your account
(check screenshots for how make this)

for server Cave:

nssm install server_cave

you just need to give some information about batch file and put your account
(check screenshots for how make this)

you can test the service now
we going test server overworld but before that, you can delete server_log and server_chatlog for testing
go in Documents\Klei\DoNotStarveTogether\MyDediServer\Master
delete server_log and server_chatlog
go in start => administrative tools => services
search service server_overworld, and start the service
check if server_log and server_chatlog is created in Documents\Klei\DoNotStarveTogether\MyDediServer\Master
of course you can check also if server start correctly in end of log
if yes that's mean services of both servers work correctly

PS: you can also start or stop service with DOS prompt run as administrator prompt:

net start server_overworld
net start server_cave

net stop server_overworld
net stop server_cave

Download and execute nssm:

http://nsa38.casimages.com/img/2015/12/13/151213093306340791.jpg

http://nsa38.casimages.com/img/2015/12/13/151213093307181037.jpg

http://nsa38.casimages.com/img/2015/12/13/151213113612565955.jpg

http://nsa38.casimages.com/img/2015/12/13/151213093307473998.jpg

http://nsa38.casimages.com/img/2015/12/13/151213093307565714.jpg

 

Install service for Server Overworld:

http://nsa37.casimages.com/img/2015/12/13/151213094018990487.jpg

http://nsa37.casimages.com/img/2015/12/13/151213093319798215.jpg

http://nsa37.casimages.com/img/2015/12/13/151213093308991276.jpg

http://nsa37.casimages.com/img/2015/12/13/151213093308529149.jpg

http://nsa37.casimages.com/img/2015/12/13/151213093308904474.jpg

Install service for Server Cave:

http://nsa37.casimages.com/img/2015/12/13/151213094019688719.jpg

http://nsa38.casimages.com/img/2015/12/13/151213093313180344.jpg

http://nsa38.casimages.com/img/2015/12/13/151213093310102333.jpg

http://nsa38.casimages.com/img/2015/12/13/151213093320201219.jpg

http://nsa38.casimages.com/img/2015/12/13/151213093313962621.jpg

http://nsa37.casimages.com/img/2015/12/13/151213093311465401.jpg

 

Testing Service:

http://nsa38.casimages.com/img/2015/12/13/151213093313440998.jpg

http://nsa37.casimages.com/img/2015/12/13/151213113851717623.jpg

http://nsa38.casimages.com/img/2015/12/13/15121309332337415.jpg

http://nsa38.casimages.com/img/2016/02/14/160214094413367660.jpg

 

Other solution for start or stop service for both servers:

http://nsa38.casimages.com/img/2015/12/13/151213093319329584.jpg

 

11) Create Batch Files for stop,update and start both servers

Now that our servers can run as a service, we will create a simple batch file who'll stop both servers then update servers and start the both servers

 

Spoiler

go in C:\server\bin
open New Text Document
add this: 

net stop server_overworld
net stop server_cave
cd C:\steamcmd\steamcmd
steamcmd +login anonymous +force_install_dir C:\server +app_update 343050 validate +quit
net start server_overworld
net start server_cave

save with this name: update.bat
execute update.bat run as administrator for see if it's works
you can delete New Text Document

(of course if both servers are already stopped
the batch file update.bat give error in the begin when he trying to stop both servers and it's normal 
and i have tested update.bat when both servers are running)

http://nsa38.casimages.com/img/2015/12/13/151213101300446270.jpg

http://nsa37.casimages.com/img/2015/12/13/151213101257424234.jpg

http://nsa38.casimages.com/img/2015/12/13/15121310125424325.jpg

http://nsa37.casimages.com/img/2015/12/13/151213101257540634.jpg

http://nsa37.casimages.com/img/2015/12/13/151213101300682991.jpg

http://nsa37.casimages.com/img/2015/12/13/151213101259916982.jpg

 

12) Create schedule task for Batch File update.bat

now we going create a task to execute update.bat daily at 6:00 am, I going show you a example but you do as you wish

 

Spoiler

click on start => administrative tools => task scheduler
click on create basic task 
put name of the task and description and click on next
choose Daily and click on next
when you create this task, choose well on the next day (depends when you make this task) 
choose 6:00:00 AM, and Recur every 1 days and click on next

choose start a program
go find and choose your update.bat in C:\server\bin and click on next
choose "Open The Properties dialog for this task when i click Finish"
choose Run with hightest privileges and click on OK

http://nsa37.casimages.com/img/2015/12/13/151213105736791379.jpg

http://nsa37.casimages.com/img/2015/12/13/151213105741917099.jpg

http://nsa37.casimages.com/img/2015/12/13/151213105737285967.jpg

http://nsa38.casimages.com/img/2015/12/13/151213105737378959.jpg

http://nsa37.casimages.com/img/2015/12/13/151213105737462746.jpg

http://nsa37.casimages.com/img/2015/12/13/151213105737659342.jpg

http://nsa38.casimages.com/img/2015/12/13/15121310573846373.jpg

http://nsa38.casimages.com/img/2015/12/13/151213105742158796.jpg

http://nsa37.casimages.com/img/2015/12/13/151213105742537079.jpg

http://nsa38.casimages.com/img/2015/12/13/151213105742989159.jpg

http://nsa37.casimages.com/img/2015/12/22/151222082513734838.jpg

both servers will be stopped, update, and executed every day at 6:00 am

 

I hope this guide is good for you and especially to help you for install server DST on windows server :grin:

 

---

 

I would like to thank everyone who helped me since I arrived in this community

and especially who taught me a lot about the functioning of servers and mods:

 

rezecib, Maris,Kzisor, DarkXero

bizziboi, Ipsquiggle, V2C, PeterA

 

and of course thx also all devs!

 

---

 

How to install and configure mods on dedicated server => coming soon

 

---

F.A.Q

 

How to reset the map on dedicated server?

 

Spoiler

when you are in your server DST:

 

press ù and write c_regenerateworld() and press tab and valid with enter

 

http://nsa37.casimages.com/img/2015/11/30/151130125256401857.jpg

 

How banned player if he is not on my dedicated server?

 

Spoiler

if some players report troll have destroy camp on your server but he is not on the server right now!

 

you can banned him with SteamID

 

so you just need name of player and find him in your log.txt:

 


Documents\Klei\DoNotStarveTogether\MyDediServer\Master\server_log.txt

 

http://nsa38.casimages.com/img/2015/11/30/151130011425762576.jpg

 

now you need copy this SteamID in blocklist.txt

 

create blocklist.txt here: Documents\Klei\DoNotStarveTogether\MyDediServer\blocklist.txt

 

just put the SteamID in blocklist.txt:

 

http://nsa38.casimages.com/img/2015/11/30/151130011730815581.jpg

 

now restart your server dedicated

go in start => administrative tools => services search service server_overworld, and restart the service

 

http://nsa37.casimages.com/img/2015/12/22/151222033926187436.jpg

 

check now in your server_log.txt if your blocklist.txt is loading correctly on your server:

 


Documents\Klei\DoNotStarveTogether\MyDediServer\Master\server_log.txt

 

you need to find this in your server_log.txt:

 


OnLoadPermissionList: Documents/Klei/DoNotStarveTogether/MyDediServer/blocklist.txt (Success)

 

so now if player try to join the server, he can't because he is banned!

 

i have make this test with my SteamID and you can see im banned on my server:

 

http://nsa38.casimages.com/img/2015/11/30/15113001000714431.jpg

 

so that's can works for all players

 

How add admin on your dedicated server?

 

Spoiler

so for add new admin on your server  

 

you need to create adminlist.txt here: Documents\Klei\DoNotStarveTogether\MyDediServer\adminlist.txt

 

you need to find KU_****** of player in log of your server:


Documents\Klei\DoNotStarveTogether\MyDediServer\Master\server_log.txt

( KU_***** matches its identifier on server don't starve together as SteamID on steam )

 

http://nsa37.casimages.com/img/2015/12/14/15121409383115633.jpg

 

now you need to add KU_***** in your adminlist.txt:

 

http://nsa37.casimages.com/img/2015/12/14/151214093946947326.jpg

 

restart your server:

 

go in start => administrative tools => services search service server_overworld, and restart the service

 

http://nsa37.casimages.com/img/2015/12/22/151222033926187436.jpg

 

check now in your server_log.txt if your adminlist.txt is loading correctly on your server:


Documents\Klei\DoNotStarveTogether\MyDediServer\Master\server_log.txt

you need to find this in your server_log.txt:


OnLoadUserIdList: APP:Klei/DoNotStarveTogether/MyDediServer/adminlist.txt (Success)

so now you can test with your friend if he have admin permission

 

you can see if your friend is admin on your server like the following screenshots:  

 

http://nsa38.casimages.com/img/2015/12/14/15121409450124383.jpg

http://nsa37.casimages.com/img/2015/12/14/151214094501625811.jpg

 

How to reserved slots on your dedicated server?

 

Spoiler

this allows to reserve a number of slots for your friends or an admin of server,

 

this based on number slots of your server example if you reserved 5 slots and you have 15 slots on your server only 10 players from public can connect on the server

 

so for my example i going put 2 slots on my server and going put 2 KU_***** in my whitelist.txt

 

you need to create whitelist.txt here: Documents\Klei\DoNotStarveTogether\MyDediServer\whitelist.txt

 

as adminlist.txt you need to find KU_***** in server_log.txt of your server:

 

http://nsa37.casimages.com/img/2015/12/14/15121409383115633.jpg

 

now you need to add KU_***** in your whitelist.txt:

 

http://nsa37.casimages.com/img/2015/12/14/15121409524339317.jpg

 

(i have add also another KU_***** of other friend for make this test)

 

so you need also to add this option in your settings.ini:

 

below of [NETWORK] add this:


whitelist_slots = 2

http://nsa38.casimages.com/img/2015/12/14/151214095601628381.jpg

 

now restart your server:

 

go in start => administrative tools => services search service server_overworld, and restart the service

 

http://nsa37.casimages.com/img/2015/12/22/151222033926187436.jpg

 

check now in your server_log.txt if your whitelist.txt is loading correctly on your server:


Documents\Klei\DoNotStarveTogether\MyDediServer\Master\server_log.txt

you need to find this in your server_log.txt:


OnLoadUserIdList: APP:Klei/DoNotStarveTogether/MyDediServer/whitelist.txt (Success)

so now you can test with your friend if reserved slots works

 

my friend connect on the server before me and then when I try to connect:

 

http://nsa38.casimages.com/img/2015/12/14/151214100040755671.jpg

 

that's mean your reserved slots work fine now

 

this was just an example, but you can change the number of slots as you want

 

Link to comment
Share on other sites

Hi @popwind

you have follow my guide? or you made the server in another way?

if make with my guide, can you share your server_log.txt of both server please?

Documents\Klei\DoNotStarveTogether\MyDediServer\Master\server_log.txt

Documents\Klei\DoNotStarveTogether\MyDediServer\Caves\server_log.txt

Link to comment
Share on other sites

Hey ToNi, I finally got my server working using your method and I've been playing happily for days. Now I'm recieving the same problem as the guy above. I've tried forcing the update using the update.bat but it won't seem to update. Could I manually update the server using steam command somehow?

 

Update: Fixed. I had to type in the commands that the update.bat file used into steamCMD manually. I don't know why it made a difference but it did.

Link to comment
Share on other sites

52 minutes ago, BeastNips said:

Update: Fixed. I had to type in the commands that the update.bat file used into steamCMD manually. I don't know why it made a difference but it did.

Hi @BeastNips

thx you very much for your feedback on my guide, I really appreciate

so you are forced to update server manually with SteamCMD right? my update.bat don't update correctly?

Link to comment
Share on other sites

5 hours ago, BeastNips said:

No but I don't understand how, because I'm typing exactly what is in the .bat into steamCMD anyway. I've probs made some sort of mistake with the .bat file so it isn't executing properly.

@BeastNips

do you remember the error with the .bat?

otherwise I have tested on my test server windows server 2012 R2
the .bat works correctly with me and I noticed no errors
and the server update is done correctly:

Spoiler

Old Version (166277):

160223043700408881.jpg

Update of server:

160223043701163037.jpg

server is updated with the last version for dedicated server (167083):

160223043701756658.jpg

here's what you need in your update.bat:

160223043658409822.jpg

(warning,executed update.bat with administrator rights, otherwise the servers will not be stopped or started correctly):

151213101300682991.jpg

if you have other problem or other questions, don't hesitate

Link to comment
Share on other sites

I'll take another look when I get back to the computer. I think the error will be on my part rather than yours. I don't get an error message, it just doesn't update. The update.bat opens SteamCMD as it should be it closes before I can see of the update commands are carried out. 

Link to comment
Share on other sites

On 2016/2/22 at 5:27 PM, ToNiO55 said:

@popwind

your dedicated server is on old version (166529)

the last version for dedicated server is 167083

you need update your server

thank you for your help
my servers are updated to the last  version 

after that my server worked ONCE,
so i get a new token for the cluster_token.txt

BUT only the cave server is up.

finally, my servers worked perpect  with another token!

Link to comment
Share on other sites

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.

×
  • Create New...