first boot of cm2network/steamcmd: running and quiet for 122s after 186s; stopped gracefully
Still open (the builder could not fix these)
booting your template with the node-agent (the real deploy code) failed: FAILED: server crashed and was restarted 1 time(s). It was started with your defaults exactly as a new server gets them: settings left empty stay empty (only x-generate fields are filled), so a server that needs a value must get it from a default or x-generate. Find the cause in the server's output below and fix the template (startup command, settings, ready pattern, memory):
Notes from research: Crossplay is enabled with the -crossplay launch flag (allows Xbox, PS5, Switch 2, and Game Pass players to join; a join code is printed to the server log). BepInEx and ValheimPlus mods are supported via the lloesche and community-valheim-tools images. Server password must be at least 5 characters or valheim_server.x86_64 refuses to start. There is no config file; all settings are launch arguments. World data lives in a worlds/ subfolder under the -savedir path. Granting CAP_SYS_NICE is optional but avoids a thread-priority warning. The pfeiffermax image explicitly runs as a non-root user; lloesche and community-valheim-tools images also support non-root operation. First start downloads ~1 GB from Steam.
Drafted by the GBR AI builder. **Review before merging**: check the settings, ports and descriptions against the game's documentation.
- Game: **Valheim** — Valheim Dedicated Server
- Image: `cm2network/steamcmd`, Steam app 896660
- Model rounds: 3
**Checked for real**
- image cm2network/steamcmd exists
- image lloesche/valheim-server exists
- image ghcr.io/community-valheim-tools/valheim-server exists
- image pfeiffermax/valheim-dedicated-server exists
- Steam app 896660 is "Valheim Dedicated Server"
- first boot of cm2network/steamcmd: running and quiet for 122s after 186s; stopped gracefully
**Still open** (the builder could not fix these)
- booting your template with the node-agent (the real deploy code) failed: FAILED: server crashed and was restarted 1 time(s). It was started with your defaults exactly as a new server gets them: settings left empty stay empty (only x-generate fields are filled), so a server that needs a value must get it from a default or x-generate. Find the cause in the server's output below and fix the template (startup command, settings, ready pattern, memory):
**Notes from research:** Crossplay is enabled with the -crossplay launch flag (allows Xbox, PS5, Switch 2, and Game Pass players to join; a join code is printed to the server log). BepInEx and ValheimPlus mods are supported via the lloesche and community-valheim-tools images. Server password must be at least 5 characters or valheim_server.x86_64 refuses to start. There is no config file; all settings are launch arguments. World data lives in a worlds/ subfolder under the -savedir path. Granting CAP_SYS_NICE is optional but avoids a thread-priority warning. The pfeiffermax image explicitly runs as a non-root user; lloesche and community-valheim-tools images also support non-root operation. First start downloads ~1 GB from Steam.
**Sources**
- https://hub.docker.com/r/lloesche/valheim-server
- https://github.com/community-valheim-tools/valheim-server-docker
- https://steamdb.info/app/896660/info/
- https://max-pfeiffer.github.io/how-to-set-up-a-valheim-dedicated-server-using-docker-and-docker-compose.html
- https://hosthavoc.com/wiki/game-servers/valheim/enable-crossplay
- https://www.valheimgame.com/support/a-guide-to-dedicated-servers/
- https://netrouting.com/gaming-industry/setup-valheim/
- https://shattered.io/valheim-dedicated-server/
- https://connecthosting.net/blog/valheim-dedicated-server-setup-guide
- https://www.gameserverkings.com/knowledge-base/valheim/configuration-overview/
- https://natchecker.com/blog/valheim-dedicated-server-port-forwarding
Replaces #17 (closed, branch deleted).
B1. Boot test fails — the template is not deployable as-is.
The PR description explicitly states:
booting your template with the node-agent (the real deploy code) failed: FAILED: server crashed and was restarted 1 time(s)
This is a hard blocker. The template must pass the node-agent boot test before merging. The most likely root cause is the bash-only array syntax in defaultStartupCommand:
args=(...), args+=(...), and "${args[@]}" are all bash extensions. If the runner executes the command via sh -c, dash -c, or any POSIX shell (which is common in container entrypoints), the first ( will produce a syntax error and the process exits immediately — matching the "crashed and restarted" symptom.
Suggested fix: rewrite the command in POSIX-sh-compatible form, e.g.:
Or, if the runner guarantees bash, document that requirement explicitly (e.g., wrap in bash -c '...') and verify the runner actually invokes bash. Either way, re-run the node-agent boot test and confirm it passes before requesting merge.
B2. Verify the env-var name mapping matches the runner.
The config schema keys are PascalCase (ServerName, WorldName, JoinPassword, Crossplay) but the startup command reads UPPER_SNAKE_CASE (SERVER_NAME, WORLD_NAME, JOIN_PASSWORD, CROSSPLAY). I can't see the runner's mapping code from this diff. If the runner does a mechanical key → env var conversion (e.g., ServerName → SERVERNAME), none of the variables will be set and ${SERVER_NAME} will expand to an empty string, causing the server to start with -name "" and potentially crash. Verify against the runner implementation and, if needed, add an x-env-var (or equivalent) hint to each config property, consistent with how other games in this repo handle the mapping.
2. Non-blocking Suggestions
N1. /server directory may not exist. -savedir /server assumes that directory is present. The Valheim binary may or may not create it. Consider adding a guard:
[ -d /server ]|| mkdir -p /server
before the launch, or confirm the runner / image provides it.
N2. Password visible in the process table.
Passing JOIN_PASSWORD as a CLI argument exposes it in ps aux, container inspect output, and logs. This is typical for game servers and Valheim doesn't support a config file, so it's acceptable, but worth documenting in the description (e.g., "Note: the password is visible in the process list because Valheim has no config-file support.")
N3. requiredDiskMb: 4096 (4 GB).
The research notes say the initial Steam download is ~1 GB. 4 GB is fine for the game itself, but if the platform provisions disk from this value and world data is expected to persist in the same volume, a larger world could outgrow the remainder. Consider whether the value should be higher (e.g., 8192) or whether the runner adds a separate storage volume. Not a bug, just a risk to flag.
N4. ServerName default uses a {SERVER_NAME} placeholder. ServerName: GBRHosting - {SERVER_NAME} is presumably resolved by the platform at deploy time. Make sure the runner performs this substitution before setting the env var, so the startup command doesn't receive the literal string GBRHosting - {SERVER_NAME}. This ties into B2.
N5. No maxPlayers / tick-rate setting exposed.
Valheim supports -maxplayers and -tickrate launch flags that are commonly needed. Not required for v1, but worth a follow-up issue so the template can be extended.
3. Tests
Boot test (blocking): Must pass via the node-agent before merge. The PR currently documents a failure.
Crossplay enabled path: The test config uses config: {} (all defaults). Add a second test case (or a matrix entry) with Crossplay: true to verify the -crossplay flag is passed and the join code appears in the log.
Password path: Similarly, test with a valid JoinPassword (≥ 5 chars) to confirm the server accepts the flag and rejects connections without the code.
Ready-pattern robustness: The pattern is anchored to a specific log line format (Loading: Done. Total seconds sinze ZNet start:). If Valve changes the log format in a future update, the ready detection silently fails. Consider a broader pattern (e.g., matching just Loading: Done\.) as a fallback, or documenting the fragility.
4. Overall Assessment
The template is well-structured, the schema is clean, ports and Steam app ID are correct, and the research is thorough. However, it cannot be merged in its current state: the documented boot failure is almost certainly caused by the bash-array startup command running under a POSIX shell, and the env-var naming convention needs to be verified against the runner. Fix B1 and B2, re-run the node-agent boot test until it passes, and this is ready to merge.
Automated review by AI Git Bot
## 🤖 AI Code Review
## Code Review: Valheim Game Template
### 1. Blocking Issues
**B1. Boot test fails — the template is not deployable as-is.**
The PR description explicitly states:
> booting your template with the node-agent (the real deploy code) failed: FAILED: server crashed and was restarted 1 time(s)
This is a hard blocker. The template must pass the node-agent boot test before merging. The most likely root cause is the **bash-only array syntax** in `defaultStartupCommand`:
```sh
args=(-name "${SERVER_NAME}" -port 2456 ...); args+=(-password ...); ./valheim_server.x86_64 "${args[@]}"
```
`args=(...)`, `args+=(...)`, and `"${args[@]}"` are all **bash extensions**. If the runner executes the command via `sh -c`, `dash -c`, or any POSIX shell (which is common in container entrypoints), the first `(` will produce a syntax error and the process exits immediately — matching the "crashed and restarted" symptom.
**Suggested fix:** rewrite the command in POSIX-sh-compatible form, e.g.:
```sh
cmd="./valheim_server.x86_64 -name \"${SERVER_NAME}\" -port 2456 -world \"${WORLD_NAME:-Dedicated}\" -savedir /server"; \
[ -n "${JOIN_PASSWORD}" ] && cmd="${cmd} -password ${JOIN_PASSWORD}"; \
[ "${CROSSPLAY:-false}" = "true" ] && cmd="${cmd} -crossplay"; \
eval ${cmd}
```
Or, if the runner guarantees bash, document that requirement explicitly (e.g., wrap in `bash -c '...'`) and verify the runner actually invokes bash. Either way, **re-run the node-agent boot test** and confirm it passes before requesting merge.
**B2. Verify the env-var name mapping matches the runner.**
The config schema keys are PascalCase (`ServerName`, `WorldName`, `JoinPassword`, `Crossplay`) but the startup command reads UPPER_SNAKE_CASE (`SERVER_NAME`, `WORLD_NAME`, `JOIN_PASSWORD`, `CROSSPLAY`). I can't see the runner's mapping code from this diff. If the runner does a mechanical `key → env var` conversion (e.g., `ServerName` → `SERVERNAME`), none of the variables will be set and `${SERVER_NAME}` will expand to an empty string, causing the server to start with `-name ""` and potentially crash. **Verify against the runner implementation** and, if needed, add an `x-env-var` (or equivalent) hint to each config property, consistent with how other games in this repo handle the mapping.
---
### 2. Non-blocking Suggestions
**N1. `/server` directory may not exist.**
`-savedir /server` assumes that directory is present. The Valheim binary may or may not create it. Consider adding a guard:
```sh
[ -d /server ] || mkdir -p /server
```
before the launch, or confirm the runner / image provides it.
**N2. Password visible in the process table.**
Passing `JOIN_PASSWORD` as a CLI argument exposes it in `ps aux`, container inspect output, and logs. This is typical for game servers and Valheim doesn't support a config file, so it's acceptable, but worth documenting in the description (e.g., "Note: the password is visible in the process list because Valheim has no config-file support.")
**N3. `requiredDiskMb: 4096` (4 GB).**
The research notes say the initial Steam download is ~1 GB. 4 GB is fine for the game itself, but if the platform provisions disk from this value and world data is expected to persist *in the same volume*, a larger world could outgrow the remainder. Consider whether the value should be higher (e.g., 8192) or whether the runner adds a separate storage volume. Not a bug, just a risk to flag.
**N4. `ServerName` default uses a `{SERVER_NAME}` placeholder.**
`ServerName: GBRHosting - {SERVER_NAME}` is presumably resolved by the platform at deploy time. Make sure the runner performs this substitution *before* setting the env var, so the startup command doesn't receive the literal string `GBRHosting - {SERVER_NAME}`. This ties into B2.
**N5. No `maxPlayers` / tick-rate setting exposed.**
Valheim supports `-maxplayers` and `-tickrate` launch flags that are commonly needed. Not required for v1, but worth a follow-up issue so the template can be extended.
---
### 3. Tests
- **Boot test (blocking):** Must pass via the node-agent before merge. The PR currently documents a failure.
- **Crossplay enabled path:** The test config uses `config: {}` (all defaults). Add a second test case (or a matrix entry) with `Crossplay: true` to verify the `-crossplay` flag is passed and the join code appears in the log.
- **Password path:** Similarly, test with a valid `JoinPassword` (≥ 5 chars) to confirm the server accepts the flag and rejects connections without the code.
- **Ready-pattern robustness:** The pattern is anchored to a specific log line format (`Loading: Done. Total seconds sinze ZNet start:`). If Valve changes the log format in a future update, the ready detection silently fails. Consider a broader pattern (e.g., matching just `Loading: Done\.`) as a fallback, or documenting the fragility.
---
### 4. Overall Assessment
The template is well-structured, the schema is clean, ports and Steam app ID are correct, and the research is thorough. However, **it cannot be merged in its current state**: the documented boot failure is almost certainly caused by the bash-array startup command running under a POSIX shell, and the env-var naming convention needs to be verified against the runner. Fix B1 and B2, re-run the node-agent boot test until it passes, and this is ready to merge.
---
*Automated review by AI Git Bot*
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Drafted by the GBR AI builder. Review before merging: check the settings, ports and descriptions against the game's documentation.
cm2network/steamcmd, Steam app 896660Checked for real
Still open (the builder could not fix these)
Notes from research: Crossplay is enabled with the -crossplay launch flag (allows Xbox, PS5, Switch 2, and Game Pass players to join; a join code is printed to the server log). BepInEx and ValheimPlus mods are supported via the lloesche and community-valheim-tools images. Server password must be at least 5 characters or valheim_server.x86_64 refuses to start. There is no config file; all settings are launch arguments. World data lives in a worlds/ subfolder under the -savedir path. Granting CAP_SYS_NICE is optional but avoids a thread-priority warning. The pfeiffermax image explicitly runs as a non-root user; lloesche and community-valheim-tools images also support non-root operation. First start downloads ~1 GB from Steam.
Sources
Replaces #17 (closed, branch deleted).
🤖 AI Code Review
Code Review: Valheim Game Template
1. Blocking Issues
B1. Boot test fails — the template is not deployable as-is.
The PR description explicitly states:
This is a hard blocker. The template must pass the node-agent boot test before merging. The most likely root cause is the bash-only array syntax in
defaultStartupCommand:args=(...),args+=(...), and"${args[@]}"are all bash extensions. If the runner executes the command viash -c,dash -c, or any POSIX shell (which is common in container entrypoints), the first(will produce a syntax error and the process exits immediately — matching the "crashed and restarted" symptom.Suggested fix: rewrite the command in POSIX-sh-compatible form, e.g.:
Or, if the runner guarantees bash, document that requirement explicitly (e.g., wrap in
bash -c '...') and verify the runner actually invokes bash. Either way, re-run the node-agent boot test and confirm it passes before requesting merge.B2. Verify the env-var name mapping matches the runner.
The config schema keys are PascalCase (
ServerName,WorldName,JoinPassword,Crossplay) but the startup command reads UPPER_SNAKE_CASE (SERVER_NAME,WORLD_NAME,JOIN_PASSWORD,CROSSPLAY). I can't see the runner's mapping code from this diff. If the runner does a mechanicalkey → env varconversion (e.g.,ServerName→SERVERNAME), none of the variables will be set and${SERVER_NAME}will expand to an empty string, causing the server to start with-name ""and potentially crash. Verify against the runner implementation and, if needed, add anx-env-var(or equivalent) hint to each config property, consistent with how other games in this repo handle the mapping.2. Non-blocking Suggestions
N1.
/serverdirectory may not exist.-savedir /serverassumes that directory is present. The Valheim binary may or may not create it. Consider adding a guard:before the launch, or confirm the runner / image provides it.
N2. Password visible in the process table.
Passing
JOIN_PASSWORDas a CLI argument exposes it inps aux, container inspect output, and logs. This is typical for game servers and Valheim doesn't support a config file, so it's acceptable, but worth documenting in the description (e.g., "Note: the password is visible in the process list because Valheim has no config-file support.")N3.
requiredDiskMb: 4096(4 GB).The research notes say the initial Steam download is ~1 GB. 4 GB is fine for the game itself, but if the platform provisions disk from this value and world data is expected to persist in the same volume, a larger world could outgrow the remainder. Consider whether the value should be higher (e.g., 8192) or whether the runner adds a separate storage volume. Not a bug, just a risk to flag.
N4.
ServerNamedefault uses a{SERVER_NAME}placeholder.ServerName: GBRHosting - {SERVER_NAME}is presumably resolved by the platform at deploy time. Make sure the runner performs this substitution before setting the env var, so the startup command doesn't receive the literal stringGBRHosting - {SERVER_NAME}. This ties into B2.N5. No
maxPlayers/ tick-rate setting exposed.Valheim supports
-maxplayersand-tickratelaunch flags that are commonly needed. Not required for v1, but worth a follow-up issue so the template can be extended.3. Tests
config: {}(all defaults). Add a second test case (or a matrix entry) withCrossplay: trueto verify the-crossplayflag is passed and the join code appears in the log.JoinPassword(≥ 5 chars) to confirm the server accepts the flag and rejects connections without the code.Loading: Done. Total seconds sinze ZNet start:). If Valve changes the log format in a future update, the ready detection silently fails. Consider a broader pattern (e.g., matching justLoading: Done\.) as a fallback, or documenting the fragility.4. Overall Assessment
The template is well-structured, the schema is clean, ports and Steam app ID are correct, and the research is thorough. However, it cannot be merged in its current state: the documented boot failure is almost certainly caused by the bash-array startup command running under a POSIX shell, and the env-var naming convention needs to be verified against the runner. Fix B1 and B2, re-run the node-agent boot test until it passes, and this is ready to merge.
Automated review by AI Git Bot
greg referenced this pull request2026-10-26 01:57:22 +00:00
Pull request closed