ophatapioka

"start_server.sh" file text for Valheim Plus

Jul 3rd, 2025
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.15 KB | None | 0 0
  1. #!/usr/bin/env bash
  2. # Combined Valheim + BepInEx startup script
  3.  
  4. # 1) Save original LD_LIBRARY_PATH so we can restore at the end
  5. export _OLD_LD_LIBRARY_PATH="$LD_LIBRARY_PATH"
  6.  
  7. # 2) BepInEx “Doorstop” loader setup
  8. export DOORSTOP_ENABLE=TRUE
  9. export DOORSTOP_INVOKE_DLL_PATH=./BepInEx/core/BepInEx.Preloader.dll
  10. # TRY Removing the hashtag in front of this next line if script doesn't work:
  11. # export DOORSTOP_CORLIB_OVERRIDE_PATH=./unstripped_corlib
  12.  
  13. # 3) Make sure Doorstop’s native libs load first
  14. export LD_LIBRARY_PATH="./doorstop_libs:${LD_LIBRARY_PATH}"
  15. export LD_PRELOAD="libdoorstop_x64.so:${LD_PRELOAD}"
  16.  
  17. # 4) Then prepend the game’s own linux64 folder
  18. export LD_LIBRARY_PATH="./linux64:${LD_LIBRARY_PATH}"
  19.  
  20. # 5) Tell Steam it’s running Valheim
  21. export SteamAppId=892970
  22.  
  23. echo "Starting Valheim + BepInEx… PRESS CTRL-C to exit"
  24.  
  25. # 6) Launch the server (exec replaces this script’s process)
  26. exec ./valheim_server.x86_64 \
  27. -name "servername" \
  28. -port 2456 \
  29. -world "worldsavefilename" \
  30. -password "secret" \
  31. -crossplay
  32.  
  33. # 7) (Unreachable if exec succeeds—but here for completeness)
  34. export LD_LIBRARY_PATH="$_OLD_LD_LIBRARY_PATH"
Advertisement
Add Comment
Please, Sign In to add comment