// the find
amadvance/snapraid-daemon
A lightweight daemon for SnapRAID featuring a REST API, job scheduler, and web interface
A C daemon that wraps the SnapRAID CLI to run scheduled sync and scrub jobs, poll SMART data, spin down idle disks, and send notifications, with a REST API and web UI on top. It is aimed at people running SnapRAID on a home or small NAS who would rather not manage cron jobs and read logs by hand.
- It runs the real snapraid binary rather than reimplementing parity logic, so the data-integrity path is code people already trust and the daemon's job is scheduling and visibility.
- Dependencies are vendored and cut down: civetweb for HTTP, tommyds for hash tables and lists, jsmn for JSON, monocypher for crypto. The trim_civetweb.py and trim_monocipher.py scripts show the upstream code was pared to what is needed, which keeps the attack surface small.
- Packaging covers the platforms SnapRAID users actually run: systemd and rc scripts on Linux, plus Arch, deb, rpm and Slackware packages, and an NSIS installer and mingwapp.c for Windows.
- The layout separates the platform layer (unixapp.c, mingwapp.c, os/) from the scheduler, state, and REST code, so porting or testing one side should not mean touching the other.
- The HTTP server is civetweb, a C server that accepts network input, and the README does not say how the REST API and web UI authenticate or which interfaces they bind to by default. Check that before exposing it beyond the LAN.
- Vendored copies mean upstream fixes to civetweb, tommyds, jsmn and monocypher do not arrive by bumping a version. Someone has to re-run the trim scripts and re-audit the result, and nothing in the repo shows that happening on a schedule.
- Adoption is thin: 132 stars and 3 forks. The visible tree has only selftest.c as a test entry point (the listing is truncated, so there may be more), which is a light safety net for software that runs sync jobs against real disks.
- SMART polling and spindown mean the daemon talks to disk hardware directly and probably needs elevated privileges. The README does not cover the privilege model or how it behaves when a disk starts failing mid-job.