RPI-Control – A simple webinterface for monitoring and maintenance of a Raspbbery Pi


I while ago I was working with Manfred, DK1MC on an APRS project. Manfred is responsible for DB0HHH and was looking for a solution to do simple maintenance and monitoring operations on the Raspberry Pi he is using to control the repeater. So far he was using a terminal solution which he developed, but this requires SSH access and is nothing that can be used easily on the road and without at least some basic Linux knowledge. The idea of a simple web interface was born…

Here are some items from our first list of ideas:

  • Should be used with a browser, also on a Smartphone or tablet
  • Simple and flexible configuration
  • Simple monitoring and maintenance of systemd services
  • Buttons for any kind of commands
  • User management
  • Simple installation, minimal dependencies

A few weeks later the first version was ready for testing.

The configuration is done through a json file. The most important parts are “systemd” where you can add a list of systemd-services. The second section is “Buttons” with the possibility to define a list of buttons and the command that should be executed once the button is pressed.

Here is an example of the config file:

{
    "webserver": {
        "port" : 8080,
        "title": DK3ML-10 APRS RX-Igate",
        "headline": "DK3ML-10"
    },
    "systemd": [
        {"name": "cron", "description": "Cron"},
        {"name": "direwolf", "description": "Direwolf"},
    ],
    "buttons": [
        {"headline": "System-Info", "buttons": [
            {"name": "Date + time", "command": "date"},
            {"name": "Uptime", "command": "uptime"},
            {"name": "df -h", "command": "df -h"},
            {"name": "ifconfig", "command": "ifconfig"}
            ]}
    ],
    ...
}

The app offers a simple web interface. Once a button is pressed, the command that is defined in the config file will be executed on the Raspberry Pi. Other commands than defined in the config file are not possible, so the admin still has full control about whatever he wants to offer to his users. The output of any command is shown on a log window.

The possibility of defining any command makes this app a very powerful and flexible tool. The configuration requires solid Linux knowledge as the app will execute any command you define. So with the wrong commands you can destroy your system with just one click. But once it’s set up and configured it offers a very simple way to monitor and maintain the system even without Linux knowlege.

Of course the software can also be used in other areas than amateur radio repeaters.

Some technical details:

The app was developed in “Go” (also called Golang). Software written in Go can be compiled for many systems and achitectures. All dependencies and libraries are part of the compiled binary. To install the app, all that needs to be done is to copy the binary (and some template and asset folders) to the Raspberry Pi. Any installation of additional packages or dependencies is not needed. As even the webserver is built in, you also don’t need to install and configure a complex webserver like Apache or nginx.

SSL is not supported yet, but it’s on the TODO-List.

The software is alrady running on several repeaters, for example: DB0HHH.

I already had the question if there is any plan to publish the code under an open source license. In general I am happy to do that, but it requires some careful code review and cleanup first. At the moment it’s hard to say when I will find time for it.

So for now I can only offer to send a test version. As mentioned above the installation and configuration requires solid Linux knowledge and you have to agree that you will run the software at your own risk.

Leave a Reply

Your email address will not be published. Required fields are marked *