Guides/Simple Dedicated Server Setup

This is a very simple guide to setting up a dedicated server. To make things easiest, it'll be running the dedicated server through Steam on a computer that you can already use normally (i.e. not a server that you access through command line or anything).

Installing

 * In Steam, hover over the Library tab and select Tools.
 * Scroll to Don't Starve Together Dedicated Server, right-click and select Install Game....
 * Follow the steps to install like any other Steam game.

Configuring
default_server_name = A 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_snapshots = true pause_when_empty = false server_save_slot = 1..5 default_server_name = Supervillain PvP default_server_description = Do you have what it takes? server_port = 10998 server_password = max_players = 6 pvp = true game_mode = wilderness enable_snapshots = true pause_when_empty = true server_save_slot = 1
 * First, right-click Don't Starve Together Dedicated Server in Steam and select Properties.
 * Click Set launch options... at the bottom and enter this: " ". This will let you type console commands in the dedicated server window, and make it save to a different folder from the normal game.
 * Right-click Don't Starve Together Dedicated Server and select Play game.... After it stops printing stuff out, close the window it makes (this lets it generate the save folder).
 * Launch Don't Starve Together normally, and open the console with the tilde (~) key. Enter " ", hit enter, and close the game.
 * Find the folder Documents/Klei folder. It should now have both the DoNotStarveTogetherDedicated and the DoNotStarveTogether folders inside. Copy both settings.ini and server_token.txt from DoNotStarveTogether folder into DoNotStarveTogetherDedicated.
 * Open the copied settings.ini in a text editor (Notepad, TextEdit, Notepad++, etc-- not a rich text editor like Word).
 * Make sure you have the following lines under " ":
 * Change the parts on the right to what you want. Note that  is case-sensitive, so don't put in "Wilderness". For example (a PvP Wilderness server with no password):
 * If you want to come back and change these later, make sure you do it while the dedicated server is not running. If you change it while the server is running, it'll rewrite it with the old settings when it gets closed.

Port Forwarding
You might not have to port forward, but you probably will (if you need to, but haven't yet, this will make it so that nobody else can see your server in the list and connect to it; because you're on the same computer, you should be able to see it despite that). Every router is different, but the basic idea is that you have a network in your house, with IP addresses for the computers there. You have to get your computer's local IP address (look up how to do this; you'll want to include your operating system in the search, such as "find local IP in windows 8"), and then tell your router to forward connections on the port to your computer (look up instructions for your router, such as "asus rt-n65u port forwarding").

Playing
Now, when you want to play on the server, you can launch it through the Library > Tools section of Steam, then join it through Don't Starve Together normally.

Optional Steps
You might want to customize your world generation settings or add mods. These both have to be done differently.

World Customization
To have custom world generation settings, you need to make a text file called worldgenoverride.lua in your DoNotStarveTogetherDedicated folder. Inside this file, you can set individual settings like this: return { override_enabled = true, misc = { season="shortboth", world_size="huge", season_start="summer" }, resources = { flint="never", grass="never", sapling="never", trees="never" } } The  part determines whether custom settings are used at all. Change "true" to "false" there if you want to turn off all customization (or delete the file)-- this won't affect worlds that have already been generated, though. Here are all possible options (note that when adding/removing options you have to keep them in their sections, like "unprepared" and "misc"): return {

override_enabled = true, unprepared = { -- "never", "rare", "default", "often", "always" berrybush = "default", cactus = "default", carrot = "default", mushroom = "default", },       misc = { autumn = "default", -- "noseason", "veryshortseason", "shortseason", "default", "longseason", "verylongseason", "random" boons = "default", -- "never", "rare", "default", "often", "always" branching = "default", -- "never", "least", "default", "most" day = "default", -- "default", "longday", "longdusk", "longnight", "noday", "nodusk", "nonight", "onlyday", "onlydusk", "onlynight" frograin = "default", -- "never", "rare", "default", "often", "always" lightning = "default", -- "never", "rare", "default", "often", "always" loop = "default", -- "never", "default", "always" season_start = "default", -- "default", "winter", "spring", "summer", "random" spring = "default", -- "noseason", "veryshortseason", "shortseason", "default", "longseason", "verylongseason", "random" summer = "default", -- "noseason", "veryshortseason", "shortseason", "default", "longseason", "verylongseason", "random" touchstone = "default", -- "never", "rare", "default", "often", "always" weather = "default", -- "never", "rare", "default", "often", "always" wildfires = "default", -- "never", "rare", "default", "often", "always" winter = "default", -- "noseason", "veryshortseason", "shortseason", "default", "longseason", "verylongseason", "random" world_size = "default", -- "default", "medium", "large", "huge" },       animals = { -- "never", "rare", "default", "often", "always" alternatehunt = "default", angrybees = "default", beefalo = "default", beefaloheat = "default", bees = "default", birds = "default", butterfly = "default", buzzard = "default", catcoon = "default", frogs = "default", hunt = "default", lightninggoat = "default", moles = "default", penguins = "default", perd = "default", pigs = "default", rabbits = "default", tallbirds = "default", },       monsters = { -- "never", "rare", "default", "often", "always" bearger = "default", chess = "default", deciduousmonster = "default", deerclops = "default", dragonfly = "default", goosemoose = "default", houndmound = "default", hounds = "default", krampus = "default", liefs = "default", lureplants = "default", merm = "default", spiders = "default", tentacles = "default", walrus = "default", },       resources = { -- "never", "rare", "default", "often", "always" flint = "default", flowers = "default", grass = "default", marshbush = "default", meteorshowers = "default", meteorspawner = "default", reeds = "default", rock = "default", rock_ice = "default", sapling = "default", trees = "default", tumbleweed = "default", }, }

Mods
For mods, you need to make two files. One, dedicated_server_mod_setup.lua, tells the dedicated server which mods it needs to download and update. The other, modoverrides.lua, tells it which to have active and what configuration options to use for them.

The first one needs to be created in the game files for the dedicated server. Open up the Library > Tools tab in Steam and right-click on Don't Starve Together Dedicated Server, select Properties, then go to the Local Files tab in the popup and click Browse local files.... In the window that opens, go to the mods folder, and inside, create the text file dedicated_server_mod_setup.lua if it does not exist already, then open it in a text editor. For each mod you want, go to their page on the Steam Workshop and get the URL of that page (if it doesn't show at the top, you can right-click anywhere and select Copy Page URL). There will be a number at the end of the URL; for example, Always On Status's number is 376333686. Inside dedicated_server_mod_setup.lua, add a line for each mod that looks like this: ServerModSetup("376333686") -- Write the name of the mod here so you remember

The second one needs to be created in your DoNotStarveTogetherDedicated folder. Make the text file modoverrides.lua with this inside: return { } For each mod you want to enable, add a line in the middle for it like this (make sure it has the comma at the end): return { ["workshop-427002021"] = { enabled = true }, -- put the mod name here so you remember } If you want to change options for the mod, you'll have to look at that mod's files. Go back to the mods folder where you made dedicated_server_mod_setup.lua. If you haven't run the dedicated server since last editing that file, run it so it downloads the mods. Then, you should have a folder like workshop-427002021 for each mod. Look inside, and open the modinfo.lua file in a text editor. Usually you'll find options listed like this: configuration_options = {    {         name = "starting_day", label = "Starting day", hover = "After this day, this mod will start to block certain \nactions from limited players.", options = {            {description = "10", data = 10}, {description = "15", data = 14}, {description = "21", data = 20}, {description = "36", data = 35} },        default = 10, },    {         name = "min_days", label = "Minimum player days", hover = "Players need to spend this amount of days to no \nlonger be limited.", options = {            {description = "1", data = 1}, {description = "2", data = 2}, {description = "3", data = 3}, {description = "5", data = 5} },        default = 1, }, } label shows the name for the option that you'd see on the mods page, and for each option description is what that choice is called, and data is the actual value that the mod uses for that option. Using that information, you can change the line in modoverrides.lua to look like this: ["workshop-378160973"] = { enabled = true, configuration_options = { 			description1 = data1, description2 = data2, }, 	}, -- mod name here so you remember For example, this is a configuration for Global Positions: ["workshop-378160973"] = { enabled = true, configuration_options = { 			SHOWPLAYERSOPTIONS = 1, SHOWPLAYERICONS = false, FIREOPTIONS = 1, SHOWFIREICONS = true, SHAREMINIMAPPROGRESS = false, }, 	}, -- Global Positions