Install Don't Starve Together Game Server on Ubuntu 14.04
Updated by Linode Contributed by Andrew Gottschling
Dedicated CPU instances are available!
Don’t Starve Together is a multiplayer game written and published by Klei Entertainment, and is a multiplayer add- on to their single-player game Don’t Starve. This guide will explain how to prepare your Linode and install, then configure, Don’t Starve Together.
Before You Begin
Complete our guide: Install SteamCMD for a Steam Game Server. This will get SteamCMD installed and running on your Linode and this guide will pick up where the SteamCMD page leaves off.
NoteThis guide is written for a non-root user. Commands that require elevated privileges are prefixed with
sudo. If you’re not familiar with the
sudocommand, you can check our Users and Groups guide.
Prerequisites for Don’t Starve Together
From the SteamCMD guide, two additional steps are needed specifically for DST.
Add an iptables firewall rule. This command assumes that you have only the iptables rules in place from the SteamCMD guide. This inserts a rule for port 10999 after the pre-existing iptables rules for SteamCMD.
sudo iptables -I INPUT 7 -p udp --sport 10999 --dport 1025:65355 -j ACCEPT
After entering the above rule, run iptables-persistent again. You’ll be asked if you want to save the current IPv4 and IPv6 rules. Answer
yesfor IPv4 and
sudo dpkg-reconfigure iptables-persistent
Install some additional 32-bit packages:
sudo apt-get install libcurl4-gnutls-dev:i386
Install Don’t Starve Together
Be sure you are in the directory
~/Steam, then access the
cd ~/Steam && ./steamcmd.sh
From the SteamCMD prompt, login anonymously:
Or log in with your Steam username:
Install Don’t Starve Together to the
Steamuser’s home directory:
force_install_dir ./dstserver app_update 343050 validate
This can take some time. If the download looks as if it has frozen, be patient. Once the download is complete, you should see this output:
Success! App '343050' fully installed. Steam>
NoteTo update DST, run the above 4 commands again.
Configure Don’t Starve Together
Before you configure DST, you should launch it at least once to generate its configuration files:
cd ~/Steam/dstserver/bin ./dontstarve_dedicated_server_nullrenderer
Once you see this output, the server has been successfully launched:
Telling Client our new session identifier: XXXXXXXXXXXXXXXX ModIndex: Load sequence finished successfully. Reset() returning
You will see a error that looks similar to this:
 Account Failed (6): "E_INVALID_TOKEN" !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!! Your Server Will Not Start !!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
This is completely normal and we will fix this in the next step.
Press Control+C to quit the server. You will return to the linux command prompt.
Create a settings file for your Don’t Starve Together server in
~/.klei/DoNotStarveTogether/. Below is an example configuration file. You may use this and modify it as you need. Note that where several non-binary options exist, they are shown in this file delimited with a
|, and numerical ranges are denoted with
... Choose a single option.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
[network] default_server_name = Your unique server name default_server_description = A very nice server description server_port = 10999 server_password = password max_players = 1 .. 64 pvp = true | false game_mode = endless | survival | wilderness enable_autosaver = true | false tick_rate = 30 connection_timeout = 8000 server_save_slot = 1 enable_vote_kick = true | false pause_when_empty = true | false [account] dedicated_lan_server = false [STEAM] DISABLECLOUD = true [MISC] CONSOLE_ENABLED = true autocompiler_enabled = true
Create a startup script for DST with the following contents:
1 2 3 4
#!/bin/sh cd ./Steam/dstserver/bin screen -S "Don't Starve Together Server" ./dontstarve_dedicated_server_nullrenderer
When run, the script will change directories to
~/Steam/dstserver/binand execute DST in a Screen session.
Make the script executable:
chmod +x ~/startdst.sh
Get your Authentication Token
You will need Don’t Starve Together installed on your personal computer to get your token.
Open up the game on your computer. Once you reach the main menu, press the backtick key (
`) on your keyboard. You will see a screen similar to this one:
NoteIf you’ve never before played the game, you first need to click on Play and create an account.
Copy the following string into the box at the bottom of the console:
Once you have done this, press ENTER on your keyboard. The console will close, and you can exit the game. Locate the file that has been generated in one of the following directories, depending on your operating system.
On Windows, the file is located in:
On Mac OS X:
This file is your server token. Do not share it with anyone.
Upload the token file to your Linode. If you’re running OS X or Linux, you can use the following command, replacing your IP address and username:
scp ~/Documents/Klei/DoNotStarveTogether/server_token.txt email@example.com:~/.klei/DoNotStarveTogether/
Start the Server
Now that your server is installed and configured, it can be launched by running the
startdst.shscript from your
steamuser’s home directory.
cd ~/ && ./startdst.sh
CautionFrom this point, do not press the Control+C keys while in the console unless you want to stop DST.
To detach from the screen session running the server console, press these two key combinations in succession:
To bring the console back, type the following command:
To stop the server, bring back the DST console and press CONTROL + C.
Enter The Server
Now you have your very own Don’t Starve Together server for you and your friends to play on. Players can access the server by opening the server list and finding your server’s name, clicking Connect, and entering a password if you chose to set one.
Join our Community
This guide is published under a CC BY-ND 4.0 license.