How to Add Mods to a Don't Starve Together Dedicated Server
A Don't Starve Together modded server uses two different files for two different jobs. dedicated_server_mods_setup.lua tells the dedicated server which Workshop items to download. modoverrides.lua tells one shard which downloaded mods to enable. A Forest and Caves cluster needs the second file in both shard directories.
Most broken modded servers have only one half of that configuration, put the file in the wrong directory, or enable a mod on Forest but not Caves. This guide sets up both parts and keeps them updateable.
Find the Workshop item ID
Open a mod on the Steam Workshop for Don't Starve Together. The numeric value after ?id= in the URL is the published file ID. For example, a URL ending in ?id=378160973 has item ID 378160973.
Use the item page, not a Steam collection URL. Read the description for required dependencies and whether the item is server-only, client-only or required on both sides. Add every dependency explicitly unless the author says the server downloads it itself.
Download mods with dedicated_server_mods_setup.lua
Edit this file inside the dedicated server installation:
/srv/dst/mods/dedicated_server_mods_setup.lua
Add one line per Workshop item:
ServerModSetup("378160973")
ServerModSetup("375850593")
This file is global to that Steam installation. It asks the dedicated server to download and update those published items. It does not turn them on in a world. SteamCMD validation can restore the stock file, so regenerate or back it up after running app_update 343050 validate.
Enable mods in modoverrides.lua
Create modoverrides.lua inside every shard that should load the mods:
~/.klei/DoNotStarveTogether/MyCluster/Master/modoverrides.lua
~/.klei/DoNotStarveTogether/MyCluster/Caves/modoverrides.lua
The minimal file is a Lua table:
return {
["workshop-378160973"] = { enabled = true },
["workshop-375850593"] = { enabled = true }
}
Notice the difference: ServerModSetup receives the bare numeric ID, while the override key begins with workshop-. Lua entries need commas between them. A trailing comma on the last entry is accepted by Lua, but keeping the generated file simple makes syntax mistakes easier to spot.
Why Forest and Caves need matching files
Forest and Caves are separate server processes. A gameplay mod can add prefabs, recipes, components or world state that crosses a sinkhole. If only Master loads it, entering Caves can disconnect players or leave the two shard simulations disagreeing about data.
Use the same override list on both shards unless the mod author explicitly documents a shard-specific setup. Client-only interface mods normally do not belong on the dedicated server at all.
Configure a mod
Configurable mods accept a configuration_options table:
return {
["workshop-1234567890"] = {
enabled = true,
configuration_options = {
show_icons = true,
share_map = false
}
}
}
The keys and values are defined by that mod's modinfo.lua. Do not guess their display labels. The reliable method is to configure the mod in the game's host UI once and inspect the generated override, or read the option definitions from modinfo.lua. Copy the same table to both shards when the mod runs on both.
Restart and verify the real load
Stop both shards cleanly, update the files, and start Caves plus Master again. Do not rely only on the process status. Search both logs for:
- SUCCESS: Loaded modoverrides.lua;
- the expected workshop-ID and mod title;
- ModIndex: Load sequence finished successfully;
- an online server start for each shard;
- no missing prefab, dependency, Lua or version errors.
The first boot can take longer because the server downloads every item. Later restarts are incremental unless an author publishes an update.
Common DST server mod failures
The mod downloads but does not run
ServerModSetup is present, but the item is absent from the shard's modoverrides.lua. Add the workshop-prefixed key to Master and Caves.
Forest works and Caves fails
The Caves override is missing, has a Lua syntax error, or lacks a dependency. Diff the two files and inspect the Caves server_log.txt rather than only the combined service status.
The item is stuck on an old version
Stop both processes before updating. Remove only that item's downloaded directory if the normal update keeps a corrupt copy, then let the dedicated server download it again. Never delete the cluster save as a first troubleshooting step.
A world-generation mod has no effect
World-generation choices are consumed when a world is created. Enabling the mod later does not safely rebuild existing terrain. Back up the cluster and follow the author's migration or regeneration instructions.
Players cannot join after an update
Check that server and clients received compatible versions. Some mods are required on both sides, while others are server-only. The Workshop description should state which model it uses. Also verify that app 343050 matches the current client release.
One-click mod setup on GHosting
On a GHosting DST server, paste Workshop links into the Mods tab. The panel validates that each item belongs to the Don't Starve Together Workshop, writes the download list, enables the same items on Forest and Caves, and restarts the cluster once. Live logs, version checks, files and SFTP remain available for advanced configuration. Plans are prepaid with no automatic renewal.
This flow follows the dedicated server mod setup guide on Klei's forum and Klei's official dedicated server command-line reference.