Make your Single Board Computer shine with DietPi
My wild guess is that most people get a small Linux computer, like the Raspberry Pi, BeagleBone, Banana Pi or Orange Pi for a specific task. Unfortunately, most distributions are chock-full of software, with everything installed per default. But if you want to set up a lean single board computer for a specific task, you’re out of luck. Thankfully there is a Linux distribution, DietPi, that aims to fix that problem.
DietPi is specifically designed to make an initially small and lean installation of Linux. It’s based on a small (400MB) optimized Debian distribution for each specific platform, which there are plenty supported. It comes with easy access to tools for installing optimized software for specific tasks. So you can install just the software you need, without the included fluff you find in other distributions. Every time you log in, you get a notice if there is an update of the system. It also shows a couple of tools specific for DietPI, which is a nice feature for those less comfortable with using Linux.
I like that it’s based on Debian, where you have the normal apt-get command, so you can install any software from the Debian repository. But there are some additions that I enjoy. One of them is dietpi-process_tool, which allows you to optimize the specific applications that you are using your small-board computer for.
Setting the Process Priority
As you can see in the screenshot, you can tweak individual processes to maximize the response of the specific server. The images are from my NodeRED Home Controller Server. It’s important that NodeRED get’s the highest priority, but I’ve also tweaked lighthttpd, MySQL, and PHP. So NodeRED gets a “nice” value of -20 and both PHP and MySQL gets nice -10. The changes do make a noticeable improvement when working with the web interface. It’s much faster and responsive than when the processes are set to the default values. This is a very handy tool to squeeze out all the performance from a single board computer.
You can totally go nuts and start to mess with the Linux Scheduling Policy if you want to. Any process can be set to
- First In, First Out (Real-Time, time-critical)
- Round Robin (Real-Time, time-critical)
- Batch style execution
- Background jobs (Very low priority)
As you can see, there’s a lot of possibilities to make your small server run at optimal speed. This is a handy and easy to use tool. My advice is to start with just changing the nice values for the processes. You can actually make the machine perform worse if your scheduling settings are wrong. It’s easy to try out different settings and see if they make any improvements.
My new “go-to” Linux Distribution
If I need to set up a new Raspberry Pi or Odroid, DietPi is my first choice. DietPi is much smaller than the ones offered by the makers of the computers, and the tools are the same on every board. Familiarity goes a long way. That it’s Debian-based makes it even better, so yeah! And if you like it, don’t forget to donate to support further development!
Here’s a list of some of the software available with an easy to use installer.
- LXDE – Highly optimized lightweight desktop without the “bloatware”.
- MATE – Popular Gnome 2 desktop.
- XFCE – Lightweight desktop.
- GnuStep – Alternative/unique desktop.
- Chromium – Optional: Web browser
- Remote Desktop Access:
- Tightvnc Server – Desktop for remote connection.
- VNC4 Server – Desktop for remote connection.
- NoMachine – Feature rich remote desktop connection.
- XRDP – Remote desktop server for Windows Remote Desktop Client.
- RealVNC Server – Desktop for remote connection.
- Media Systems:
- Kodi – Media Centre / Player
- YMPD – Lightweight web Interface audio player for MPD
- O!MPD – Feature-rich web Interface audio player for MPD
- CAVA – Optional: Console-based audio visualizer for MPD
- Mopidy – Web Interface Music /Radio Player
- SubSonic – Feature rich media streaming server with web interface.
- SqueezeBox – Also known as Logitech Media Server.
- SqueezeLite – Audio player for SqueezeBox.
- Shairport Sync – AirPlay audio player with multiroom sync
- BruteFIR – EQ and Digital Room Correction via ALSA.
- MiniDLNA – Media streaming server (DLNA, UPnP)
- Ampache – Web interface media streaming server.
- Emby – Web interface media streaming server.
- Plex Media Server – Web interface media streaming server.
- Murmur – Mumble VoIP Server
- Roon Bridge – Turns your device into a Roon capable audio player
- NAA Daemon – Signalyst Network Audio Adaptor (NAA).
- IceCast – Shoutcast Streaming Server, including DarkIce.
- BitTorrent / Download Tools:
- Transmission – Lightweight BitTorrent server with web interface
- Deluge – Alternative BitTorrent server with web interface
- qBitTorrent – Lightweight and fast (c++) BitTorrent server with web interface
- rTorrent – BitTorrent server with ruTorrent web interface
- Aria2 – Download manager with web interface
- SABnzbd – NZB download manager with a web interface.
- Emulation & Gaming:
- OpenTyrian – Gaming
- Cuberite – Fast Minecraft server with web interface
- MineOS – Multiple Minecraft servers with web interface
- AmiBerry (uae4arm) – Amiga emulation system, using optimized builds of uae4arm-rpi
- DXX-Rebirth – Descent 1 & 2 OpenGL port
- Camera / Surveillance:
- DietPi-Cam – RPi Camera / Web Interface Surveillance
- MotionEye – Camera / Web Interface Surveillance
- Cloud / Backups:
- OwnCloud – Your own personal cloud-based backup/data storage system
- NextCloud – Your own personal cloud-based backup/data storage system
- Pydio – Feature-rich backup and sync server with a web interface.
- UrBackup Server – Full backups for systems on your network
- Gogs – GitHub style server, with a web interface.
- Syncthing – Backup and sync server with a web interface.
- Tonido – Lightweight backup and sync server with a web interface, and, cloud access.
- CloudPrint – CUPS print server, with support for Google cloud printing
- Social / Search:
- Forums – phpbb3
- WordPress – Website Blog and Publishing platform.
- Image Gallery – Host and browse your images from a web interface.
- BaiKal – Lightweight CalDAV + CardDAV server.
- OpenBazaar – Decentralized peer to peer market server using BitCoin.
- YaCy – Decentralized open source search engine.
- WiFi HotSpot – Turn your device into a wireless hotspot/access point.
- Tor HotSpot – Optional: Routes all WiFi HotSpot traffic through the Tor network.
- Home Automation:
- EmonPi – Lightweight Energy usage stats with EmonPi PCB.
- Grasshopper – Web App to control Bticino MyHome
- RPi.GPIO – GPIO Interface library for RPi (python).
- WiringPi – GPIO Interface library (c).
- WebIOPi – Web interface to control RPi GPIO.
- I2c – Enables support for I2c based hardware.
- Node-Red – Visual tool for wiring together hardware devices, APIs and online services.
- Mosquitto – Message broker that implements MQTT protocol versions 3.1 and 3.1.1.
- Blynk Server – iOs and Android apps to control Arduino, ESP8266, Raspberry Pi and similar microcontroller boards over the Internet.
- Remote Access:
- Weaved – Access your device over the internet.
- VirtualHere – Share physically attached USB devices from your SBC, over the network.
- System Stats / Management:
- DietPi-Cloudshell – Lightweight system stats for your LCD display or monitor.
- Raspcontrol – Web interface system stats
- Linux Dash – Web interface system stats
- PhpSysInfo – Web interface system stats
- RPi Monitor – Web interface system stats
- NetData – Web interface system stats
- Webmin – Remote system management with web interface
- Open Media Vault – Web interface network attached storage (NAS) solution
- System Security:
- Fail2Ban – Protects your system from brute-force attacks
- Webserver Stacks:
- LAMP Webserver – Apache2 / MySql / PHP
- LASP Webserver – Apache2 / SQLite / PHP
- LAAP Webserver – Apache2 / MariaDB / PHP
- LEMP Webserver – Nginx / MySql / PHP
- LESP Webserver – Nginx / SQLite / PHP
- LEAP Webserver – Nginx / MariaDB / PHP
- LLMP Webserver – Lighttpd / MySql / PHP
- LLSP Webserver – Lighttpd / SQLite / PHP
- LLAP Webserver – Lighttpd / MariaDB/ PHP
- phpMyAdmin – Web interface SQL admin tool
- Certbot – Free, automated SSL cert creation and setup, allowing https.
- Tomcat8 – Apache Tomcat server
- DNS Servers:
- Pi-hole – A DNS/Web server that will block ads for any device on your network.
- File Servers:
- ProFTP – Simple, efficient, lightweight FTP file server.
- Samba – Feature rich file server.
- vsFTPD – Feature rich FTP file server.
- NFS – Network file system server
- VPN Servers:
- OpenVPN – Easy to use, minimal hassle VPN server
- PiVPN – OpenVPN installer & management tool
- Network Load Balancing:
- HaProxy – High-performance TCP/HTTP load balancer.
- Website URL’s:
- NoIp – Website URL Address
- File Server Choices:
- ProFTP – Simple, efficient, lightweight file server.
- Samba – Feature rich file server.
- SSH Server Choices:
- Dropbear – Lightweight SSH Server
- OpenSSH – Feature rich SSH server with SFTP/SCP support.
- Log System Choices:
- DietPi-Ramlog – Lightweight RAM logging.
- Full – Full logging system with Rsyslog and Logrotate.
- Web server Preference System:
- Apache2 – Feature-rich web server
- Nginx – Lightweight web server
- Lighttpd – Extremely lightweight web server
Supported Single Computer Boards
|Odroid||C1||Amlogic 1.5GHz quad-core||1GB DDR3|
|Odroid||C2||Amlogic 1.54GHz quad-core (64bit)||2GB DDR3|
|Odroid||XU4||Samsung Exynos5422 (4x 2GHz 4x 1.4GHz)||2GB DDR3|
|Pine||A64||A64 1.2 GHz quad-core (64bit)||512MB – 2GB DDR3|
|NanoPi||Nano||Allwinner H3 1.2 GHz quad-core||256MB – 512MB DDR3|
|NanoPi||NEO Air||Allwinner H3 1.2 GHz quad-core||256MB – 512MB DDR3|
|NanoPi||NEO2||Allwinner H5 1.2 GHz quad-core (64bit)||512MB DDR3|
|NanoPi||M1||Allwinner H3 1.2 GHz quad-core||512MB – 1GB DDR3|
|NanoPi||M1+||Allwinner H3 1.2 GHz quad-core||512MB – 1GB DDR3|
|NanoPi||M2/T2||Samsung S5P4418 1.4 GHz quad-core||1GB DDR3|
|NanoPi||M3/T3||Samsung S5P6818 1.4 GHz octo-core||2GB DDR3|
|BananaPi||Pro||Allwinner A20 1.2GHzdual-coree||1GB DDR3|
|BananaPi||M2+||Allwinner H3 1.2 GHz quad-core||1GB DDR3|
|OrangePi||PC||Allwinner H3 1.2 GHz quad-core||1GB DDR3|
|OrangePi||One||Allwinner H3 1.2 GHz quad-core||512MB DDR3|
|OrangePi||Light||Allwinner H3 1.2 GHz quad-core||512MB DDR3|
|OrangePi||Plus/Plus 2||Allwinner H3 1.2 GHz quad-core||1GB DDR3|
|OrangePi||Zero||Allwinner H2+ 1.2 GHz quad-core||256MB – 512MB DDR3|
|Sparky||SBC (Allo)||Actions semiconductor S500 1.1GHz quad-core||1GB DDR3|
|Asus||Tinker Board||Rockchip RK3288 1.8GHz quad-core||2GB Dual Channel DDR3|
|VMware||Host system dependent||1GB/Can be changed|
|VirtualBox||Host system dependent||1GB/Can be changed|
|RoseApple Pi||Actions semiconductor S500 1.1GHz quad core||2GB DDR3|