Control your Raspberry Pi with a user-friendly web interface.
RaspController lets you manage and monitor your Raspberry Pi remotely. Key features include:
- File Sharing: Easily share files from a designated public folder.
- Hardware and Software Monitoring: Track RAM, CPU, disk usage, and running processes.
- GPIO Control: Configure and manipulate GPIO pins directly through the interface.
- Service Discovery: Automatic device detection on your network using mDNS.
- RoseDB (https://github.com/rosedblabs/rosedb): A fast and efficient embedded database for storing historical data, charts, and pin management.
- go-gpiocdev (https://github.com/warthog618/go-gpiocdev): Provides Go bindings to interact with Raspberry Pi GPIO pins.
- mdns (https://github.com/hashicorp/mdns): Implements multicast DNS (mDNS) for effortless service discovery.
- Fiber (https://gofiber.io/): A high-performance web framework for Go, powering the web interface.
- Raspberry Pi: This project was initially designed for the Raspberry Pi, but it's versatile enough to run on other compatible devices.
- Operating System: Tested on Arch Linux ARM and Raspberry Pi OS, but should work on other supported distributions.
- vcgencmd (https://github.com/raspberrypi/utils): Required for certain functionalities.
Customize RaspController's behavior using the conf.yml
file:
AUTH_TOKEN: "your_strong_secret_key" # Replace with a secure key
DB_DIR: "/tmp/rosedb" # Path to store the RoseDB database
PORT: 8080 # Port for the web server
SHARE_DIR: "/home/rasp/public" # Directory for shared files
RaspController exposes a RESTful API (all routes prefixed with /api
):
Information
/api/info
: Retrieve general system information (RAM, CPU, disk, etc.)./api/info/ps
: List running processes.
GPIO
/api/gpio
: List used GPIO pins./api/gpio/all
: List available GPIO pins./api/gpio/:id
: Get details about a specific GPIO pin./api/gpio/:id
(PATCH): Update GPIO configuration (example JSON body):{ "direction": "out", "value": 1 }
- Create a project directory: e.g.,
/opt/raspc
. - Transfer files: Place the RaspController binary and
conf.yml
in the created directory. - Set up systemd service: Copy the provided service file to
/etc/systemd/system/
and enable it:systemctl enable --now raspc.service
- View Logs: Access logs using
journalctl -u raspc
.
- Consider security improvements like HTTPS and proxy authentication when exposing RaspController to the Internet.
- For detailed usage and customization, explore the project's source code repository.