Customising your world in Don’t Starve Together is pretty simple – you just need to know where the configuration goes and what to put in the file.
Creating a worldgenoverride.lua
This file allows you to fine tune your DST experience and is specific to the shard you are customising – for instance, if you want to customise your Forest shard called Master, you’d place your worldgenoverride.lau in:
Adding mods to your dedicated Don’t Starve Together server on Ubuntu Server can be a little fiddly – to get started you’ll need the mod IDs from the Steam Workshop. Once you have those they need to be added to a file in a specific format.
Open the file below:
vi ~/dontstarvetogether_dedicated_server/mods/dedicated_server_mods_setup.lua
The syntax is explained in the file – as per the files instructions, adding the mod Global Positions looks like this:
ServerModSetup("378160973")
You can add as many mods as you need, just add them on a new line each time.
Once this is done you need to configure your mod – create a file called modoverrides.lua in your cluster:
vi ~/.klei/DoNotStarveTogether/Cluster_1/Master/modoverrides.lua
Now add your configuration: if you aren’t sure what needs to be added, try making a local game with the mod enabled and copy from your local game file.
A common mod called Global Positions has a set up similar to this:
In this post we’ll be setting up a dedicated Don’t Starve Together server with Caves on Ubuntu Server 18.04 for use with Windows, Mac and Linux clients. Sadly, neither Playstation nor Xbox players will be able to connect.
Create a new user to install all the relevant game files into – this keeps file management easy and means you can easily remove the installation at a later date if you need to.
adduser dont-starve
Switch to the new user:
su - dont-starve
SteamCMD install
Don’t Starve is downloaded and updated from the Steam platform. To do this we need to install the SteamCMD package.
We’re done with SteamCMD for now, head back to the home root:
cd ~
Get cluster token and cluster config
To configure your Don’t Starve Together server you should now head over to the Klei accounts website: https://accounts.klei.com/
At the bottom of the DST page, you can create a new server:
Creating the Anxiety Hour Don’t Starve together server, Warly’s Kitchen
Once the new server has been created you’ll need to configure it. You can do this manually but it saves you alot of headaches to just use the wizard – click the `Configure` link under your new server key:
For a quick setup, use Klei’s configure wizard initially
Choose some settings that make sense to you, you can always change these at a later date in your config files if you need to.
Once filled in you can download the Zip archive, extract the content, and place the folder `MyDediServer` inside ~/.klei/DoNotStarveTogether/
Startup script
To start your game server you’ll need a startup script – create a new file in your home root:
vi ~/run_dedicated_servers.sh
Drop the following into this file:
#!/bin/bash
steamcmd_dir="$HOME/steamcmd"
install_dir="$HOME/dontstarvetogether_dedicated_server"
cluster_name="MyDediServer"
dontstarve_dir="$HOME/.klei/DoNotStarveTogether"
function fail()
{
echo Error: "$@" >&2
exit 1
}
function check_for_file()
{
if [ ! -e "$1" ]; then
fail "Missing file: $1"
fi
}
cd "$steamcmd_dir" || fail "Missing $steamcmd_dir directory!"
check_for_file "steamcmd.sh"
check_for_file "$dontstarve_dir/$cluster_name/cluster.ini"
check_for_file "$dontstarve_dir/$cluster_name/cluster_token.txt"
check_for_file "$dontstarve_dir/$cluster_name/Master/server.ini"
check_for_file "$dontstarve_dir/$cluster_name/Caves/server.ini"
./steamcmd.sh +force_install_dir "$install_dir" +login anonymous +app_update 343050 +quit
check_for_file "$install_dir/bin"
cd "$install_dir/bin" || fail
run_shared=(./dontstarve_dedicated_server_nullrenderer)
run_shared+=(-console)
run_shared+=(-cluster "$cluster_name")
run_shared+=(-monitor_parent_process $$)
"${run_shared[@]}" -shard Caves | sed 's/^/Caves: /' &
"${run_shared[@]}" -shard Master | sed 's/^/Master: /'
Save the file and make it executable:
chmod u+x ~/run_dedicated_servers.sh
Starting your server
If you are staying in your terminal screen while you play, you can simply run the bash script directly:
~/run_dedicated_server.sh
This will update your server and start it up ready to connect. You’ll see lots of text on the screen as it starts, this is the game console. Be aware that if you close your terminal window or disconnect from SSH you will also close your running game server.
If you want to start your server without entering the console, so you can close your terminal or SSH connection, then use screen like below – where DST is just a easily remembered name for the screen session:
screen -S DST -d -m ~/run_dedicated_servers.sh
To view the game console later, use the following command:
screen -d -r DST
Shutting down your server
From the game console you can shutdown your server using ctrl + c if needed.