Raspberry-Pi-Dashboard
Raspberry-Pi-Dashboard copied to clipboard
Web-App Dashboard to monitor Raspberry Pi hardware and software status. Nothing more than Webserver + PHP required.
Written in plain HTML5, CSS3, JavaScript and PHP (backend). No extra software required!
Report a Bug | Request a New Feature | Help Develop This Project
Loved the project? Please consider giving a star :)
Active development will continue soon!
Features
- Live surveillance of RPi hardware (CPU Temperature, frequency, loads etc.) with customizable warning thresholds
- Detailed software/hardware information (web server, PHP, storage / partition workload, core voltage, plugged USB devices, kernel version, model specifications, OS, CPU, network config)
- Protected access with password login (default: root) (configure password)
- Power (shutdown/reboot) Raspberry Pi with schedule options (setup instructions)
- Mobile WebApp integration
- Responsive design layout allows usage on all screen sizes
- Dark Theme (manual / auto)
Update your existing dashboard setup by navigating to project root folder and running
git pull
in the terminal.
❗ If you run into issues and getting error message "Permission denied" or "unable to open file" see issue #22 for help and instructions to solve. ❗
Screenshots
Mobile Light Theme | Mobile Dark Theme |
---|---|
![]() |
![]() |
Download and Installation
Prequisites
- Running Web Server (e.g. Lighttpd or Apache) with PHP installed (>=v5.6)
- Installed Git (comes preinstalled on Raspberry Pi OS / formerly Raspbian as well as other linux distros)
- Valid permissions within /var/www/html
Valid permissions
The following configuration is the commonly recommended set-up for your web server folder and is meant to be secure to a certain level (with the minimum need of permissions):
-
First, make sure
www-data
group exists and add your current login:
(if you are using another distro than Raspbian/Raspberry Pi OS the username of web server can differ)
sudo groupadd www-data
sudo usermod -a -G www-data www-data
sudo usermod -a -G www-data <yourlogin>
(replace<yourlogin>
with your username) -
Second, give the ownership of web folder to the
www-data
group and your user.
The following commands ensure that you have full access on the files within the web folder while group members (www-data
) cannot edit/write for security reasons:
sudo chown -R <yourlogin>:www-data /var/www/html
(replace<yourlogin>
with your username)
sudo chmod -R 755 /var/www/html
-
Reboot your RPi (for permission changes to take effect)
Setup project
- navigate to your web folder (
cd /var/www/html
) - clone this Github repository:
git clone https://github.com/femto-code/Rasberry-Pi-Dashboard.git <your_subfolder_name>
- Run
-
sudo chown -R <yourlogin>:www-data /var/www/html/<your_subfolder_name>
and
(replace<yourlogin>
with your username) -
sudo chmod -R 775 /var/www/html/<your_subfolder_name>
-
- to set correct permissions (this will allow the
www-data
user exclusively to write/edit files only in your dashboard folder)!
An erroneous permission typically results in the situation where the user responsible for web server (e.g.
www-data
) does not have rights to create/modify the local config file for saving your dashboard adjustments (your custom thresholds, password etc.). In this case, the dashboard won't work at all and throwing this error.
-
DONE! Open web browser with URL:
http://IP_OF_YOUR_RPI/<your_subfolder_name>
Note: replace <your_subfolder_name> with your choice of subfolder name accordingly. You can also rename the base folder at any time afterwards.
Configuration / Help
Core voltage (or other hardware info) output is not shown (optional)
- If you want to see advanced hardware information (core voltage, model information) on your dashboard instance:
runsudo usermod -aG video www-data
in a terminal
If you do not use Raspbian (or any other RasPi distro) like Ubuntu, you do have to install
libraspberrypi-bin
by runningsudo apt install libraspberrypi-bin
.
- background: The
vcgencmd
command (specifically dedicated to RPi firmware) is a system command that requires certain hardware rights. Therefore one has to grant this particular right (to read hardware info) to e.g.www-data
(under which web server is running). This is achived by adding this user to a system group called video, which the standard user pi is part of by default. - in case of problems: please comment on #12 (or new issue)
Enable shutdown / reboot (optional)
Recommended only, if your RPi is not accessible over the Internet!
In order to use the remote power functionality you have to give the user www-data
advanced rights for running one specific command:
- Run
sudo visudo
to open the editor for adjusting user rights - Be careful what you change here! Just add the following at the end of the file:
www-data ALL=NOPASSWD: /sbin/shutdown
- Restart your Pi and now shutdown from another device (connected to same local network like your Pi) is possible
Configure password (manually)
You should change the default password (which is root) and a choose a more secure one by following the following steps.
Please be aware that there is a more user-friendly way by using the Dashboards options modal. The manual way of changing the password might be helpful
- in case of wrong permissions (
www-data
cannot change settings for you - see issue #22 for help and instructions to solve)- if password is unknown (and access to Dashboard therefore impossible)
- Go to https://www.md5-generator.de/ and generate the MD5 encyrpted passphrase.
- Open
local.config
(dynamically created at first start) and apply your custom passphrase string (generated in step 1) as follows (don't alter other lines):
[...]
'general' =>
array (
[...]
'pass' => 'YOUR_MD5_PASSPHRASE_HERE',
[...]
),
[...]
- Remember password and enjoy!
License
GPL-3.0.
Raspberry Pi and the Raspberry Pi Logo are registred trademarks of the Raspberry Pi Foundation