Advertisement
RazingHel

How To Setup Digital Ocean VPS for Don't Starve Together

Aug 14th, 2018
3,387
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.88 KB | None | 0 0
  1. |===============================================|
  2. |== HOW TO SETUP A VIRTUAL PRIVATE SERVER FOR ==|
  3. |== DON'T STARVE TOGETHER USING DIGITAL OCEAN ==|
  4. |===============================================|
  5.  
  6. This guide is going to make some assumptions:
  7.  
  8. 1. You have or can open an account with DigitalOcean
  9. 2. You are using Windows OS and can download and install PuTTY
  10.  
  11. Please keep in mind that this guide is a product of it's time (2018), it's quite possible that in the future changes that break the functionality of this guide but as of the time I recorded this I can verify it works if you follow the instructions.
  12.  
  13. ===============================
  14. == Setting up Digital Ocean ==
  15. ===============================
  16.  
  17. - Log into your Digital Ocean Account (digitalocean.com)
  18.  
  19. - On the top of the home page click the "Create" dropdown menu
  20.  
  21. - From that Dropdown menu click "Droplets"
  22.  
  23. - Under "Choose an image" click the box that says "Ubuntu"
  24.  
  25. - Under "Choose a size" click on the $15/month plan that gives you 2 GB Memory and 2vCPUS
  26.  
  27. - Skip backups and adding block storage
  28.  
  29. - Under "Choose a datacenter region" click the location closest to your current location for best performance
  30.  
  31. - You can ignore the additional options and adding an SSH key
  32.  
  33. - Under "How many Droplets" keep the default
  34.  
  35. - Under "Choose a hostname" give the droplet a name you'll recognize or leave the default
  36.  
  37. - Under "Select a project" you can keep the default
  38.  
  39. - Click the "Create" button.
  40.  
  41. ======================
  42. == Setting up PuTTY ==
  43. ======================
  44.  
  45. - Download and install PuTTY (www.putty.org)
  46.  
  47. - Copy the new IP address from your newly created droplet
  48.  
  49. - Run PuTTY, under "category" select "Session"
  50.  
  51. - Paste the IP Address in the box that says "Host Name", click "Open" button
  52.  
  53. - For username use "root"
  54.  
  55. - For password check your Digital Ocean email address
  56.  
  57. - Log in and change the temp root password emailed to you to something more secure
  58.  
  59. ==============================
  60. == Insalling the DST Server ==
  61. ==============================
  62.  
  63. - The following commands should be pasted into the PuTTY terminal in the order they appear. Lines with a hasktag (#) at the start are comments and shouldn't be pasted into PuTTY.
  64.  
  65. sudo dpkg --add-architecture i386
  66.  
  67. # this updates your new droplet
  68. sudo apt-get update && time sudo apt-get dist-upgrade
  69.  
  70. # this installs needed dependencies to run the DST server
  71. sudo apt-get install libstdc++6:i386 libgcc1:i386 libcurl4-gnutls-dev:i386
  72.  
  73. # this addes a new user named 'dst'
  74. adduser dst
  75.  
  76. # this adds the new dst user to the sudo group
  77. usermod -aG sudo dst
  78.  
  79. # this changes active terminal account from 'root' to 'dst'
  80. su dst
  81.  
  82. # this installs steamcmd
  83. mkdir ~/steamcmd
  84. cd ~/steamcmd
  85. wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
  86. tar -xvzf steamcmd_linux.tar.gz
  87.  
  88. # this makes folders for master and cave server shards
  89. mkdir -p ~/.klei/DoNotStarveTogether/MyDediServer/Master
  90. mkdir -p ~/.klei/DoNotStarveTogether/MyDediServer/Caves
  91.  
  92. # this creates your server token file, if you don't yet have your cluster token you'll need to create one
  93. echo 'enter your server token here' > ~/.klei/DoNotStarveTogether/MyDediServer/cluster_token.txt
  94.  
  95. # Create your cluster.ini file
  96. base64 -di > ~/.klei/DoNotStarveTogether/MyDediServer/cluster.ini <<< 'W0dBTUVQTEFZXQpnYW1lX21vZGUgPSBzdXJ2aXZhbAptYXhfcGxheWVycyA9IDYKcHZwID0gZmFsc2UKcGF1c2Vfd2hlbl9lbXB0eSA9IHRydWUKCgpbTkVUV09SS10KY2x1c3Rlcl9kZXNjcmlwdGlvbiA9IFRoaXMgc2VydmVyIGlzIHN1cGVyIGR1cGVyIQpjbHVzdGVyX25hbWUgPSBTdXBlciBTZXJ2ZXIKY2x1c3Rlcl9pbnRlbnRpb24gPSBjb29wZXJhdGl2ZQpjbHVzdGVyX3Bhc3N3b3JkID0gCgoKW01JU0NdCmNvbnNvbGVfZW5hYmxlZCA9IHRydWUKCgpbU0hBUkRdCnNoYXJkX2VuYWJsZWQgPSB0cnVlCmJpbmRfaXAgPSAxMjcuMC4wLjEKbWFzdGVyX2lwID0gMTI3LjAuMC4xCm1hc3Rlcl9wb3J0ID0gMTA4ODkKY2x1c3Rlcl9rZXkgPSBzdXBlcnNlY3JldGtleQo='
  97.  
  98. # Create your Master server.ini
  99. base64 -di > ~/.klei/DoNotStarveTogether/MyDediServer/Master/server.ini <<< 'W05FVFdPUktdCnNlcnZlcl9wb3J0ID0gMTEwMDAKCgpbU0hBUkRdCmlzX21hc3RlciA9IHRydWUKCgpbU1RFQU1dCm1hc3Rlcl9zZXJ2ZXJfcG9ydCA9IDI3MDE4CmF1dGhlbnRpY2F0aW9uX3BvcnQgPSA4NzY4Cg=='
  100.  
  101. # Create your Caves server.ini
  102. base64 -di > ~/.klei/DoNotStarveTogether/MyDediServer/Caves/server.ini <<< 'W05FVFdPUktdCnNlcnZlcl9wb3J0ID0gMTEwMDEKCgpbU0hBUkRdCmlzX21hc3RlciA9IGZhbHNlCm5hbWUgPSBDYXZlcwoKCltTVEVBTV0KbWFzdGVyX3NlcnZlcl9wb3J0ID0gMjcwMTkKYXV0aGVudGljYXRpb25fcG9ydCA9IDg3NjkK'
  103.  
  104. # Create your Caves worldgenoverride.lua
  105. base64 -di > ~/.klei/DoNotStarveTogether/MyDediServer/Caves/worldgenoverride.lua <<< 'cmV0dXJuIHsKICAgIG92ZXJyaWRlX2VuYWJsZWQgPSB0cnVlLAogICAgcHJlc2V0ID0gIkRTVF9DQVZFIiwKfQo='
  106.  
  107. # Create the script that will run the servers.
  108. base64 -di > ~/run_dedicated_servers.sh <<< 'IyEvYmluL2Jhc2gKCnN0ZWFtY21kX2Rpcj0iJEhPTUUvc3RlYW1jbWQiCmluc3RhbGxfZGlyPSIkSE9NRS9kb250c3RhcnZldG9nZXRoZXJfZGVkaWNhdGVkX3NlcnZlciIKY2x1c3Rlcl9uYW1lPSJNeURlZGlTZXJ2ZXIiCmRvbnRzdGFydmVfZGlyPSIkSE9NRS8ua2xl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LWNsdXN0ZXIgIiRjbHVzdGVyX25hbWUiKQpydW5fc2hhcmVkKz0oLW1vbml0b3JfcGFyZW50X3Byb2Nlc3MgJCQpCgoiJHtydW5fc2hhcmVkW0BdfSIgLXNoYXJkIENhdmVzICB8IHNlZCAncy9eL0NhdmVzOiAgLycgJgoiJHtydW5fc2hhcmVkW0BdfSIgLXNoYXJkIE1hc3RlciB8IHNlZCAncy9eL01hc3RlcjogLycKCgo='
  109.  
  110. # Give the script executable permissions
  111. chmod u+x ~/run_dedicated_servers.sh
  112.  
  113. # Run the script to start the dedicated servers
  114. ~/run_dedicated_servers.sh
  115.  
  116. =============
  117. == Credits ==
  118. =============
  119.  
  120. This guide is based on the Dedicated Server Quick Setup Guide for Linux created by 255 on the Don't Starve Together Forums (https://forums.kleientertainment.com/forums/topic/64441-dedicated-server-quick-setup-guide-linux/)
  121.  
  122. It has been adapted here to work with Digital Ocean, a cloud service provider which allows you to rent virtualized servers (www.digitalocean.com)
  123.  
  124. This revised guide was created by RazingHel (razinghel.com) if you have any additional questions join my Discord and send me a message there: https://discord.gg/hEDTMCs
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement