Top 5 Applications to Run on Single Board Servers
With the growing popularity of single board servers in the Internet of Things (IoT) and edge computing domains, an increasing number of people have begun to explore the potential of these low-power, cost-effective devices. In this article, we present five applications that are ideally suited for running on single board servers, including Docker and four additional applications that can be set up using Docker.
Figure: Docker on Single Board Server
Docker is an open-source application container engine, enabling developers to package applications and their dependencies into lightweight, portable containers. This containerization technology is particularly useful on single board servers, as it allows for the easy deployment and running of multiple applications on limited hardware resources. Docker simplifies the development, testing, and deployment of applications.
It is important to note that the performance and availability of Docker are restricted by hardware resources. If you plan to run multiple containers simultaneously on a server or run containers that require high performance (such as high-density databases or large caches), additional hardware resources may be required to ensure that they can run and respond to requests effectively. We recommend having at least a 1 GHz processor or faster, at least 2GB RAM, and enough available disk space to store Docker images and container data (specific requirements depend on the size and number of applications).
First and foremost, you need to install Docker on your single board server (for instance, LattePanda 3 Delta). Using the Debian operating system as an example, the installation command is as follows:
curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh
After installation, to avoid using the sudo command each time, add the current user to the docker group:
sudo usermod -aG docker $USER
After restarting the device, Docker will be ready for use.
Figure: Home Assistant on Single Board Server
Home Assistant is an open-source platform for smart home automation. By deploying Home Assistant on a single board server (SBC) using Docker, you can use it as a home intelligence hub for controlling and monitoring various smart devices, such as lights, heating systems, and security systems. Home Assistant supports hundreds of smart devices, boasts strong community support, and offers a rich plugin ecosystem.
Home Assistant Setup
Although Home Assistant is capable of running on low-end hardware devices, for stable execution and effective handling of automation tasks for devices and scenarios, certain hardware requirements must be met. It is recommended to have a CPU operating frequency of at least 1 GHz, and a minimum of 1GB RAM to ensure stable and reliable operation.
Use the following command to create a Docker container named "homeassistant":
docker run --init -d --name="homeassistant" -v /PATH/TO/CONFIG:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/home-assistant:stable
/PATH/TO/CONFIG with the path where you want to store the configuration files. Once completed, access http://your-server-ip:8123 to view the Home Assistant interface.
Nextcloud is a self-hosted cloud storage and collaboration platform that can be easily deployed on a single board server (SBC) using Docker. It features file synchronization, sharing, version control, and online collaborative editing, as well as supporting applications such as calendars, contacts, and email. Nextcloud offers secure, private data storage and sharing solutions for individuals and teams.
Compared to the previous two applications, Nextcloud has higher hardware requirements. It is recommended to have a dual-core processor or faster, at least 2GB RAM, and at least 20GB of available disk space (the larger, the better).
First, create a Docker container named "nextcloud":
docker run -d -p 8080:80 --name nextcloud -v /PATH/TO/DATA:/data -v /PATH/TO/CONFIG:/config -e MYSQL_DATABASE=nextcloud -e MYSQL_USER=nextcloud -e MYSQL_PASSWORD=my-secret-pw -e MYSQL_HOST=localhost nextcloud
/PATH/TO/CONFIG with the paths where you want to store data and configuration files, respectively. Once completed, access http://your-server-ip:8080 to view the Nextcloud interface.
Figure: Pi-hole on Single Board Server
Pi-hole is an ad-blocking and tracking prevention tool that can be deployed within a local network to provide ad-filtering services for all connected devices. By deploying Pi-hole on a single board server (SBC) using Docker, you can reduce ad and tracking requests, improving network speed and security. Pi-hole also features a real-time statistics and visualization dashboard, making it easy for users to monitor network activity and blocking effectiveness.
Pi-hole can operate on hardware devices with lower requirements. It is recommended to have a CPU operating frequency of at least 700 MHz and a minimum of 512MB RAM. It is important to note that the performance and availability of Pi-hole are restricted by hardware resources. If there are a large number of devices in your network simultaneously using Pi-hole as a DNS server, additional hardware resources may be required to ensure effective ad blocking and fast response to DNS requests.
Use the following command to create a Docker container named "pihole":
docker run -d --name pihole -e TZ="America/New_York" -v /PATH/TO/CONFIG:/etc/pihole/ -v /PATH/TO/DNSMASQ:/etc/dnsmasq.d/ -p 80:80 -p 53:53/tcp -p 53:53/udp -p 443:443 pihole/pihole:latest
/PATH/TO/DNSMASQ with the paths where you want to store the configuration files, and replace
TZ with your time zone. Once completed, access http://your-server-ip/admin to view the Pi-hole interface.
Jellyfin is a free media server that allows users to set up their own streaming media center in homes or small offices. By deploying Jellyfin on a single board server (SBC) using Docker, you can easily manage, play, and share audio, video, and images. Jellyfin supports a variety of devices, such as smartphones, tablets, TVs, and computers, as well as protocols like DLNA and Chromecast. Jellyfin also offers a range of plugins to meet users' individual needs.
Similarly, Jellyfin also has certain hardware requirements. It is recommended to have a processor of 2 GHz or faster, at least 2GB RAM, and at least 10GB of available disk space (specific requirements depend on the media content that needs to be stored).
Use the following command to create a Docker container named "jellyfin":
docker run -d --name jellyfin -v /PATH/TO/CONFIG:/config -v /PATH/TO/MEDIA:/media -p 8096:8096 jellyfin/jellyfin
/PATH/TO/MEDIA with the paths where you want to store the configuration files and media files, respectively. Once completed, access http://your-server-ip:8096 to view the Jellyfin interface.
Common Docker Commands
Here are some commonly used commands when working with Docker on a daily basis:
docker images: List all images on the local host.
docker pull <image>: Download a specified image from Docker Hub or another registry. For example:
docker pull homeassistant/home-assistant:stable.
docker run <options> <image>: Create a new container from a specified image and run it. Options can include port mappings, volume mounts, etc. For example:
docker run -d -p 8080:80 --name nextcloud nextcloud.
docker ps: List currently running containers. Add the -a option to show all containers, including stopped ones:
docker ps -a.
docker start <container>: Start a stopped container. For example:
docker start nextcloud.
docker stop <container>: Stop a running container. For example:
docker stop nextcloud.
docker restart <container>: Restart a running container. For example:
docker restart nextcloud.
docker logs <container>: View a container's log output. For example:
docker logs nextcloud. Add the -f option to view logs in real-time:
docker logs -f nextcloud.
docker exec <options> <container> <command>: Execute a command within a running container. For example:
docker exec -it nextcloud /bin/bash, to enter the container's bash interactively.
docker rm <container>: Delete a container. For example:
docker rm nextcloud.
docker rmi <image>: Delete an image. For example:
docker rmi nextcloud.
docker-compose: This is a separate tool used to define and manage multi-container applications through YAML files. It provides a more concise, structured way to organize and manage containers.
These commands cover the basic operations for daily use of Docker. With these commands, you can easily manage Docker containers and images on single board servers. For more detailed information and advanced features, we recommend referring to the official Docker documentation during actual use.
Keep in mind that the setup steps for each project mentioned above may need to be adjusted according to your specific environment and requirements. For example, you may need to change port numbers to avoid conflicts or adjust other parameters to meet your actual needs. If you encounter problems during deployment, please refer to the official documentation of each project for more detailed help and guidance.
Running these applications on single board servers not only makes full use of limited hardware resources but also achieves low-power and cost-effective solutions. Docker, as a representative of containerization technology, provides a convenient way to deploy and run applications on single board servers. With applications such as Home Assistant, Nextcloud, Pi-hole, and Jellyfin, you can easily set up a smart home hub, private cloud storage, ad blocker, and media server to meet various needs in both home and office scenarios.
By exploring these applications and Docker, you can unlock the potential of single board servers and create a versatile, energy-efficient, and cost-effective environment for your IoT and edge computing projects. The vibrant communities behind these applications also offer support and continuous development, ensuring that you have access to the latest features and improvements.
What other applications do you think are suitable to run on a single-board server? Feel free to discuss and exchange ideas with us in the comment section or on Discord!