How to setup a Dedicated Server for Dont Starve Together (DST)
Publisher: Psychz Networks, April 02,2021Don't Starve Together is the standalone multiplayer expansion of the uncompromising wilderness survival game, Don't Starve. Gather resources to craft items and structures that match your survival style. Play your way as you unravel the mysteries of this strange land.
Cooperate with your friends in a private game, or take your chances with strangers online. Work with other players to survive the harsh environment, or strike out on your own.
The following article will see how to deploy Don't Starve Together on a Linux Ubuntu 18 dedicated server.
- Requirement
- Installing Ubuntu repositories
- Install and Login to Steam
- Installing Don't Starve Together
- Running the server
- Connecting to DST server
Requirement
- CPU: 2 Cores
- RAM: 2 Gb of RAM
- Storage: 10 Gb SSD (SSD for better read/write performance)
- OS: Ubuntu 18 with root login
- A licensed copy of Don't Starve Together
- Open port 10999 for UDP traffic
Install requirements and update repositories
If you have recently performed a fresh Ubuntu installation, you will have to update repositories and install a few requirements.
# sudo apt-get update
# sudo apt-get install screen wget
Adding 32-Bit libraries
This step is crucial as you will have to install 32- libraries to support the program if your OS is built on 64-bit architecture.The Steam command-line tool is only available as a 32-Bit program. As of today, most of the systems are 64-Bit based.
If you're running a 32-Bit system, you can skip this part. To find out if you have a 32-Bit or a 64-bit system installed, use the following command.
# arch
Output
If this command's output is i386 or i586, you have a 32-Bit system, and you can skip this step. If it is x86_64, you are using a 64-Bit system. In this case, you have to issue the following two commands as well:
# sudo dpkg --add-architecture i386
# sudo apt-get update
# sudo apt-get install lib32gcc1
This installs the lib32gcc1 file, which is a 32-Bit library. This library is needed by the Steam command-line tool. If this library isn't installed, the following commands will fail.
Download and extract Steam
Let us now install the Steam command-line tool. You can download the file from Steam's network. First, create a folder named steamcmd where you can download and extract related files.
# mkdir steamcmd
# cd steamcmd
With the help of the wget command, you can download the file from the location given above. Once the download is complete, you can extract the files in the same folder.
# tar -xvzf steamcmd_linux.tar.gz
Updating the Steam tool
You can now start updating the Steam tool. Execute the following command to start the update:
./steamcmd.sh
This process will take some time. When the process completes, you will see the following prompt.
-- type 'quit' to exit --
Loading Steam API...OK.
Steam>
Note: 'Steam>' prompt indicated that you are now at the Steam command line and Steam waits for you to enter a command.
Login into Steam
You can now login to your steam account using your username and password. If you do not have an account on Steam, you can log in using 'anonymous,' allowing you to log in without a password.
If you have an account on Steam, you will be asked for your password and Two Factor Authentication (if enabled).
Steam> login anonymous
Output
Connecting anonymously to Steam Public...Logged in OK
Waiting for user info...OK
Installing Don't Starve Together game.
After you login to steam, you can run following commands to download Don't Starve Together game.
Steam> force_install_dir /home/DST
Notes: DST is a short form for Don't Starve Together. You can choose to name your folder whatever you want.
Steam> app_update 343050 validate
Steam ID for Don't Starve Together is 343050
Output
Update state (0x61) downloading, progress: 99.99 (2231829971 / 2232095251)
Update state (0x61) downloading, progress: 99.99 (2231829971 / 2232095251)
Update state (0x61) downloading, progress: 99.99 (2231829971 / 2232095251)
Update state (0x61) downloading, progress: 99.99 (2231829971 / 2232095251)
Update state (0x61) downloading, progress: 99.99 (2231829971 / 2232095251)
Update state (0x61) downloading, progress: 99.99 (2231829971 / 2232095251)
Update state (0x61) downloading, progress: 99.99 (2231829971 / 2232095251)
Update state (0x101) committing, progress: 26.93 (601087566 / 2232095251)
Success! App' 343050' fully installed.
Running the server
You can create a shell script to start the screen and run the Don't Starve Together server. Once the shell script is running, you can press and release CTRL+A, then press D to come out of the screen without disrupting the running game sever.
To create a shell script, use the following command.
$ vim start_dst.sh
The following script will let the shell continue running, even when logged out, and reconnect as needed. The screen is told to start a shell and run the DST application.
cd /home/DST/bin
/usr/bin/screen -S "DST" /bin/sh -c './dontstarve_dedicated_server_nullrenderer -console
Save and exit VIM with: wq
To return to your server running DST, type screen -r, reopen the screen you detached from previously.
Connecting to DST game server
On your local machine, open the game console and hit Play! button on the title screen. This should take you to a new screen to open a console by hitting the tilde (~) key on your keyboard. This is usually located above the tab key.
When you open the console, you will see white text appear on the screen and a tan-colored box down at the bottom enter the following command:
c_connect("IP", port, "password")
IP - Within the double quotes, enter the IP address of the game server
Port - The port is optional. You don't need to specify it unless you've changed it to the default of 10999.
Password - This is optional unless you have set a password on your server. The quotes around the password are required.
Congratulations!! You have successfully installed and launched Don't Starve Together on your Linux dedicated server. You can now invite your friends or other players online by promoting your server name or simply sharing your Public IP address.