Skip to content

feat: add Valheim dedicated server - #2192

Closed
jasaspi wants to merge 1 commit into
community-scripts:mainfrom
jasaspi:feat/valheim
Closed

feat: add Valheim dedicated server#2192
jasaspi wants to merge 1 commit into
community-scripts:mainfrom
jasaspi:feat/valheim

Conversation

@jasaspi

@jasaspi jasaspi commented Aug 17, 2026

Copy link
Copy Markdown

✍️ Description

Adds a Community Scripts LXC installer for the Valheim Dedicated Server. It installs SteamCMD and App ID 896660 on Debian 13 in an unprivileged container, runs the server as a dedicated steam user under systemd (KillSignal=SIGINT + TimeoutStopSec=120 so the world saves gracefully on shutdown), stores settings in /opt/valheim/valheim.env (chmod 600), keeps world saves in /opt/valheim/data, and provides an update flow that backs up worlds before app_update and restores them on failure.

Server name, world name, password, and crossplay can be supplied via var_* variables for unattended installs, or are prompted interactively (empty password generates a random one; Valheim requires ≥5 characters).

This is a vanilla dedicated server only — no admin panel or third-party components, unlike the earlier #2103.

🔗 Related PR / Issue

Link: #2103 (earlier Valheim submission, closed — it bundled a custom low-star admin panel; this PR ships only the vanilla Iron Gate server via SteamCMD, following the precedent of Satisfactory #1970)

✅ Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Default install flow tested end-to-end on a real Proxmox VE host (Debian 13 LXC); server starts and is joinable. See Additional Information.
  • No breaking changes – Existing functionality remains intact.
  • No security risks – No hardcoded secrets; password file is chmod 600; server runs as an unprivileged system user in an unprivileged container.

🏗️ arm64 Support (X in brackets)

  • arm64 supported - Tested and supported on arm64.
  • arm64 not tested - Assumed to work on arm64, but testing has not been done.
  • arm64 not supported - SteamCMD and the Valheim server binary are x86_64-only (var_arm64=no).

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to website-related JSON files or metadata.
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.

🔍 Code & Security Review (X in brackets)

  • Follows CODE-AUDIT.md & CONTRIBUTING.md guidelines
  • Uses correct script structure (AppName.sh, AppName-install.sh, AppName.json)
  • No hardcoded credentials
  • No Docker / Docker Compose – The application is installed bare-metal; Docker is not used.
  • No git pull – SteamCMD is deployed with fetch_and_deploy_from_url; the server itself is installed and updated through SteamCMD app_update.

🤖 AI Assistance (X in brackets)

  • No AI used – Scripts were written without AI assistance.
  • AI was used – I confirm the scripts were built using AGENTS.md and .github/agents/pve-script-creator.agent.md as guidance, and the output has been reviewed and corrected to match those guidelines. Model: Claude Fable 5 (Claude Code), high reasoning effort; reviewed and tested by the author.

📋 Additional Information (optional)

  • Testing: the default install flow was run against a real Proxmox VE host; the container was created and the server installed and started successfully. The update flow (world backup → app_update 896660 validate → restore, with rollback on failure) follows the same structure as Satisfactory's and has been statically validated.
  • SteamCMD's first app_update after a fresh install can fail transiently with "Missing configuration"; the install retries up to 3 times.
  • Runtime requires SteamAppId=892970 (the game's App ID) in the service environment — the server binary refuses to start without it.
  • -public 0 is set (join by IP, no server list); can be promoted to an app_var if requested.
  • Default resources: 2 CPU, 4096 MiB RAM, 10 GiB disk. Required ports: 2456-2457 UDP.
  • ShellCheck: clean apart from SC1090/SC1091 on the dynamic source lines (same as existing upstream scripts).
  • Logo: no Valheim icon exists in selfhst/icons (checked webp/png/svg), so the JSON points at the Steam CDN logo; happy to switch if an icon lands in selfhst.

📦 Application Requirements (for new scripts)

⚠️ Do not remove this section.
It is used by automated PR validation checks.
If this PR is not a new script submission, leave the checkboxes unchecked.

Required for 🆕 New script submissions.
Pull requests that do not meet these requirements may be closed without review.

  • The application is at least 6 months old – Released February 2021.
  • The application is actively maintained – Iron Gate Studio ships regular updates.
  • The application has 600+ GitHub stars – Valheim is not developed on a public GitHub repository; it is a major Steam title (~500k reviews, Overwhelmingly Positive). Same exception as Satisfactory (feat: add Satisfactory dedicated server #1970).
  • Official release tarballs are published – The dedicated server is distributed through SteamCMD (App ID 896660) instead.
  • I understand that not all scripts will be accepted due to various reasons and criteria by the community-scripts ORG

🌐 Source

🤖 Generated with Claude Code

Installs SteamCMD and Valheim Dedicated Server (App ID 896660) on
Debian 13, runs it as an unprivileged steam user under systemd with
graceful world saves on shutdown, and provides an update flow with
world backup and rollback.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jasaspi
jasaspi requested a review from a team as a code owner August 17, 2026 13:14
@github-actions

Copy link
Copy Markdown
Contributor

Try this script

COMMUNITY_SCRIPTS_URL=https://raw.githubusercontent.com/jasaspi/ProxmoxVED/feat/valheim \
bash -c "$(curl -fsSL https://raw.githubusercontent.com/jasaspi/ProxmoxVED/feat/valheim/ct/valheim.sh)"

COMMUNITY_SCRIPTS_URL is not optional. Fetching the ct/ script from a branch
does not tell the engine where that branch is — with bash -c "$(curl …)" there
is no file on disk for the scripts root to be derived from, so it would fall back
to upstream main and look for the install script there.

Against a core branch as well

Add COMMUNITY_SCRIPTS_CORE_URL=https://raw.githubusercontent.com/OWNER/core/BRANCH
to test an engine change at the same time. The two resolve independently.

Useful flags while testing

dev_mode=net logs every fetch with status and duration, so you can confirm the
branch is really being used. dev_mode=keep stops a failed build from deleting
the container along with the evidence.

@jasaspi jasaspi closed this Aug 17, 2026
@jasaspi
jasaspi deleted the feat/valheim branch August 17, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant