Skip to content

feat(install): use exact native 0.x packages on fresh Linux hosts - #1359

Merged
frahlg merged 4 commits into
masterfrom
codex/native-installer-20260923
Sep 23, 2026
Merged

frahlg merged 4 commits into
masterfrom
codex/native-installer-20260923

Conversation

@frahlg

@frahlg frahlg commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

New FTW sites need the published native 0.x package, while the old one-line installer still pulled a moving Docker image. The fresh Linux installer now requires an exact v0.X.Y[-beta.N] tag and an explicit --fresh-host acknowledgement. It checks the archive and checksum, stages it through ftw-launcher, then creates the native service. README and the setup guides point beta testers to this path and stop recommending the old Pi image for new installs.

The installer refuses known old paths, services, the FTW account and an occupied port before downloading. A custom, stopped Docker site cannot be found by fixed path, so --fresh-host asks the operator to confirm that none exists. If the first install fails after host changes, --resume --tag requires the same tag and package digest, checks the pending service, preserves persistent data, and retries the start. The pending record is removed only after the service stays active.

This is for fresh 64-bit Linux beta hosts. It does not migrate 1.x, 2.x, 3.x or an earlier native site; those remain on their current version until the guided migration is tested. releases/latest still points to the legacy 2.x line.

Validation: make verify with Bash 5, installer guard tests, checksum and receipt checks on both published v0.131.0-beta.1 assets, and a read-only refusal on homelab-rpi before sudo or download while its existing service stayed active. A full fresh-host systemd install and a legacy migration still need field testing. The README edit is separate from the small README hunk in open PR #1051.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-23T10:41:19.368417Z 2386176 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 23861768d6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/install.sh Outdated
Comment on lines +21 to +23
if [[ "$#" != 2 || "${1:-}" != --tag ]]; then
usage >&2
exit 2

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Update the README to pass the required release tag

Anyone following the primary Linux installation instructions in README.md:91-100 still pipes this script into bash without arguments, so this new guard exits with status 2 before installing anything while the README continues to promise a Docker installation. Update that entry point to use the exact-tag native flow and describe its new behavior in the same change.

AGENTS.md reference: AGENTS.md:L24-L25

Useful? React with 👍 / 👎.

Comment thread scripts/install.sh Outdated
Comment on lines +50 to +55
existing_paths=(
/opt/ftw /var/lib/ftw /etc/systemd/system/ftw.service
/etc/systemd/system/forty-two-watts.service
"$HOME/ftw/docker-compose.yml"
"$HOME/forty-two-watts/docker-compose.yml"
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Detect supported custom legacy install directories

For an existing Compose site created with the old installer's supported FTW_DIR override, such as /srv/ftw, none of these checks sees its docker-compose.yml. Running this fresh installer can therefore collide with the active container or create a blank native state alongside the preserved household state, despite the documented refusal of existing sites; inspect known running containers/services or require an explicit fresh-host acknowledgement rather than checking only two paths under the invoking user's home.

AGENTS.md reference: AGENTS.md:L20-L21

Useful? React with 👍 / 👎.

Comment thread scripts/install.sh
Comment on lines +139 to +142
if ! as_root systemctl enable --now ftw.service; then
as_root systemctl disable --now ftw.service || true
echo "FTW did not start; the verified package remains at /opt/ftw for inspection." >&2
exit 1

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep failed fresh installations retryable

If the initial service start fails, this branch disables the unit but retains the ftw account, /opt/ftw, and /etc/systemd/system/ftw.service; every subsequent invocation is then rejected by the preflight checks at lines 57-65. The same dead end occurs when the later startup probe fails, even though its message explicitly says to inspect the journal before retrying, so the failure path should either remove the newly created artifacts or resume the exact staged installation.

AGENTS.md reference: AGENTS.md:L24-L25

Useful? React with 👍 / 👎.

@frahlg
frahlg merged commit a8f3fab into master Sep 23, 2026
16 checks passed
@frahlg
frahlg deleted the codex/native-installer-20260923 branch September 23, 2026 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant