docker-dontstarvetogether: env MODS not working
Hi, I write my .env file like this:
# ... some configs
MODS=378160973,375859599,356930882,1271089343,501385076,2110246021,466732225
# ... some configs
And I run the container, but in the container’s /data/mods/dedicated_server_mods_setup.lua, there is no ServerModSetup(xxx) but a default file with some comments like:
--There are two functions that will install mods, ServerModSetup and ServerModCollectionSetup. Put the calls to the functions in this file and they will be executed on boot.
--ServerModSetup takes a string of a specific mod's Workshop id. It will download and install the mod to your mod directory on boot.
--The Workshop id can be found at the end of the url to the mod's Workshop page.
--Example: http://steamcommunity.com/sharedfiles/filedetails/?id=350811795
--ServerModSetup("350811795")
--ServerModCollectionSetup takes a string of a specific mod's Workshop id. It will download all the mods in the collection and install them to the mod directory on boot.
--The Workshop id can be found at the end of the url to the collection's Workshop page.
--Example: http://steamcommunity.com/sharedfiles/filedetails/?id=379114180
--ServerModCollectionSetup("379114180")
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (7 by maintainers)
Thanks for your input on this! 👍 I’ll probably have a look at this on the coming weekend.
This should be fixed.
AFAIK this is an intended behaviour, old mods use the ./mods path and new ones use the path given in the parameter, this has something to do with recently released mod uploader tool by Klei. Glad you fixed the image, thanks!
@mateuszkozakiewicz, thanks for your help! I’ve now incorporated two separate changes based on your input.
First, I’m “brute-forcing”
chmodin theentrypoint.shto ensure proper permissions for the$STEAM_PATHdirectory. This was probably the issue in the first place. The solution is not super nice, but it executes fast and it seems to work anyway.Second, I’ve integrated usage of the new
ugc_directoryparameter, using it slightly different than what you proposed. The actual installation/update of mods happens in theupdatescript, which is called from thestartscript. Then, as you suggest, I’m usingskip_update_server_modson the actual launch command.So far this seems to fix the mods issue; although I noticed that now, mods are still installed into the
modsdirectory, but in addition to that, some files also get installed into theugc_modsdirectory.The Docker image has already been updated on the Docker hub. Please feel free to pull the new image via
docker pull yeetzone/dontstarvetogetherand give it a try. I’ll leave the issue open until I get some confirmation this works.Thanks a lot to everyone participating on this issue! ❤️
This fixes all problems
/entrypoint.sh/opt/steam/scripts/command/start/script.shAdditionally this allows to use mods uploaded to workshop using the new method (note
-ugc_directorywithout it some mods crash the server on startup i.e. global positions)I think there is a permission issue because this
is only true if you exec into container and run
dontstarve_dedicated_server_nullrendererasroot, thesteamuser will never be able to install mods unless root runs that command first (some dir is created perhaps?)