ToNiO55 Posted January 26, 2016 Share Posted January 26, 2016 This guide is for helping step by step to installed a dedicated server don't starve together with cave on Linux Spoiler I want to clarify that I will show my method to create a server on linux,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 Debian 8 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) you need install SteamCMD: install the dependencies required to run SteamCMD: Spoiler installing this package depends of your linux: if you have Ubuntu/Debian 64-Bit: apt-get install lib32gcc1 -- if you have RedHat/CentOS 32 Bit: yum install glibc libstdc++ yum -y install glibc.i686 yum install libcurl.so.4 yum install libstdc++.so.6 only if you have error with libcurl.so.4: cd /usr/lib ln -s libcurl.so.4 libcurl-gnutls.so.4 -- if you have RedHat/CentOS 64-Bit: yum install glibc.i686 libstdc++.i686 so im on Debian 64 bits: http://nsa37.casimages.com/img/2015/11/30/151130062646333057.jpg 2) create your user for your server don't starve together: Spoiler adduser dst http://nsa38.casimages.com/img/2015/11/30/151130062644232313.jpg 3) before download SteamCMD, you need install some dependencies for your server don't starve together: Spoiler dpkg --add-architecture i386 # If running a 64bit OS apt-get update apt-get install lib32gcc1 # If running a 64bit OS apt-get install lib32stdc++6 # If running a 64bit OS apt-get install libgcc1 # If running a 32bit OS apt-get install libcurl4-gnutls-dev:i386 http://nsa37.casimages.com/img/2015/11/30/151130062647154587.jpg http://nsa37.casimages.com/img/2015/11/30/151130062649780178.jpg http://nsa37.casimages.com/img/2015/11/30/151130062702164721.jpg http://nsa37.casimages.com/img/2015/11/30/151130062654321374.jpg http://nsa37.casimages.com/img/2015/11/30/151130062647873732.jpg 4) now you can login with your user and download SteamCMD: Spoiler su - dst wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz tar -xvzf steamcmd_linux.tar.gz mkdir server_dst http://nsa37.casimages.com/img/2015/11/30/151130062649224597.jpg 5) now you can installing SteamCMD: Spoiler ./steamcmd.sh login anonymous force_install_dir /home/dst/server_dst app_update 343050 validate quit http://nsa37.casimages.com/img/2015/11/30/15113006265222520.jpg http://nsa38.casimages.com/img/2015/11/30/151130062655297495.jpg 6) start server Overworld and Cave Spoiler you need to create two scripts for start two instances for each of the servers (start.sh and start2.sh) so i use text editor nano, but you can use other without problem when you are in nano, just write your text and for save and quit press CTRL + X and Y for valid this is for server Overworld: cd /home/dst/server_dst/bin nano start.sh ./dontstarve_dedicated_server_nullrenderer -console -cluster MyDediServer -shard Master http://nsa38.casimages.com/img/2015/11/30/151130062651222059.jpg http://nsa37.casimages.com/img/2016/02/14/160214053704931777.jpg this is for server Cave: Spoiler nano start2.sh ./dontstarve_dedicated_server_nullrenderer -console -cluster MyDediServer -shard Caves http://nsa38.casimages.com/img/2016/02/28/160228124707991512.jpg http://nsa38.casimages.com/img/2016/02/14/160214053705140076.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). 7) now we going start both server and stop, that's going create settings folder Master (Server Overworld) and Caves (Server Caves) that's for server Overworld: Spoiler sh start.sh when you see in end of log: "Your Server Will Not Start" press CTRL+C for stop server http://nsa38.casimages.com/img/2016/02/15/160215105037145587.jpg that's for server Cave: Spoiler sh start2.sh when you see in end of log: "Your Server Will Not Start" press CTRL+C for stop server http://nsa37.casimages.com/img/2016/02/15/160215105037430832.jpg 8) so now you need to settings both servers with cluster_token.txt, server.ini, worldgenoverride.lua Spoiler for find your token you just need to launch your game and go in your account info: 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 9) 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 nano /home/dst/.klei/DoNotStarveTogether/MyDediServer/cluster_token.txt put your token and press CTRL + X and Y for valid http://nsa38.casimages.com/img/2016/02/14/160214053218103479.jpg http://nsa38.casimages.com/img/2016/02/14/160214053218208682.jpg 10) 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 nano /home/dst/.klei/DoNotStarveTogether/MyDediServer/Master/worldgenoverride.lua and add this: 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" }, } after that press CTRL + X and Y for save and quit http://nsa37.casimages.com/img/2016/02/14/160214062442959869.jpg http://nsa37.casimages.com/img/2016/03/03/160303050920177814.jpg Server Cave: Spoiler nano /home/dst/.klei/DoNotStarveTogether/MyDediServer/Caves/worldgenoverride.lua and add this: 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" }, } after that press CTRL + X and Y for save and quit http://nsa38.casimages.com/img/2016/02/14/160214064723260727.jpg http://nsa37.casimages.com/img/2016/03/03/160303051035162719.jpg 11) 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 Default: 0 Steam group id for steam_group_only / steam_group_admins settings. See here for instructions on finding your steam group id: http://forums.kleientertainment.com/topic/55994-server-admin-associate-your-server-with-a-steam-group/ 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 for 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 nano /home/dst/.klei/DoNotStarveTogether/MyDediServer/cluster.ini and add this: [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 and press CTRL + X and Y for save and quit http://nsa38.casimages.com/img/2016/02/14/160214124013919394.jpg http://nsa37.casimages.com/img/2016/02/14/160214124014289954.jpg server.ini for server Overworld: Spoiler nano /home/dst/.klei/DoNotStarveTogether/MyDediServer/Master/server.ini and add this: [NETWORK] server_port = 10999 [SHARD] is_master = true [STEAM] master_server_port = 12346 authentication_port = 12345 and press CTRL + X and Y for save and quit http://nsa38.casimages.com/img/2016/02/14/160214125239886240.jpg http://nsa38.casimages.com/img/2016/02/14/160214125240193205.jpg server.ini for server Caves: Spoiler nano /home/dst/.klei/DoNotStarveTogether/MyDediServer/Caves/server.ini and add this: [NETWORK] server_port = 11000 [SHARD] is_master = false name = Caves [STEAM] master_server_port = 12348 authentication_port = 12347 and press CTRL + X and Y for save and quit http://nsa37.casimages.com/img/2016/02/14/16021412572857181.jpg http://nsa38.casimages.com/img/2016/02/14/160214125728313926.jpg 12) Use Screen, it's terminal multiplexer he is ability to attach and detach a session so if you don't have screen on your server dedicated, you need install this: Spoiler exit (come back with root) apt-get install screen http://nsa37.casimages.com/img/2016/02/28/160228034723987583.jpg http://nsa38.casimages.com/img/2016/02/28/160228034905304439.jpg 13) Make script for restart server Overworld and Cave so make new script restart.sh for server Overworld: Spoiler su - dst nano /home/dst/server_dst/bin/restart.sh and add this: #!/bin/sh # launch of server Overworld #Path Directory name_folder="/home/dst/server_dst/bin" #Command line start_overworld="sh start.sh" #Start or Restart the server screen -dr dst_server1 -X -S quit cd ${name_folder} screen -dmS dst_server1 ${start_overworld} and press CTRL + X and Y for save and quit http://nsa37.casimages.com/img/2015/11/30/151130031216991776.jpg http://nsa38.casimages.com/img/2016/02/14/160214012953685046.jpg Server Cave: Spoiler nano /home/dst/server_dst/bin/restart2.sh and add this: #!/bin/sh # launch of server Cave #Path Directory name_folder="/home/dst/server_dst/bin" #Command line start_cave="sh start2.sh" #Start or Restart the server screen -dr dst_server2 -X -S quit cd ${name_folder} screen -dmS dst_server2 ${start_cave} and press CTRL + X and Y for save and quit http://nsa38.casimages.com/img/2015/11/30/151130025620479753.jpg http://nsa37.casimages.com/img/2016/02/14/160214012953868499.jpg 14) Testing both servers Spoiler sh /home/dst/server_dst/bin/restart.sh sh /home/dst/server_dst/bin/restart2.sh http://nsa37.casimages.com/img/2015/11/30/151130032718665840.jpg if you see the message "No screen session found" because the script try to kill screen, so when you launch both scripts for first time, it's start both servers if you make again sh restart.sh or sh restart2.sh, it's going restart the server you can see your log, if it's server start correctly: Spoiler tail -f /home/dst/.klei/DoNotStarveTogether/MyDediServer/Master/server_log.txt (for stop this command press CTRL + C) tail -f /home/dst/.klei/DoNotStarveTogether/MyDediServer/Caves/server_log.txt (for stop this command press CTRL + C) http://nsa37.casimages.com/img/2016/02/14/160214013418409512.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. 15) Check if servers running correctly, and make a schedule task we need check if server Overworld and server Cave works correctly launch your game and check if you server is online Spoiler 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 now we will schedule a task for update the server every day at 6:00 am so you need make simple script for update the server: Spoiler nano /home/dst/server_dst/bin/update.sh and add this: #update of server screen -dr dst_server1 -X quit screen -dr dst_server2 -X quit cd /home/dst ./steamcmd.sh +login anonymous +force_install_dir /home/dst/server_dst +app_update 343050 -beta cavesbeta validate +quit sleep 10 sh /home/dst/server_dst/bin/restart.sh sh /home/dst/server_dst/bin/restart2.sh and press CTRL + X and Y for save and quit http://nsa37.casimages.com/img/2015/11/30/151130054245398298.jpg http://nsa38.casimages.com/img/2016/01/03/160103105754731638.jpg so we can test update.sh for see if it's works correctly: Spoiler sh /home/dst/server_dst/bin/update.sh http://nsa37.casimages.com/img/2015/11/30/151130055708592365.jpg 16) now we going used crontab, this service allows to create scheduled tasks on Linux Spoiler crontab -e when you see this: http://nsa37.casimages.com/img/2015/11/30/151130060224774966.jpg choose 1 now you need to add this in crontab: 0 6 * * * sh /home/dst/server_dst/bin/update.sh and press CTRL + X and Y for save and quit http://nsa37.casimages.com/img/2015/11/30/151130060630979065.jpg your server will be restarted and updated daily at 6:00 am 17) if you want stop both servers you can use htop on linux htop it's just monitor system processes on linux Spoiler login on root (exit for come back with root) apt-get install htop su - dst htop -u dst select the screen of you want kill with the directional arrows press F9 and enter for kill the screen (that's going stop the server) if you want start server, make again sh restart.sh and sh restart2.sh http://nsa37.casimages.com/img/2016/02/28/160228112528203534.jpg http://nsa37.casimages.com/img/2015/11/30/151130031013791627.jpg http://nsa38.casimages.com/img/2015/11/30/151130031237439853.jpg http://nsa37.casimages.com/img/2016/02/14/160214020151651751.jpg I hope this guide is good for you and especially to help you in installation of server DST on linux -- 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 tilde (~) (or ù on Azerty keyboards) and write c_regenerateworld() 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 server_log.txt: nano /home/dst/.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: nano /home/dst/.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 dedicated server and you need check if your blocklist.txt is loaded correctly: OnLoadPermissionList: /home/dst/.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: /home/dst/.klei/DST_Overworld/save/adminlist.txt you need to find KU_****** of player in log of your server: nano /home/dst/.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: sh /home/dst/server_dst/bin/restart.sh check now if your adminlist.txt is loading correctly on your server: nano /home/dst/.klei/DoNotStarveTogether/MyDediServer/Master/server_log.txt you need to find this in your log.txt: OnLoadPermissionList: /home/dst/.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: /home/dst/.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: sh /home/dst/server_dst/bin/restart.sh check now if your whitelist.txt is loading correctly on your server: nano /home/dst/.klei/DoNotStarveTogether/MyDediServer/Master/server_log.txt you need to find this in your server_log.txt: OnLoadUserIdList: /home/dst/.klei/DoNotStarveTogether/MyDediServer/Master/whitelist.txt (Success) so now you can test with your friend if reserved slots works my friend connect on the server before me on the server 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 More sharing options...
Chawpped Posted January 27, 2016 Share Posted January 27, 2016 Great guide. A couple of commands that some of the Linux users might be searching for. Once I got these put in the server ran just fine on an Amazon AWS EC2 Linux instance. yum install glibc libstdc++ yum -y install glibc.i686 yum install libcurl.so.4 yum install libstdc++.so.6 yum install screen cd /usr/lib ln -s libcurl.so.4 libcurl-gnutls.so.4 Link to comment Share on other sites More sharing options...
ToNiO55 Posted January 27, 2016 Author Share Posted January 27, 2016 Hi @Chawpped thx you very much for your feedback and thx also for share your commands can you tell me what is your distro please? it's look like RedHat or CentOS you can check what is your distro with this command: when i have name of your distro i going add your commands in my guide thx again Link to comment Share on other sites More sharing options...
Moon64 Posted January 27, 2016 Share Posted January 27, 2016 I will be trying this tonight. Really appreciate the guide. Link to comment Share on other sites More sharing options...
haywardGB Posted February 12, 2016 Share Posted February 12, 2016 Followed this tutorial to the letter but no joy. I keep getting: ModIndex: Load sequence finished successfully. Reset() returning [200] Account Failed (6): "E_INVALID_TOKEN" !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!! Your Server Will Not Start !!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! No auth token could be found. No matter where I put those files. I've put the cluster_token.txt file in both the cluster folders, then in both the dst_... folders, and it always says it cant find a valid token. I've even created a new token, but no joy there either. Btw, excellent tutorial. I learnt a lot of new stuff from that , like creating start up scripts and cron jobs.. cheers Link to comment Share on other sites More sharing options...
ToNiO55 Posted February 12, 2016 Author Share Posted February 12, 2016 Hi @haywardGB unfortunatly my guide is outdated since last update i going update my guide when i have finish my test with last update of the game because i need update my guides for Linux,Windows Server and Mac OS X and also for install,configure and update mods also i wait some fixed by Klei, like steam port doesn't works correctly on Linux thx for your feedback and your waiting Link to comment Share on other sites More sharing options...
haywardGB Posted February 12, 2016 Share Posted February 12, 2016 1 minute ago, ToNiO55 said: Hi @haywardGB unfortunatly my guide is outdated since last update i going update my guide when i have finish my test with last update of the game because i need update my guides for Linux,Windows Server and Mac OS X and also for install,configure and update mods thx for your feedback and your waiting Thanks . Your an asset to the community and if it wasn't for seeing this tutorial I'd have rage quit hours ago. I have faith in you , you've proven your skills already! I look forward to the updated tutorial. Meanwhile, KLEI need to hire you Link to comment Share on other sites More sharing options...
KittenCanaveral Posted February 13, 2016 Share Posted February 13, 2016 Yes I agree , thank you , your guide was a big help in me getting started in the first place and why I spent the money on a VPS for my server to live. before the update it was a beautiful thing of insanity starvation and constant fear of hounds. Link to comment Share on other sites More sharing options...
ToNiO55 Posted February 15, 2016 Author Share Posted February 15, 2016 Update of this guide with new settings since update 166077: Link to comment Share on other sites More sharing options...
FroggyBoi Posted February 15, 2016 Share Posted February 15, 2016 I believe I'm running the same build of Debian you are (debian-jessie-amd64-hvm-2015-06-07-12-27-ebs) but I'm getting "Unable to locate package libcurl4-gnutls-dev" when I try to install that prerequisite. Any ideas? Link to comment Share on other sites More sharing options...
ToNiO55 Posted February 15, 2016 Author Share Posted February 15, 2016 Hi @ARTIL3CT do you have same sources.list on your Debian? (check with root) nano /etc/apt/sources.list deb http://security.debian.org/ jessie/updates main deb-src http://security.debian.org/ jessie/updates main if yes try to make again: apt-get update Link to comment Share on other sites More sharing options...
Recommended Posts
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.