
DoorDirector
Automatically closes Valheim doors with synchronized per-prefab normal, inverted, ignored, and timeout rules.DoorDirector
DoorDirector automatically closes Valheim doors after a configurable delay. It supports ordinary doors and modded Door components such as gates and drawbridges, with server-controlled per-prefab rules.
Features
- Uses Valheim's native networked
Doorstate andUseDoorRPC. - Supports normal, inverted, and ignored prefab behavior.
- Supports a default timeout and per-prefab timeout overrides.
- Cancels a pending close when a player operates the Door again.
- Synchronizes every gameplay setting from the server with ServerSync.
- Lets the server lock gameplay configuration for non-admin clients.
- Exposes clean BepInEx config entries in ConfigurationManager's F1 menu.
- Works on dedicated servers and does not require ConfigurationManager.
- Reports exact prefab names through logging, a hotkey, and a console command.
ServerSync is embedded into DoorDirector.dll, following the upstream ServerSync deployment guidance. It is not a separate Thunderstore dependency.
Installation
Thunderstore or r2modman
Install DoorDirector from the Valheim mod catalog. The manager installs BepInEx automatically from the package dependency.
Install the mod on the dedicated server and on every connecting client. ServerSync enforces compatible DoorDirector versions.
Manual
- Install BepInExPack for Valheim.
- Create
BepInEx/plugins/DoorDirector/. - Put
DoorDirector.dllin that directory on the server and every client. - Start the game or server once to generate
BepInEx/config/com.tomtom.doordirector.cfg.
Configuration
Gameplay settings are authoritative on the server and synchronized to clients. Debug Logging and Prefab Debug Hotkey are client-local diagnostics and intentionally stay out of ServerSync.
| Section | Setting | Default | Synchronized | Purpose |
|---|---|---|---|---|
| General | Enabled |
true |
Yes | Enables automatic closing. |
| General | Lock Configuration |
true |
Yes | Prevents non-admin clients from changing synchronized settings. |
| General | Default Auto Close Delay |
5 |
Yes | Seconds before an affected Door closes, from 0.1 to 3600. |
| Prefab Rules | Only Affect Configured Prefabs |
false |
Yes | Limits behavior to explicitly configured prefab names. |
| Prefab Rules | Included Prefabs |
empty | Yes | Comma-separated prefabs using normal behavior. |
| Prefab Rules | Inverted Prefabs |
empty | Yes | Comma-separated prefabs with opposite physical and logical states. |
| Prefab Rules | Ignored Prefabs |
empty | Yes | Comma-separated prefabs DoorDirector never changes. |
| Prefab Rules | Custom Delays |
empty | Yes | Comma-separated prefab_name=seconds overrides. |
| Diagnostics | Debug Logging |
false |
No | Logs prefab names and close scheduling on this machine. |
| Diagnostics | Prefab Debug Hotkey |
F7 |
No | Prints the targeted Door prefab on this client. |
Example:
Included Prefabs = wood_door,iron_grate
Inverted Prefabs = my_drawbridge
Ignored Prefabs = boss_gate
Custom Delays = wood_door=3,my_drawbridge=12
Rule precedence is Ignored, then Inverted, then normal. A custom delay configures a prefab for normal behavior unless it also appears in Inverted Prefabs. Name matching is case-insensitive and surrounding whitespace is ignored.
Inverted mode treats logical state 0 as physically open and logical state 1 or -1 as physically closed. When closing an inverted Door, DoorDirector restores its previous native direction through the UseDoor RPC.
Finding prefab names
Look at a Door, gate, or bridge that uses Valheim's Door component and press F7. The exact prefab name appears on the HUD and in the BepInEx log.
The same diagnostic is available in the Valheim console:
doordirector_prefab
Enable Debug Logging to log the exact prefab name whenever the local player interacts with a Door.
Building
DoorDirector targets .NET Framework 4.8. Local builds use the actual assemblies from the installed game and BepInEx profile; no game or framework DLLs are stored in this repository.
The default local path is D:\SteamGames\steamapps\common\Valheim. Build and package with:
.\scripts\build.ps1
.\scripts\package.ps1
Override discovered paths when needed:
.\scripts\package.ps1 `
-ValheimPath "D:\Games\Valheim" `
-BepInExRoot "D:\Profiles\Valheim\BepInEx" `
-ServerSyncPath "D:\Dependencies\ServerSync.dll"
The GitHub Actions build downloads the Valheim dedicated-server assemblies through SteamCMD, BepInExPack from Thunderstore, and the pinned upstream ServerSync release. Those dependencies are used only during compilation.
Release process
- Update
DoorDirectorVersioninDirectory.Build.props. - Add the release notes to
CHANGELOG.md. - Run
.\scripts\package.ps1and inspect the ZIP inartifacts/. - Commit and tag the release as
vX.Y.Z. - Create a GitHub release for that tag. The workflow builds, validates, and attaches the matching Thunderstore ZIP.
Upload that ZIP to the Valheim community on Thunderstore using your publisher namespace. Select appropriate categories such as Mods, Utility, Client-side, and Server-side. Because this repository and its icon were produced with AI assistance, also select Thunderstore's AI Generated category when publishing.
License
DoorDirector is available under the MIT License.

