DietPi lean server distribution
Going Lean
The DietPi minimalist distribution improves the performance of the Raspberry Pi and other single-board computers as servers and desktops and comes with more than 200 specially chosen applications and services.
Since the first appearance of the Raspberry Pi more than 10 years ago, many hardware vendors have followed the idea of an inexpensive computing powerhouse on a small board. Companies such as Asus, Odroid, and Pine64 all jumped on the single-board computer (SBC) bandwagon, naturally increasing the number of operating systems (OSs) for these boards. Most of the OSs are based on the ARM architecture and can now be found in various sectors of home computing and industrial applications.
The Debian-based Raspberry Pi OS is a very useful desktop replacement, and many Linux distributions offer their own offshoots for the Raspberry Pi. For example, LibreELEC is a media center, and gamers will enjoy RetroPie and Batocera. The lean, minimalistic DietPi is a great choice for small servers, older Raspberry Pis, and virtual machines. Thanks to carefully considered scripts, the set up is a convenient process.
From Debian
DietPi first entered the digital world in 2014. The purist operating system was initially built on Raspbian (today's Raspberry Pi OS). It now builds directly on Debian and supports numerous SBCs and architectures. In addition to x86_64, ARMv6, ARMv7, AArch64, and RISC-V, the project supports virtual machines such as VMware/ESXi, VirtualBox, Hyper-V, Parallels, UTM, and Proxmox. Besides images for virtual machines, you will find images for the Raspberry Pi, Odroid, Pine64, Radxa, Allo, Asus, NanoPi, Orange Pi, and the VisionFive RISC-V board [1].
The distribution mainly targets headless server applications (i.e., applications that do not require a display). However, if required, you can set up an X11 graphical user interface (GUI). In total, DietPi comes with more than 200 thoughtfully chosen applications for installation in its package repository.
I tested DietPi on a Raspberry Pi and on a virtual machine running on Proxmox, which is recommended if the compute power of an SBC is not up to the task at hand. The images for both tests were sourced from the project's download page [2]: Just unzip the 7-Zip archives on Linux with the 7z
tool. On Windows, the package name is 7-Zip for Windows, and The Unarchiver does the same job on macOS.
From an SD Card
The procedure for the Raspberry Pi and other SBCs that boot the operating system from an SD card is probably familiar to most readers. To begin, you unpack the image from the archive and transfer it to the SD card. On Linux, for example, you can use BalenaEtcher, whereas a good choice on Windows is Rufus [3]. If you are on Proxmox, you can install DietPi manually or run a script.
To download the installer script from GitHub, make it executable, and run it, use:
$ wget https://raw.githubusercontent.com/dazeb/proxmox-dietpi-installer/main/dietpi-install.sh $ chmod +x dietpi-install.sh $ ./dietpi-install.sh
The script prompts with some default settings you can adopt. The only input required is the name of the instance, which will normally be local. When done, you just need to start the virtual machine created by the script.
For the Raspberry Pi, insert the SD card and connect the device to a power source. The first boot process takes longer than later boots because of basic set-up steps and the automatic resizing of the root filesystem. Depending on the hardware, this process could take a few minutes (Figure 1).
Display or SSH
For a first start, I recommend connecting a display. After that, you can access the system with the Dropbear SSH server, which is enabled by default. If no display is available, you can discover the Raspberry Pi's IP address from your router or run the command
$ sudo nmap -sP 192.168.0.0/24 | grep raspberry
on another computer on the network, taking care to adapt the IP address to match your network.
With the IP address, root as the username, and dietpi
as the password, you can then use ssh
to log in. Your next step is to open the dietpi.txt
configuration file and modify the hostname and passwords. After the initial login, DietPi searches for updated software packages and installs them; again, this step can take some time to complete.
If you want to help the developers by sharing important information, you can agree to DietPi submitting anonymized information about your usage behavior. In the final step, change the general password and the passwords for the user and root accounts, if you have not already done so (Figure 2). Changes can be made at any later time with the DietPi-Config
script (Figure 3) or the passwd
command.
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Fedora 41 Beta Available with Some Interesting Additions
If you're a Fedora fan, you'll be excited to hear the beta version of the latest release is now available for testing and includes plenty of updates.
-
AlmaLinux Unveils New Hardware Certification Process
The AlmaLinux Hardware Certification Program run by the Certification Special Interest Group (SIG) aims to ensure seamless compatibility between AlmaLinux and a wide range of hardware configurations.
-
Wind River Introduces eLxr Pro Linux Solution
eLxr Pro offers an end-to-end Linux solution backed by expert commercial support.
-
Juno Tab 3 Launches with Ubuntu 24.04
Anyone looking for a full-blown Linux tablet need look no further. Juno has released the Tab 3.
-
New KDE Slimbook Plasma Available for Preorder
Powered by an AMD Ryzen CPU, the latest KDE Slimbook laptop is powerful enough for local AI tasks.
-
Rhino Linux Announces Latest "Quick Update"
If you prefer your Linux distribution to be of the rolling type, Rhino Linux delivers a beautiful and reliable experience.
-
Plasma Desktop Will Soon Ask for Donations
The next iteration of Plasma has reached the soft feature freeze for the 6.2 version and includes a feature that could be divisive.
-
Linux Market Share Hits New High
For the first time, the Linux market share has reached a new high for desktops, and the trend looks like it will continue.
-
LibreOffice 24.8 Delivers New Features
LibreOffice is often considered the de facto standard office suite for the Linux operating system.
-
Deepin 23 Offers Wayland Support and New AI Tool
Deepin has been considered one of the most beautiful desktop operating systems for a long time and the arrival of version 23 has bolstered that reputation.