Raspberry Pi
Hardcharger™ runs on a Raspberry Pi 4 or 5 with a 64-bit operating system: the release has a
linux-arm64 build and the image has a linux/arm64 variant. A Pi with 8 GB or 16 GB of memory
and an SSD makes a capable little analytics server.
Check your Pi
Section titled “Check your Pi”$ uname -m…$ getconf GNU_LIBC_VERSIONglibc …| You see | Then |
|---|---|
aarch64 and glibc 2.28 or newer (Raspberry Pi OS “Bookworm” or “Trixie”, Ubuntu 20.04 or newer) |
Install natively, below. |
aarch64 and an older glibc |
Use Docker, below, or upgrade the OS. |
armv7l or armv6l |
That’s a 32-bit OS. Install the 64-bit Raspberry Pi OS: Hardcharger has no 32-bit build. |
The installer checks all of this before it downloads anything, and says what to do.
Install
Section titled “Install”curl https://install.hardcharger.gizmodata.com | shHARDCHARGER_ADMIN_PASSWORD='change-me' ~/.hardcharger/bin/hardcharger-server --config pi.yamldocker run -d --name hardcharger --restart unless-stopped -p 31337:31337 -p 31338:31338 \ -e HARDCHARGER_ADMIN_PASSWORD='change-me' -v /mnt/ssd/hardcharger:/var/lib/hardcharger \ ghcr.io/gizmodata/hardcharger:latest --database /var/lib/hardcharger/analytics.duckdb \ --memory-limit 5GBSettings for a Pi
Section titled “Settings for a Pi”# pi.yaml: an 8 GB Pi with its database on an SSDdatabase: analytics.duckdb # on the SSD: an SD card is slow and wears outmemory_limit: 5GB # leave the OS and page cache some roomsession_idle_timeout: 600max_concurrent_statements: 2 # four cores: queue rather than oversubscribeinit_sql_commands: "SET threads = 4; SET temp_directory = 'tmp';"- Storage. Put the database and DuckDB’s spill directory (
temp_directory) on a USB 3 or NVMe SSD. - Memory.
memory_limitaround 60% of RAM leaves room for the OS. DuckDB spills to disk beyond it rather than failing. - Heat. Sustained queries throttle a Pi without cooling: use a case with a fan or a heatsink.
- Network. Bind to your LAN, turn on TLS before anyone else connects, and keep the health port inside your network.