[GH-ISSUE #4417] [DX/Hosting] Headless dedicated server setup friction: resource preparation flow and documentation gaps #1317

Closed
opened 2026-11-02 15:45:59 +07:00 by bsakaguchi · 4 comments
Owner

Originally created by @indraine on GitHub (Oct 30, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/4417

Originally assigned to: @Detimes on GitHub.

Summary

Deploying horizon-server on a headless Linux host (LXC/VM/VPS) currently involves high friction due to the resource preparation pipeline relying on a full local client installation, JDK 25, manual download of server.jar, and manual transfer of extracted assets.

Friction Points Observed During Self-Hosting Deployment

  1. Headless Server Cold Start (horizon-server init):

    • horizon-server init generates server.toml, but when horizon-server start is run without prepared resources, the server repeatedly crashes with os error 2 trying to load fonts and textures before supervisor termination.
    • There is no guided subcommand like horizon-server import-bundle <path> or a clear pre-flight check during init that warns the administrator before starting the background daemon.
  2. Resource Preparation Pipeline Coupling:

    • horizon-prepare requires both client launcher assets and server.jar, plus JDK 25.
    • On a headless server without an official Minecraft launcher directory, running horizon-prepare is impossible directly. The only workflow is preparing resources on a separate desktop client and manually copying .local/horizon-client/26.3 across the network.
    • Partial or corrupted asset transfers (e.g. missing font textures) cause silent engine panics rather than explicit validation errors like "Resources incomplete: missing font definitions in assets/minecraft/font".
  3. server.jar Manual Discovery:

    • horizon-prepare expects --server-jar PATH, but does not automatically resolve the download URL from versions/26.3/26.3.json (downloads.server.url) even when 26.3.json has already been read from --minecraft-dir.

Proposed Improvements

  1. CLI Helper for Bundling & Importing Resources:

    • Add a client command: horizon-prepare export-bundle --output horizon-resources-26.3.tar.gz (or via launcher UI) that packages all extracted facts, assets, fonts, and registries into a single verified archive.
    • Add a server command: horizon-server import-resources <bundle.tar.gz> that extracts and validates checksums against research-lock.json.
  2. Auto-fetch server.jar:

    • If --server-jar is not provided, allow horizon-prepare to read the SHA-1 and download URL directly from the imported 26.3.json version manifest.
  3. Fail-Fast Resource Validator:

    • Before booting horizon-engine on the dedicated server, validate that essential assets (fonts, atlases, registries, horizon-resources.json) are present and uncorrupted, printing a human-readable diagnostic error instead of a generic os error 2 crash report.
  4. Unified Cross-Platform Setup Script:

    • Provide an official automated bootstrap script for both Linux/macOS (setup-server.sh) and Windows (setup-server.ps1) that:
      1. Automatically locates the installed launcher directory (.minecraft / CurseForge / ATLauncher).
      2. Extracts downloads.server.url from versions/26.3/26.3.json and fetches server.jar.
      3. Checks JDK 25 availability.
      4. Runs horizon-prepare (and optional sounds extraction).
      5. Packages everything into horizon-resources-26.3.tar.gz ready to be copied to the remote server or extracted locally into resources/.
  5. Documentation in docs/hosting.md:

    • Explicitly document the headless workflow:
      1. Run resource preparation on the client PC.
      2. Archive .local/horizon-client/26.3.
      3. Transfer and extract into /opt/horizon-server/resources/.
Originally created by @indraine on GitHub (Oct 30, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/4417 Originally assigned to: @Detimes on GitHub. ### Summary Deploying `horizon-server` on a headless Linux host (LXC/VM/VPS) currently involves high friction due to the resource preparation pipeline relying on a full local client installation, JDK 25, manual download of `server.jar`, and manual transfer of extracted assets. ### Friction Points Observed During Self-Hosting Deployment 1. **Headless Server Cold Start (`horizon-server init`)**: - `horizon-server init` generates `server.toml`, but when `horizon-server start` is run without prepared resources, the server repeatedly crashes with `os error 2` trying to load fonts and textures before supervisor termination. - There is no guided subcommand like `horizon-server import-bundle <path>` or a clear pre-flight check during `init` that warns the administrator before starting the background daemon. 2. **Resource Preparation Pipeline Coupling**: - `horizon-prepare` requires both client launcher assets and `server.jar`, plus JDK 25. - On a headless server without an official Minecraft launcher directory, running `horizon-prepare` is impossible directly. The only workflow is preparing resources on a separate desktop client and manually copying `.local/horizon-client/26.3` across the network. - Partial or corrupted asset transfers (e.g. missing font textures) cause silent engine panics rather than explicit validation errors like *"Resources incomplete: missing font definitions in assets/minecraft/font"*. 3. **`server.jar` Manual Discovery**: - `horizon-prepare` expects `--server-jar PATH`, but does not automatically resolve the download URL from `versions/26.3/26.3.json` (`downloads.server.url`) even when `26.3.json` has already been read from `--minecraft-dir`. ### Proposed Improvements 1. **CLI Helper for Bundling & Importing Resources**: - Add a client command: `horizon-prepare export-bundle --output horizon-resources-26.3.tar.gz` (or via launcher UI) that packages all extracted facts, assets, fonts, and registries into a single verified archive. - Add a server command: `horizon-server import-resources <bundle.tar.gz>` that extracts and validates checksums against `research-lock.json`. 2. **Auto-fetch `server.jar`**: - If `--server-jar` is not provided, allow `horizon-prepare` to read the SHA-1 and download URL directly from the imported `26.3.json` version manifest. 3. **Fail-Fast Resource Validator**: - Before booting `horizon-engine` on the dedicated server, validate that essential assets (fonts, atlases, registries, `horizon-resources.json`) are present and uncorrupted, printing a human-readable diagnostic error instead of a generic `os error 2` crash report. 4. **Unified Cross-Platform Setup Script**: - Provide an official automated bootstrap script for both Linux/macOS (`setup-server.sh`) and Windows (`setup-server.ps1`) that: 1. Automatically locates the installed launcher directory (`.minecraft` / CurseForge / ATLauncher). 2. Extracts `downloads.server.url` from `versions/26.3/26.3.json` and fetches `server.jar`. 3. Checks JDK 25 availability. 4. Runs `horizon-prepare` (and optional sounds extraction). 5. Packages everything into `horizon-resources-26.3.tar.gz` ready to be copied to the remote server or extracted locally into `resources/`. 5. **Documentation in `docs/hosting.md`**: - Explicitly document the headless workflow: 1. Run resource preparation on the client PC. 2. Archive `.local/horizon-client/26.3`. 3. Transfer and extract into `/opt/horizon-server/resources/`.
Author
Owner

@DUzzL commented on GitHub (Oct 30, 2026):

🤖 Agent: /claim (narrow slice: headless workflow in docs/hosting.md plus a fail-fast missing-file message in horizon-server)

<!-- gh-comment-id:6524674127 --> @DUzzL commented on GitHub (Oct 30, 2026): 🤖 Agent: /claim (narrow slice: headless workflow in docs/hosting.md plus a fail-fast missing-file message in horizon-server)
Author
Owner

@github-actions[bot] commented on GitHub (Oct 30, 2026):

🤖 Claims: refused, narrow slice: headless workflow in docshosting.md plus a fai isn't understood here. Use /claim or /unclaim (the trusted reviewers: /unclaim @login). (asked by @DUzzL)

<!-- gh-comment-id:6524677625 --> @github-actions[bot] commented on GitHub (Oct 30, 2026): 🤖 Claims: refused, `narrow slice: headless workflow in docshosting.md plus a fai` isn't understood here. Use `/claim` or `/unclaim` (the trusted reviewers: `/unclaim @login`). (asked by @DUzzL)
Author
Owner

@DUzzL commented on GitHub (Oct 30, 2026):

🤖 Agent: /unclaim. No PR from me for this; withdrawing my claim.

<!-- gh-comment-id:6525380887 --> @DUzzL commented on GitHub (Oct 30, 2026): 🤖 Agent: /unclaim. No PR from me for this; withdrawing my claim.
Author
Owner

@Detimes commented on GitHub (Oct 31, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6539160258 --> @Detimes commented on GitHub (Oct 31, 2026): 🤖 Agent: /claim
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#1317
No description provided.