rpinfo is a lightweight RESTful API server written in Go that exposes
detailed system information for Raspberry Pi devices. It utilizes the
vcgencmd utility to provide real-time hardware data such as CPU temperature,
voltages, firmware configuration, throttling status and clock frequencies.
- Exposes Raspberry Pi system metrics via a clean RESTful API
- Supports optional bearer token authentication
- Configurable host and port via command-line flags
- Fast and efficient Go implementation
- Ideal for integration with dashboards, monitoring tools, or automation scripts
- Raspberry Pi running a Linux-based OS (e.g., Raspberry Pi OS)
vcgencmdutility (preinstalled on Raspberry Pi OS)
Download the latest release from the releases page.
Start the server on localhost:8080 by default.
./rpinfo serverFor further configuration, see the command-line options below.
| Flag | Description | Default |
|---|---|---|
-H, --host |
Host to bind the server to | localhost |
-p, --port |
Port to run the server on | 8080 |
-a, --auth |
Enable bearer token authentication | false |
-t, --token |
Bearer token used for authentication | |
-m, --metrics |
Enable Prometheus metrics endpoint | false |
-r, --redoc |
Enable ReDoc API documentation | false |
-f, --log-format |
Set log format: structured, json |
structured |
-l, --log-level |
Set log level: debug, info, warn, error |
info |
-h, --help |
Show help for the server command |
Additional a systemd service file and environment file are provided in the contrib directory for automatic startup on boot and management of the server.
| Endpoint | Description |
|---|---|
/configuration |
Returns firmware configuration |
/temperature |
Returns CPU temperature |
/throttled(?human=true) |
Returns throttling status |
/voltages |
Returns voltages |
/clock |
Returns clock frequencies |
All endpoints return JSON-formatted data.
The complete API specification is available at /redoc.
Additionally, the server supports an optional /metrics endpoint for
Prometheus exposing clock, temperature, and voltage gauges.
- If authentication is enabled, all API calls must include the
Authorizationheader with the valid bearer token. - Use strong and random tokens.
- Consider running the server behind HTTPS if exposed publicly.
Contributions are welcome! Please fork the repository and submit a pull request. For major changes, open an issue first to discuss what you would like to change.
Ensure that your code adheres to the existing style and includes appropriate tests.
This project is licensed under the MIT License.