valheim-docker icon indicating copy to clipboard operation
valheim-docker copied to clipboard

Deleting previously installed mods on startup

Open DrewScatterday opened this issue 3 months ago • 6 comments

I absolutely love this project, it made deploying the server with a docker compose super easy.

Might be a skill issue but I ran into the following issue:

  • I used the docker compose example here https://github.com/mbround18/valheim-docker?tab=readme-ov-file#everything-but-the-kitchen-sink to start up a server with the MODS env var with dependency strings
  • After the server started up - I tested the mods. I found I didn't like 2 of them so I removed their dependency strings from the MODS env var and restarted the docker compose stack in portainer.
  • What I didn't realize is that even though I removed them from the list of dependency strings, their .dll files still existed at ./valheim/server/BepInEx/plugins so I had to ssh into my server and delete out the old .dll files I no longer wanted. Not a huge deal and took me like 2 seconds but took me a while to realize there was lingering mods in that folder causing issues.
  • Is there a flag I'm missing for like "full_refresh_mods" or "clear_mod_cache"? Maybe an additional .sh script could be added to just nuke that BepInEx/plugins folder if clear_mod_cache=True?

DrewScatterday avatar Sep 24 '25 07:09 DrewScatterday

Im actually working on this very thing heh building a sync command which hashes the files for install and uninstall all with the env var

mbround18 avatar Sep 28 '25 07:09 mbround18

Im actually working on this very thing heh building a sync command which hashes the files for install and uninstall all with the env var

Awesome!!! Tysm for your hard work :)

DrewScatterday avatar Sep 28 '25 19:09 DrewScatterday

Also another feature idea I had was like an auto_update_mods flag but that might a giant pain to implement. Basically watchtower but for r2modman valheim mods

DrewScatterday avatar Oct 09 '25 03:10 DrewScatterday

Hmmm @DrewScatterday thats a good idea, i can check if thunderstore which is the source of these has an api for that and i could support * versions like:

  • =* you accept what ever
  • =1.* you accept any minor and patch updates
  • = 1.1.* you accept only any patch update

That would bring it in line with popular coding features like used in js coding or similar.

mbround18 avatar Oct 27 '25 19:10 mbround18

@DrewScatterday i have wildcard support in https://github.com/mbround18/valheim-docker/pull/1292 still working on sync

mbround18 avatar Oct 28 '25 17:10 mbround18

This is awesome thank for your hard work :)

DrewScatterday avatar Oct 28 '25 21:10 DrewScatterday