Valheim: Mastering the BepInEx Modding Framework
In the world of Valheim modding, BepInEx is the foundation upon which almost every mod is built. It is a "Unity Injector" that allows external code (DLLs) to modify the way the game behaves. Without BepInEx, massive quality-of-life mods like *Valheim Plus* or *Epic Loot* simply cannot function.
Playing on PS5? BepInEx mods are PC-only, see our Valheim PS5 crossplay guide for what works (and what does not) when console players join a modded PC server.
1. The Plugin Folder
Your mods (the .dll files) live in /BepInEx/plugins/. This is the only folder where BepInEx looks for new code to inject.
2. Configuration
After your first boot with a mod, a corresponding .cfg file is generated in /BepInEx/config/. This is where you tweak mod settings.
3. Versioning
Valheim updates frequently. Always ensure you are using the IL2CPP or Mono version of BepInEx that matches the current branch of the game.
Manual Installation & Directory Structure
If you are not using the Supercraft 1-Click Installer, you must ensure the following structure in your root folder:
/BepInEx/- The core framework.doorstop_config.ini- The configuration that tells Valheim to load BepInEx instead of the vanilla engine.winhttp.dll- The bridge file required for the injection to work.
Configuring "Doorstop"
If BepInEx isn't loading, check your doorstop_config.ini. The [UnityDoorstop] section must have enabled=true.
[UnityDoorstop]
# True to enable, False to disable
enabled=true
# Path to the assembly to load
targetAssembly=BepInEx\core\BepInEx.Preloader.dll
Advanced Troubleshooting: The Dependency Loop
Many mods require Jotunn or HookGenPatcher to work.
| Extension | Required For | Install Location |
|---|---|---|
Jotunn.dll | Almost all complex UI or Item mods. | BepInEx/plugins/ |
HookGenPatcher | Any mod that changes core physics or networking. | BepInEx/patchers/ |
MMHOOK | Older mods that require manual method hooks. | BepInEx/plugins/ |
Expert Tip: Always check your LogOutput.log inside the BepInEx folder if a mod isn't working. It will highlight in red any DLLs that failed to load due to missing dependencies or version mismatches.
Comprehensive Troubleshooting Guide
BepInEx Not Loading
- Symptom: Server starts but mods don't work. No BepInEx console output.
- Check Doorstop Config: Verify
doorstop_config.inihasenabled=true. - Verify Installation: Ensure BepInEx folder structure is correct with all core files.
- Check Permissions: Verify
winhttp.dllanddoorstop_config.inihave proper file permissions. - Restart Required: Some installations require multiple restarts to initialize.
- Log Files: Check if
LogOutput.logis being generated. If not, BepInEx isn't loading at all.
Mods Not Appearing in Game
- Wrong Folder: Ensure DLLs are in
/BepInEx/plugins/, not root or subdirectories. - Missing Dependencies: Many mods require Jotunn, HookGenPatcher, or MMHOOK. Install required dependencies.
- Version Mismatch: Ensure BepInEx version is compatible with Valheim version.
- Load Order Issues: Some mods need to load in specific order. Try renaming DLLs alphabetically.
- Config Conflicts: Duplicate config files or corrupted configs can prevent loading.
- Check Logs:
LogOutput.logwill show which mods failed and why.
Server Crashes on Startup
- Incompatible Mod: One of your mods is incompatible with current Valheim version.
- Corrupted Download: Re-download BepInEx and all mods from official sources.
- Dependency Loop: Mod A requires Mod B, Mod B requires Mod C, but Mod C is missing.
- Memory Issues: Too many mods can exceed available RAM. Disable non-essential mods.
- Duplicate Mods: Having multiple versions of the same mod causes crashes.
- Troubleshoot: Disable all mods, enable one-by-one until crash occurs.
Specific Mod Errors in Logs
"Assembly load failed" or "TypeLoadException"
- Corrupted DLL: Re-download the affected mod.
- Wrong Architecture: Ensure you're using IL2CPP or Mono version appropriate for your setup.
- Missing Framework: Some mods require specific .NET Framework versions.
"Missing dependency"
- Identify Missing Dependency: Check the mod's Thunderstore page for requirements.
- Common Dependencies: Jotunn, HookGenPatcher, MMHOOK_Valheim.
- Install Location: Dependencies go in
/BepInEx/plugins/or/BepInEx/patchers/as specified.
"Version mismatch"
- BepInEx Version: Update BepInEx to latest version.
- Game Version: Ensure Valheim is updated. Old mods may not work with new versions.
- Dependency Version: Update all dependency mods to match mod requirements.
Client-Side Issues
Players Can't Join Modded Server
- Version Mismatch: Players need exact same mod versions as server.
- Missing Mods: All players must have all server-side mods installed.
- Config Differences: Some mods (like Valheim Plus) require matching configs.
- Profile Codes: Use r2modman profile codes to sync exact mod lists.
- Enable Mods: Ensure players are launching with "Start Modded" button.
Game Won't Launch with Mods
- Incompatible Mod: One mod conflicts with others or game version.
- Corrupted Install: Delete BepInEx folder and reinstall completely.
- Antivirus: Some antivirus software blocks mod DLLs. Add exceptions.
- Launch Arguments: Verify game has proper launch parameters.
- Mod Manager Issues: Try launching without r2modman to isolate the issue.
Performance Issues
Server Lag with Mods
- Too Many Mods: Each mod adds overhead. Disable unused mods.
- Resource-Intensive Mods: Some mods like Epic Loot generate many items. Configure properly.
- Autosave Frequency: Some mods increase save frequency. Adjust intervals.
- Player Sync: Mods that sync data between players increase network load.
- Monitor Resources: Check CPU/RAM usage in server control panel.
Client Framerate Drops
- Visual Mods: HD textures and visual effects mods impact performance.
- UI Mods: Complex interface overlays can cause FPS drops.
- Item Density: Mods that add many items increase memory usage.
- Disable Effects: Reduce particle effects in mod configurations.
- Hardware Limitations: Ensure your PC meets modded game requirements.
Configuration Issues
Settings Not Applying
- Wrong Config File: Ensure you're editing the correct
.cfgfile. - Server vs Client: Some settings must be on server, others on client.
- Format Errors: Incorrect config format prevents settings from loading.
- Restart Required: Most config changes need server restart.
- Default Override: Some configs reset to default on updates.
Config File Not Generated
- Not Started Yet: Config files generate on first successful mod load.
- Mod Failed to Load: If mod doesn't load, config won't generate.
- Manual Creation: Manually create config using examples from mod documentation.
- Permissions: Ensure server has write permissions to config directory.
Common Dependency Issues
Jotunn (Jötunnheim)
- Purpose: Required for almost all complex UI and item mods.
- Installation: Place
Jotunn.dllin/BepInEx/plugins/. - Version: Must match Jotunn version required by each dependent mod.
- Common Error: "Jotunn not found" when using Jotunn-dependent mods.
HookGenPatcher
- Purpose: Required for mods that change core game mechanics.
- Installation: Place in
/BepInEx/patchers/, NOT plugins folder. - Common Mistake: Putting HookGenPatcher in plugins instead of patchers.
MMHOOK_Valheim
- Purpose: Required for older mods that need manual method hooks.
- Installation: Place
MMHOOK_Valheim.dllin/BepInEx/plugins/. - Version Critical: Must match specific Valheim version requirements.
Best Practices for Stable Modded Servers
Installation Guidelines
- Source Reliability: Only download from Thunderstore or official sources.
- Version Tracking: Keep notes of which mod versions work together.
- Incremental Testing: Add one mod at a time, test thoroughly.
- Backup Often: Always backup before adding new mods.
- Read Documentation: Check each mod's installation instructions and requirements.
Maintenance
- Regular Updates: Keep mods updated for new Valheim versions.
- Clean Install: Occasionally reinstall BepInEx and mods completely.
- Monitor Logs: Check
LogOutput.logregularly for warnings. - Performance Monitoring: Track server performance metrics over time.
- Community Feedback: Stay updated on known issues and solutions.
Emergency Recovery: If your server becomes completely unusable due to mod issues, the fastest solution is often to delete the entire BepInEx folder and reinstall just the mods you actually need. Keep a list of your essential mods and their working versions for quick recovery.
Shield your server with peak performance. Set up a Valheim server with Supercraft and take advantage of our internal pre-configured BepInEx environment for instant modding.