Files
reterminal-dm4/chromium-setup/emmc-provisioning/dashboard
..

CM4 Provisioning Dashboard

Flask web UI to monitor the eMMC deployment process and show device connection steps.

  • Connection steps: Numbered instructions for putting the reTerminal in boot mode and connecting it.
  • Live status: Idle / Connecting (rpiboot) / Flashing / Backup / Done / Error, with optional progress.
  • Backup / Restore: Toggle between Flash (deploy golden image) and Backup (save eMMC to a timestamped file when device is connected in boot mode). List and download saved backups. For each raw .img backup you can click Shrink (PiShrink) or Compress (shrink + xz) to reduce size.
  • Build cloud-init image: Download the latest Raspberry Pi OS Lite (arm64) from the official repository and inject cloud-init NoCloud files so the image is ready for first-boot configuration. The result appears in the backups list; set it as golden to deploy. Requires loop devices and mount (if the dashboard runs in an LXC, the container may need privileged mode or loop support).
  • Recent log: Tail of the flash log (from the host, via the shared bind mount).

The dashboard reads /var/lib/cm4-provisioning/status.json and flash.log, which the flash script (running on the Proxmox host) updates. When the dashboard runs inside the LXC, that directory is bind-mounted from the host, so it sees the same files.

Run locally (development)

cd dashboard
pip install flask  # or use venv
python3 app.py
# Open http://localhost:5000

Run in LXC (Proxmox)

  1. Copy the dashboard into the container (e.g. to /opt/cm4-provisioning/dashboard).
  2. Install Flask if needed: apt install -y python3-flask or pip install flask.
  3. Install the systemd unit and enable it:
cp /opt/cm4-provisioning/dashboard/cm4-dashboard.service /etc/systemd/system/
systemctl daemon-reload
systemctl enable --now cm4-dashboard
  1. Open http://<LXC-IP>:5000 (or port-forward from the Proxmox host).

Environment (optional)

  • CM4_STATUS_FILE path to status JSON (default: /var/lib/cm4-provisioning/status.json).
  • CM4_LOG_FILE path to flash log (default: /var/lib/cm4-provisioning/flash.log).
  • CM4_BACKUPS_DIR path to backups directory (default: …/backups).
  • CM4_BUILD_STATUS_FILE path to build-cloudinit status JSON (default: …/build_cloudinit_status.json).