Mods from the Steam Workshop let you add new content, quality-of-life features, or gameplay changes to Don't Starve Together. On your game server with us, you configure mods in two files: one specifies which mods the server downloads, and the other specifies which of those are active in your world.
You need the Workshop ID for each mod. Open the mod's page in the Don't Starve Together Steam Workshop. The ID is the number at the end of the URL after ?id=, for example 350811795.
You can edit the files in the Files tab of your game server or via SFTP. Stop the server before changing the files.
Open the file mods/dedicated_server_mods_setup.lua. The file is already on your server. Add a line for each mod using ServerModSetup and the Workshop ID in quotation marks:
ServerModSetup("350811795")
ServerModSetup("2902364746")
To download an entire Workshop collection, use ServerModCollectionSetup with the collection ID instead:
ServerModCollectionSetup("379114180")
When the server starts, it automatically downloads all mods listed in this file and updates them whenever a new version is published in the Workshop.
Downloaded mods are not active yet. To activate them, use the file modoverrides.lua in your world folder DoNotStarveTogether/Cluster_1/Master/. Create the file there if it doesn't already exist, and add each mod as workshop-<ID>:
return {
["workshop-350811795"] = { enabled = true },
["workshop-2902364746"] = { enabled = true },
}
If a mod has its own settings, add them using configuration_options. You can find the available options and values in the mod's description:
return {
["workshop-350811795"] = {
enabled = true,
configuration_options = {
-- Option = Wert, laut Beschreibung der Mod
},
},
}
Save the file and start the server. You can check whether everything loaded in the output in the Console tab.
If you have caves enabled, they automatically use the same modoverrides.lua as the overworld. The caves will use a separate file only if you add a modoverrides.lua of their own in the Cluster_1/Caves/ folder. Both worlds should use the same server mods.
Some mods need access to files outside their own area. Only if a mod specifically requires it, go to the Configuration tab, under Startup Parameters, and set Mods: Read access to server files or Mods: Write access to server files to true, then restart the server. Both are disabled by default.
To disable a mod, set enabled = false in modoverrides.lua or delete its entry. If you also want the server to stop downloading it, remove its line from mods/dedicated_server_mods_setup.lua as well. Then restart the server.
If the server doesn't start properly after you add a mod, the mod is often incompatible with the current game version. Try disabling it and check the output in the Console.