Adding Mods to Your Don't Starve Together Server
Adding mods to your Don't Starve Together server is very easy, as the game already has a system that will allow you to automatically download and install mods directly from the Steam Workshop. This article will show where it is located and how to use it.
Open the Mods Folder on Your Server
Go to the File Manager on the Nodecraft control panel and click on the mods
folder to open it.
Once you have opened the mods
folder, look for the file dedicated_server_mods_setup.lua
. This is the file that controls the automated system for downloading mods automatically. Select the file and then click edit
to open a text editor.
Once you have that file open, there are instructions inside of it for how to add the mods.
The system will support downloading individual mods or even entire Steam Workshop collections.
Note: The characters
--
in the setup file are comment characters, that tell the file to ignore anything after them, so don't begin the mod setup lines with those or they will not take effect.
Add Individual Mods
To use a single mod, add the line:
ServerModSetup("<ID number>")
Where \< ID number > is replaced with the Steam Workshop ID number. Make sure to keep the quotation marks (" ").
To easily find the Steam Workshop ID number for a specific mod, start your Steam client and go to the Steam Workshop for Don't Starve Together. Once in the workshop, click on a mod and it will take you to a website for that mod. In the URL at the top of the Steam window, the ID number will be near the very end, immediately after id=
. See the example below.
If you need to add additional mods, just add another ServerModSetup("< ID number >")
line under it, and keep repeating until you have added all the mods you want downloaded.
Add Workshop Collections
To add an entire workshop collection, use the line:
ServerModCollectionSetup("<Workshop Collection ID>")
Below is an example of both lines added to the file:
The workshop collection was removed before continuing, so the rest of the process would be simpler.
Start the Server, and Allow the Workshop Mods to Download
Next, start your Don't Starve Together server so that is will begin downloading the mods.
When you're server is fully started, you should see new folders inside the /mods
directory, one for each mod installed, or an entire series of folder for each workshop collection.
Enable the Mods in modsettings.lua
Edit the file, and add the following line for each mod folder that was downloaded and installed by the list of mods that was added to the file dedicated_server_mods_setup.lua
:
ForceEnableMod("folder_name")
The text in between the quotation marks (" ") are the folder names as listed in the file manager, not the name of the mods.
Save modsettings.lua
and Restart the Server
When you are done editing the file, click the save button to close the editor, and restart the server. The mods that were downloaded and installed will now be enabled on your server!