{"id":48830246,"url":"https://github.com/camjac251/power-panel","last_synced_at":"2026-04-14T20:02:38.331Z","repository":{"id":346058091,"uuid":"1188372916","full_name":"camjac251/power-panel","owner":"camjac251","description":"Remote server power management via Redfish/WoL","archived":false,"fork":false,"pushed_at":"2026-04-10T05:20:19.000Z","size":354,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-10T07:29:57.805Z","etag":null,"topics":["bmc","go","htmx","ipmi","power-management","redfish","server-management","tailscale","wake-on-lan"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/camjac251.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-03-22T01:30:23.000Z","updated_at":"2026-04-10T05:20:16.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/camjac251/power-panel","commit_stats":null,"previous_names":["camjac251/power-panel"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/camjac251/power-panel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/camjac251%2Fpower-panel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/camjac251%2Fpower-panel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/camjac251%2Fpower-panel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/camjac251%2Fpower-panel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/camjac251","download_url":"https://codeload.github.com/camjac251/power-panel/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/camjac251%2Fpower-panel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31812977,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T18:05:02.291Z","status":"ssl_error","status_checked_at":"2026-04-14T18:05:01.765Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bmc","go","htmx","ipmi","power-management","redfish","server-management","tailscale","wake-on-lan"],"created_at":"2026-04-14T20:02:33.923Z","updated_at":"2026-04-14T20:02:38.300Z","avatar_url":"https://github.com/camjac251.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# Power Panel\n\n**Remote server power management from your phone**\n\n[![CI](https://github.com/camjac251/power-panel/actions/workflows/ci.yml/badge.svg)](https://github.com/camjac251/power-panel/actions/workflows/ci.yml)\n[![Release](https://img.shields.io/github/v/release/camjac251/power-panel)](https://github.com/camjac251/power-panel/releases/latest)\n[![Go](https://img.shields.io/badge/go-1.26+-00ADD8.svg)](https://go.dev/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n\nSingle-binary web UI for Redfish/WoL power control, live sensor monitoring, and audit logging.\n\u003cbr\u003e\nDeploy it anywhere you can reach your BMC.\n\n[Features](#features) · [Quick Start](#quick-start) · [Configuration](#configuration) · [Architecture](#architecture)\n\n\u003c/div\u003e\n\n---\n\n## Features\n\n| Feature | Description |\n|---|---|\n| **Dual-Path Power On** | Redfish first, Wake-on-LAN as automatic fallback |\n| **BMC Auto-Detection** | Discovers supported reset types (shutdown, force off, restart) at startup |\n| **Live Sensors** | CPU/system temps, fan speeds, power draw streamed via SSE in real time |\n| **Tailscale Auth** | Identity from Tailscale Serve headers or WhoIs socket. No login page, no passwords |\n| **Audit Log** | Every power action recorded with user, duration, and outcome in SQLite |\n| **Transition States** | Instant UI feedback (Powering On, Shutting Down, Restarting) that auto-clears on BMC confirmation |\n| **Action Cooldown** | Configurable cooldown prevents accidental rapid-fire commands |\n| **Auto-Updates** | Checks GitHub Releases, verifies SHA256 digest, replaces binary, restarts via systemd. Configurable. |\n| **Hardened Service** | systemd with DynamicUser, strict sandboxing, empty CapabilityBoundingSet |\n| **Zero JS Build Step** | Go + [templ](https://templ.guide) + [htmx](https://htmx.org) + [Tailwind v4](https://tailwindcss.com) |\n\n---\n\n## How It Works\n\n```mermaid\nflowchart LR\n    BROWSER[Browser] --\u003e|Tailscale| HOST[Power Panel Host]\n\n    subgraph PI_INNER [Power Panel]\n        direction TB\n        SSE[SSE Handler] --\u003e CACHE[BMC Cache]\n        CACHE --\u003e BMC_CLIENT[Redfish Client]\n        ACTIONS[Power Actions] --\u003e BMC_CLIENT\n        ACTIONS --\u003e DB[(SQLite)]\n    end\n\n    HOST --\u003e SSE\n    HOST --\u003e ACTIONS\n    BMC_CLIENT --\u003e|HTTPS| BMC[BMC / IPMI]\n    ACTIONS --\u003e|UDP| WOL[Server NIC]\n```\n\nThe page loads instantly with no BMC blocking. SSE fills in live power state and sensor data on a configurable poll interval. A shared cache ensures only one BMC call per interval regardless of how many browsers are connected.\n\n---\n\n## Quick Start\n\n### Download\n\nGrab a binary from the [latest release](https://github.com/camjac251/power-panel/releases/latest):\n\n| Platform | Binary | Devices |\n|----------|--------|---------|\n| Linux x64 | [`power-panel-linux-amd64`](https://github.com/camjac251/power-panel/releases/latest/download/power-panel-linux-amd64) | NUCs, mini PCs, x86 servers |\n| Linux ARM64 | [`power-panel-linux-arm64`](https://github.com/camjac251/power-panel/releases/latest/download/power-panel-linux-arm64) | Pi 3/4/5, Rock, Odroid, Pine64 |\n| Linux ARMv7 | [`power-panel-linux-armv7`](https://github.com/camjac251/power-panel/releases/latest/download/power-panel-linux-armv7) | Pi Zero 2 W (32-bit), older Pi 3 |\n| Linux ARMv6 | [`power-panel-linux-armv6`](https://github.com/camjac251/power-panel/releases/latest/download/power-panel-linux-armv6) | Pi Zero W (original) |\n| macOS ARM64 | [`power-panel-darwin-arm64`](https://github.com/camjac251/power-panel/releases/latest/download/power-panel-darwin-arm64) | Apple Silicon Macs |\n| macOS x64 | [`power-panel-darwin-amd64`](https://github.com/camjac251/power-panel/releases/latest/download/power-panel-darwin-amd64) | Intel Macs |\n| Windows x64 | [`power-panel-windows-amd64.exe`](https://github.com/camjac251/power-panel/releases/latest/download/power-panel-windows-amd64.exe) | Windows PCs |\n\n### Prerequisites\n\n- A server with a Redfish-capable BMC (IPMI/iDRAC/iLO/etc.)\n- The BMC password in the `IPMI_PASS` environment variable\n\n### Build from source\n\nRequires [mise](https://mise.jdx.dev) for toolchain management (Go, templ, Tailwind CSS, air).\n\n```bash\nmise install           # Install Go, templ, tailwindcss, air, golangci-lint\nmise run setup         # go mod tidy\nmise run build         # Production build (generate + CSS + compile)\nmise run build:arm64   # Cross-compile for ARM64\nmise run test          # Run tests\nmise run lint          # Run golangci-lint\nmise run fmt           # Auto-format Go code\n```\n\n### Deploy\n\n```bash\nmise run deploy        # SCP to target host and restart systemd service\n```\n\nOr manually:\n\n```bash\nsudo cp power-panel-arm64 /opt/power-panel/power-panel\nsudo cp deploy/power-panel.service /etc/systemd/system/\nsudo cp deploy/config.example.yaml /etc/power-panel/config.yaml  # edit this\necho \"IPMI_PASS=your-password\" | sudo tee /etc/power-panel/env\nsudo chmod 600 /etc/power-panel/env\nsudo systemctl enable --now power-panel\n```\n\nThe systemd service uses `DynamicUser=yes` and `StateDirectory=power-panel`, so the SQLite database lives at `/var/lib/power-panel/` automatically.\n\n### Tailscale Serve\n\nPower Panel listens on localhost by default. Use [Tailscale Serve](https://tailscale.com/kb/1312/serve) to expose it over your tailnet with HTTPS and identity headers:\n\n```bash\ntailscale serve --bg 8080\n```\n\nThis proxies `https://\u003chostname\u003e.\u003ctailnet\u003e/` to `localhost:8080`. Tailscale injects `Tailscale-User-Login` and `Tailscale-User-Name` headers, which Power Panel trusts from loopback for audit logging. No login page needed.\n\n### Docker\n\nMulti-arch images (amd64, arm64) are published to GHCR on every release.\n\n```bash\ndocker run -d \\\n  -e IPMI_PASS=your-password \\\n  -v power-panel-data:/var/lib/power-panel \\\n  -v /path/to/config.yaml:/etc/power-panel/config.yaml \\\n  -p 8080:8080 \\\n  ghcr.io/camjac251/power-panel:latest\n```\n\nOr with docker compose:\n\n```bash\ncp deploy/config.example.yaml config.yaml  # edit this\nIPMI_PASS=your-password docker compose up -d\n```\n\n### Development\n\n```bash\nIPMI_PASS=password mise run dev   # Hot-reload with templ + air + tailwindcss watchers\n```\n\nDev server starts at `http://localhost:8080` with live reload via templ's proxy.\n\n---\n\n## Configuration\n\nCopy the example and edit for your environment:\n\n```bash\ncp deploy/config.example.yaml /etc/power-panel/config.yaml\n```\n\n```yaml\nserver:\n  name: my-server\n  description: My Workstation\n  # ping_host: \"192.0.2.10:22\"   # OS reachability check (omit to skip)\n  # bmc_url: \"https://192.0.2.1\" # BMC web UI link (omit to hide)\n\nipmi:\n  host: 192.0.2.1\n  username: admin\n  insecure: true\n  # password from IPMI_PASS env var\n\nwol:\n  mac: \"00:00:5E:00:53:01\"\n  broadcast: \"192.0.2.255\"\n\npower:\n  cooldown_seconds: 30\n  boot_timeout_seconds: 120\n  poll_interval_seconds: 5\n\n# update:\n#   enabled: true       # check for updates (default: true, ignored in Docker)\n#   auto_apply: true    # apply updates automatically (default: true)\n\ndata_dir: /var/lib/power-panel\n```\n\n| Environment Variable | Description |\n|---|---|\n| `IPMI_PASS` | **Required.** BMC/IPMI password |\n| `DEPLOY_HOST` | Deploy target hostname (default: `power-panel`) |\n\n---\n\n## Architecture\n\n```\nmain.go              Entry point, flag parsing, signal handling\ninternal/\n  bmc/               Redfish client (gofish), WoL, BMC cache, TCP reachability\n  config/            YAML config, env var loading, validation\n  db/                SQLite audit log (pure Go, modernc driver)\n  server/            HTTP routes, SSE handler, power action handlers\n  updater/           Self-update from GitHub Releases with digest verification\nviews/               templ templates (home page, layout, update, helpers)\ncomponents/          templUI components (button, dialog, icon, toast, tooltip)\nassets/              Embedded static files (fonts, JS, generated CSS)\ndeploy/              systemd service + example config\n```\n\n### Tech Stack\n\n| Layer | Technology |\n|---|---|\n| Language | [Go 1.26](https://go.dev/) |\n| Templates | [templ](https://templ.guide) (type-safe, compiled) |\n| Interactivity | [htmx](https://htmx.org) + SSE |\n| Styling | [Tailwind CSS v4](https://tailwindcss.com) |\n| Components | [templUI](https://www.templui.com) |\n| Icons | [Lucide](https://lucide.dev) (SVG, in-memory cache) |\n| BMC Protocol | [Redfish](https://www.dmtf.org/standards/redfish) via [gofish](https://github.com/stmcginnis/gofish) |\n| Database | [SQLite](https://pkg.go.dev/modernc.org/sqlite) (pure Go, no CGO) |\n| Auth | [Tailscale](https://tailscale.com) identity headers |\n\n---\n\n## License\n\n[MIT](LICENSE). [Geist](https://vercel.com/font) font is licensed under the [SIL Open Font License 1.1](assets/fonts/OFL.txt).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcamjac251%2Fpower-panel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcamjac251%2Fpower-panel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcamjac251%2Fpower-panel/lists"}