Skip to content

Prebuilt RPi4 SD-card image (42w.local, WiFi captive portal) #183

Closed

Description

@frahlg

Goal

Ship a flashable 42w-rpi4-arm64.img.xz so new users can go from "downloaded file" to "working dashboard" without touching a terminal.

Target UX:

  1. Download image from GitHub Releases
  2. Flash with Raspberry Pi Imager
  3. Boot the Pi — http://42w.local:8080/setup responds within ~60 s
  4. If no WiFi is configured, the Pi exposes a 42w-setup access point with a captive portal for onboarding

Approach

Build on top of Raspberry Pi OS Lite 64-bit (Bookworm) using pi-gen with a custom stage. NetworkManager is the default on Bookworm, so wifi-connect integrates cleanly.

Phased delivery:

  • Phase 1 — Minimal flashable image. Docker + compose plugin + avahi baked in. Hostname 42w. A firstboot.service pulls the ghcr.io/frahlg/forty-two-watts* images and runs docker compose up -d. No captive portal yet — WiFi configured via Raspberry Pi Imager's built-in advanced-options panel.
  • Phase 2 — First-boot hardening. Retry on failure, wait for network-online.target, optional /boot/42w.txt config file for headless overrides.
  • Phase 3 — wifi-connect captive portal. Systemd unit starts the portal if no NetworkManager connection comes up within 30 s. Branded HTML. HTTP endpoint to reset WiFi state.
  • Phase 4 — CI integration. Add an rpi-image job to release.yml, gated on the docker job, that builds the image and uploads it as a release asset.
  • Phase 5 — Docs. docs/rpi-image.md plus a "Fastest install" section at the top of README.md.

Cost

Zero — public repo gets unlimited Actions minutes and unlimited release-asset storage/bandwidth. The compressed image will be ~800 MB–1.2 GB, well under the 2 GB per-asset limit.

Risks

  • pi-gen in GitHub Actions needs disk-space cleanup at job start (the standard ~30 GB-freeing trick).
  • Captive-portal detection on iOS 17+ is flaky — may need DNS-hijack tweaks.
  • 8 GB SD cards will be tight; 16 GB recommended as the minimum.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions