Update Home
1 parent
a664eda24b
commit
4064eddff9
1 file changed
+128
-15
+128
-15
@@ -1,17 +1,130 @@
|
|||||||
<body>
|
<h1><strong>Managed Valheim Server</strong></h1>
|
||||||
<!--StartFragment--><h1><strong>Managed Valheim Server — Overview</strong></h1><p><span style="white-space: pre-wrap;">This project provides a <strong style="white-space: pre-wrap;">fully automated, self-updating, BepInEx‑patched Valheim dedicated server</strong> designed for TrueNAS SCALE and other containerized environments. It includes SteamCMD installation, mod patching, managed startup, and optional world backup automation.</span></p><div></div><h2><strong>Core Features</strong></h2><h3><strong>SteamCMD Auto‑Install & Auto‑Update</strong></h3><ul role="list"><li><p><span style="white-space: pre-wrap;">Server installs and updates itself on container start.</span></p></li><li><p><span style="white-space: pre-wrap;">Uses anonymous SteamCMD login.</span></p></li><li><p><span style="white-space: pre-wrap;">Verifies installation and applies updates automatically.</span></p></li></ul><h3><strong>BepInEx Managed Integration</strong></h3><ul role="list"><li><p><span style="white-space: pre-wrap;">Downloads the official <em style="white-space: pre-wrap;">BepInExPack Valheim</em> from Thunderstore.</span></p></li><li><p><span style="white-space: pre-wrap;">Validates and extracts the pack.</span></p></li><li><p><span style="white-space: pre-wrap;">Applies custom patches:</span></p><ul role="list"><li><p><span style="white-space: pre-wrap;">Password override fix</span></p></li><li><p><span style="white-space: pre-wrap;">Launch command rewrite</span></p></li><li><p><span style="white-space: pre-wrap;">Managed wrapper installation</span></p></li></ul></li></ul><h3><strong>Managed Wrapper (</strong><code>start_server_managed.sh</code><strong>)</strong></h3><ul role="list"><li><p><span style="white-space: pre-wrap;">Handles server startup.</span></p></li><li><p><span style="white-space: pre-wrap;">Ensures correct savedir path.</span></p></li><li><p><span style="white-space: pre-wrap;">Passes environment variables cleanly.</span></p></li><li><p><span style="white-space: pre-wrap;">Supports background tasks (e.g., backup loop).</span></p></li></ul><h3><strong>World Backup System</strong></h3><ul role="list"><li><p><span style="white-space: pre-wrap;">Optional automated backups via wrapper.</span></p></li><li><p><span style="white-space: pre-wrap;">Uses <code style="white-space: pre-wrap;">/backups</code> volume.</span></p></li><li><p><span style="white-space: pre-wrap;">Creates timestamped <code style="white-space: pre-wrap;">.zip</code> archives of world directories.</span></p></li><li><p><span style="white-space: pre-wrap;">Requires <code style="white-space: pre-wrap;">zip</code> installed in the container (now fixed).</span></p></li></ul><h3><strong>TrueNAS SCALE Ready</strong></h3><ul role="list"><li><p><span style="white-space: pre-wrap;">Exposes Valheim ports (2456–2458 UDP).</span></p></li><li><p><span style="white-space: pre-wrap;">Uses <code style="white-space: pre-wrap;">/config</code> and <code style="white-space: pre-wrap;">/backups</code> volumes.</span></p></li><li><p><span style="white-space: pre-wrap;">Logs accessible through TrueNAS UI.</span></p></li></ul><div></div><h2><strong>Directory Layout</strong></h2><div><div><div tabindex="0" role="group" aria-label="Scrollable table">
|
|
||||||
Path | Purpose
|
|
||||||
|
|
||||||
- SteamCMD installation
|
<p>
|
||||||
- Valheim server root
|
<strong>Managed Valheim</strong> is a fully automated, self-updating,
|
||||||
- World saves
|
BepInEx‑patched Valheim dedicated server designed for TrueNAS SCALE and other
|
||||||
- Managed backup output
|
container platforms. It provides a clean SteamCMD installation, reliable mod
|
||||||
- Main startup script
|
integration, and optional world backup automation.
|
||||||
- Optional standalone backup script
|
</p>
|
||||||
- Managed wrapper
|
|
||||||
|
|
||||||
</div><div></div></div><div><div><button aria-label="Copy table" type="button" data-testid="copy-table-button" data-spatial-navigation-autofocus="false" data-tooltip-state="closed"><div></div></button><div></div></div><div><button aria-label="Download table" type="button" data-testid="download-table-button" data-spatial-navigation-autofocus="false" data-tooltip-state="closed"><div></div></button><div></div></div></div></div><div></div><h2><strong>Startup Flow</strong></h2><ol role="list" start="1"><li><p><span style="white-space: pre-wrap;">Container starts → <code style="white-space: pre-wrap;">entrypoint.sh</code> runs.</span></p></li><li><p><span style="white-space: pre-wrap;">SteamCMD installs/updates Valheim.</span></p></li><li><p><span style="white-space: pre-wrap;">BepInEx pack downloaded & patched.</span></p></li><li><p><span style="white-space: pre-wrap;">Managed wrapper installed.</span></p></li><li><p><span style="white-space: pre-wrap;">Wrapper launches server with correct flags:</span></p><ul role="list"><li><p><span style="white-space: pre-wrap;"><code style="white-space: pre-wrap;">-name</code></span></p></li><li><p><span style="white-space: pre-wrap;"><code style="white-space: pre-wrap;">-world</code></span></p></li><li><p><span style="white-space: pre-wrap;"><code style="white-space: pre-wrap;">-savedir</code></span></p></li><li><p><span style="white-space: pre-wrap;"><code style="white-space: pre-wrap;">-password</code></span></p></li><li><p><span style="white-space: pre-wrap;"><code style="white-space: pre-wrap;">-public</code></span></p></li></ul></li><li><p><span style="white-space: pre-wrap;">Server boots, loads world, begins accepting connections.</span></p></li></ol><div></div><h2><strong>Logging</strong></h2><ul role="list"><li><p><span style="white-space: pre-wrap;">SteamCMD logs: <code style="white-space: pre-wrap;">/root/Steam/logs/</code></span></p></li><li><p><span style="white-space: pre-wrap;">Valheim logs stream to container stdout (TrueNAS UI).</span></p></li><li><p><span style="white-space: pre-wrap;">BepInEx logs appear under <code style="white-space: pre-wrap;">/opt/valheim/BepInEx/</code>.</span></p></li></ul><div></div><h2><strong>Backup Behavior</strong></h2><ul role="list"><li><p><span style="white-space: pre-wrap;">Wrapper runs a background loop (default: hourly).</span></p></li><li><p><span style="white-space: pre-wrap;">Each cycle:</span></p><ul role="list"><li><p><span style="white-space: pre-wrap;">Checks world directory.</span></p></li><li><p><span style="white-space: pre-wrap;">Creates ZIP archive in <code style="white-space: pre-wrap;">/backups</code>.</span></p></li><li><p><span style="white-space: pre-wrap;">Logs success or warnings.</span></p></li></ul></li><li><p><span style="white-space: pre-wrap;">World auto-backups (Valheim internal) continue normally.</span></p></li></ul><div></div><h2><strong>Requirements</strong></h2><ul role="list"><li><p><span style="white-space: pre-wrap;">TrueNAS SCALE or Docker environment.</span></p></li><li><p><span style="white-space: pre-wrap;">Mounted volumes:</span></p><ul role="list"><li><p><span style="white-space: pre-wrap;"><code style="white-space: pre-wrap;">/config</code></span></p></li><li><p><span style="white-space: pre-wrap;"><code style="white-space: pre-wrap;">/backups</code></span></p></li></ul></li><li><p><span style="white-space: pre-wrap;">Ports 2456–2458 UDP exposed.</span></p></li><li><p><span style="white-space: pre-wrap;"><code style="white-space: pre-wrap;">zip</code> installed in container (added in your updated Dockerfile).</span></p></li></ul><div></div><h2><strong>Known Non-Issues / Safe Warnings</strong></h2><p><span style="white-space: pre-wrap;">These appear in logs but do <strong style="white-space: pre-wrap;">not</strong> affect server operation:</span></p><ul role="list"><li><p><span style="white-space: pre-wrap;"><code style="white-space: pre-wrap;">DllNotFoundException: libParty.so</code>
|
<hr>
|
||||||
(PlayFab Party SDK — unused by dedicated servers)</span></p></li><li><p><span style="white-space: pre-wrap;">Shader fallback warnings
|
|
||||||
(headless Unity server)</span></p></li><li><p><span style="white-space: pre-wrap;"><code style="white-space: pre-wrap;">OnGUI function detected…</code>
|
<h2><strong>What This Project Provides</strong></h2>
|
||||||
(IMGUI stripped — normal)</span></p></li></ul><!--EndFragment-->
|
|
||||||
</body>
|
<ul>
|
||||||
|
<li><strong>Automatic SteamCMD installation & updates</strong><br>
|
||||||
|
The server installs and updates itself every time the container starts.
|
||||||
|
SteamCMD handles validation and patching using anonymous login.
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li><strong>Managed BepInEx integration</strong><br>
|
||||||
|
The container downloads, validates, and installs the official
|
||||||
|
<em>BepInExPack Valheim</em> from Thunderstore, then applies required
|
||||||
|
patches and generates a managed startup wrapper.
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li><strong>Clean + Modded directory separation</strong><br>
|
||||||
|
SteamCMD installs into <code>/opt/valheim_base</code> (clean), while the
|
||||||
|
server runs from <code>/opt/valheim</code> (modded). This prevents
|
||||||
|
SteamCMD rollback errors and ensures reliable updates.
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li><strong>Automated world backups</strong><br>
|
||||||
|
The server can automatically back up world files at a configurable
|
||||||
|
interval, storing timestamped ZIP archives in <code>/backups</code>.
|
||||||
|
Old backups are pruned based on a retention window.
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li><strong>TrueNAS SCALE ready</strong><br>
|
||||||
|
Exposes Valheim ports (2456–2458 UDP), supports persistent volumes, and
|
||||||
|
integrates cleanly with SCALE’s app configuration system.
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<h2><strong>Key Environment Variables</strong></h2>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Variable</th>
|
||||||
|
<th>Default</th>
|
||||||
|
<th>Description</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td><code>SERVER_NAME</code></td>
|
||||||
|
<td>Valheim Server</td>
|
||||||
|
<td>Display name of the server</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>WORLD_NAME</code></td>
|
||||||
|
<td>Dedicated</td>
|
||||||
|
<td>World save name</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>SERVER_PASSWORD</code></td>
|
||||||
|
<td>changeme</td>
|
||||||
|
<td>Password required to join</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>PUBLIC</code></td>
|
||||||
|
<td>1</td>
|
||||||
|
<td>Public listing toggle</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>BACKUP_INTERVAL</code></td>
|
||||||
|
<td>21600</td>
|
||||||
|
<td>Backup interval (seconds)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>BACKUP_RETENTION_DAYS</code></td>
|
||||||
|
<td>7</td>
|
||||||
|
<td>Days to retain backups</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<h2><strong>How It Works</strong></h2>
|
||||||
|
|
||||||
|
<ol>
|
||||||
|
<li>Container starts and runs <code>entrypoint.sh</code>.</li>
|
||||||
|
<li>SteamCMD installs or updates Valheim in <code>/opt/valheim_base</code>.</li>
|
||||||
|
<li>Updated binaries are copied into <code>/opt/valheim</code>.</li>
|
||||||
|
<li>BepInEx is downloaded, validated, extracted, and patched.</li>
|
||||||
|
<li>The managed wrapper launches the server with correct parameters.</li>
|
||||||
|
<li>A background loop performs world backups and pruning.</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<h2><strong>Directory Layout</strong></h2>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li><code>/opt/steamcmd</code> — SteamCMD installation</li>
|
||||||
|
<li><code>/opt/valheim_base</code> — Clean Valheim install</li>
|
||||||
|
<li><code>/opt/valheim</code> — Modded runtime directory</li>
|
||||||
|
<li><code>/backups</code> — Managed backup output</li>
|
||||||
|
<li><code>/config</code> — TrueNAS SCALE config volume</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<h2><strong>Notes</strong></h2>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>Shader warnings and <code>libParty.so</code> errors are normal for headless servers and do not affect gameplay.</li>
|
||||||
|
<li>All logs stream to container stdout and are visible in TrueNAS SCALE.</li>
|
||||||
|
<li>BepInEx logs appear under <code>/opt/valheim/BepInEx/</code>.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
For detailed configuration, troubleshooting, and modding instructions, see the
|
||||||
|
other pages in this wiki.
|
||||||
|
</p>
|
||||||
Reference in new issue
Block a user