🛠 Un serveur maison qui consomme 2,5 W : Docker léger sur la PINE A64

Pine64 PINE A64 / PINE A64+ (Allwinner A64) · intermediaire · Schéma : IMG-pine64-intermediaire-3-serveur-maison-docker.svg — PINE A64 dans un coin d'etagere branchee en Ethernet et barrel 5V, containers Docker (Mosquitto, reverse proxy, cron de sauvegarde) dessines comme des boites empilees, jauge de consommation 2,5W, microSD de qualite mise en garde en rouge

Objectives

Transform the PINE A64 into a small permanent server: the board was marketed in 2016 as "the cheapest 64-bit ARM platform for running Docker" (with HypriotOS at the time), its officially measured power consumption is approximately 2.5 W, and the mainline kernel runs Docker without any exotic requirements. The real engineering challenge here is not Docker but the hardware constraints: 512 MB to 2 GB of RAM, no embedded flash (everything lives on the microSD), and 10/100 networking on the base version. You will size, install, and secure a lightweight service: an MQTT broker + a backup cron job.

Hardware

Complete Code

# Armbian : installer Docker (dépôt officiel docker.com, arm64)
curl -fsSL https://get.docker.com | sudo sh

# Broker MQTT Mosquitto en conteneur (service sobre, adapté à la carte)
sudo docker run -d --name mosquitto --restart unless-stopped \
     -p 1883:1883 eclipse-mosquitto:2

# Sauvegarde quotidienne de l'état des conteneurs sur le PC du réseau :
crontab -e
#   0 3 * * * tar czf /root/etc-backup.tgz /etc && scp /root/etc-backup.tgz pc:/backups/pine64/

# Sur un modèle 512 MB, ajouter du swap pour survivre aux pointes :
sudo fallocate -l 1G /swapfile && sudo chmod 600 /swapfile
sudo mkswap /swapfile && sudo swapon /swapfile

# Vérifier la RAM disponible avant d'empiler les conteneurs :
free -h && docker stats --no-stream

Expected Verification

docker ps shows Mosquitto Up, reachable from the LAN (mosquitto_sub -h <ip> -t test on the PC). The board consumes ~2.5 W at idle — amounting to a few euros per year in electricity for permanent service. free -h helps size the next steps: with 2 GB you can stack a few lightweight containers; with 512 MB, stick to a single service and use swap. On the base board, remember that the network caps at ~94 Mbit/s (iperf3 tutorial) before considering it for a file server.

Common Mistakes

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials