# michaing/dietpi architecture

> Architecture diagram of the GitHub repository michaing/dietpi, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/michaing/dietpi
- Repository: https://github.com/michaing/dietpi

## Overview

DietPi is a lightweight Debian-based OS for single-board computers, with Bash tools for configuring and managing a device and installing optimized software. The documented user workflow is to choose software with dietpi-software, which installs and configures it and starts its services; users can then manage service priorities or update the system. Automation is configured in dietpi.txt before first boot. Source excerpts were not provided, so relationships below are limited to those stated in the README.

Main entry points: [`dietpi/dietpi-software`](https://github.com/michaing/dietpi/blob/dev/dietpi/dietpi-software) (Software installer), [`dietpi/dietpi-update`](https://github.com/michaing/dietpi/blob/dev/dietpi/dietpi-update) (System updater), [`dietpi/dietpi-services`](https://github.com/michaing/dietpi/blob/dev/dietpi/dietpi-services) (Service priorities), [`dietpi.txt`](https://github.com/michaing/dietpi/blob/dev/dietpi.txt) (Automation settings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_software["Software lifecycle"]
  node_software_tool["Software installer"]
  node_software_setup["Software setup"]
  node_software_catalog["Software packages<br/>[software]"]
  node_installed_software["Installed software"]
end

subgraph group_device["Device management"]
  node_update_tool["System updater"]
  node_config_tool["Device configuration"]
  node_backup_tool["Backup management"]
  node_sync_tool["Data synchronization"]
  node_drive_tool["Drive manager"]
  node_network_tool["Network management"]
  node_vpn_tool["VPN management"]
  node_wireguard_tool["WireGuard setup"]
end

subgraph group_system["System services"]
  node_service_control["Service priorities"]
  node_cron_tool["Scheduled tasks"]
  node_services["System services"]
end

subgraph group_boot["Boot and setup"]
  node_firstboot["First boot setup"]
  node_preboot["Preboot tasks"]
  node_postboot["Postboot tasks"]
  node_automation_config["Automation settings<br/>[dietpi.txt]"]
end

node_user(("Device owner"))
node_debian["Debian OS"]

node_user -->|"selects software"| node_software_tool
node_software_tool -->|"installs choices"| node_software_catalog
node_software_tool -->|"configures software"| node_software_setup
node_software_tool -->|"starts services"| node_installed_software
node_user -->|"sets priorities"| node_service_control
node_service_control -->|"controls priorities"| node_installed_software
node_user -->|"requests update"| node_update_tool
node_update_tool -->|"reports updates"| node_user
node_user -->|"configures device"| node_config_tool
node_user -->|"configures automation"| node_automation_config
node_automation_config -.->|"guides setup"| node_firstboot
node_debian -->|"provides OS"| node_user

click node_software_tool "https://github.com/michaing/dietpi/blob/dev/dietpi/dietpi-software"
click node_software_setup "https://github.com/michaing/dietpi/blob/dev/dietpi/func/dietpi-set_software"
click node_software_catalog "https://github.com/michaing/dietpi/tree/dev/.build/software"
click node_service_control "https://github.com/michaing/dietpi/blob/dev/dietpi/dietpi-services"
click node_update_tool "https://github.com/michaing/dietpi/blob/dev/dietpi/dietpi-update"
click node_config_tool "https://github.com/michaing/dietpi/blob/dev/dietpi/dietpi-config"
click node_backup_tool "https://github.com/michaing/dietpi/blob/dev/dietpi/dietpi-backup"
click node_sync_tool "https://github.com/michaing/dietpi/blob/dev/dietpi/dietpi-sync"
click node_drive_tool "https://github.com/michaing/dietpi/blob/dev/dietpi/dietpi-drive_manager"
click node_network_tool "https://github.com/michaing/dietpi/blob/dev/dietpi/dietpi-network"
click node_vpn_tool "https://github.com/michaing/dietpi/blob/dev/dietpi/dietpi-vpn"
click node_wireguard_tool "https://github.com/michaing/dietpi/blob/dev/dietpi/dietpi-wireguard"
click node_cron_tool "https://github.com/michaing/dietpi/blob/dev/dietpi/dietpi-cron"
click node_services "https://github.com/michaing/dietpi/tree/dev/rootfs/etc/systemd/system"
click node_firstboot "https://github.com/michaing/dietpi/blob/dev/rootfs/var/lib/dietpi/services/dietpi-firstboot.bash"
click node_preboot "https://github.com/michaing/dietpi/blob/dev/dietpi/preboot"
click node_postboot "https://github.com/michaing/dietpi/blob/dev/dietpi/postboot"
click node_automation_config "https://github.com/michaing/dietpi/blob/dev/dietpi.txt"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_software_tool,node_software_setup,node_software_catalog,node_installed_software toneBlue
class node_update_tool,node_config_tool,node_backup_tool,node_sync_tool,node_drive_tool,node_network_tool,node_vpn_tool,node_wireguard_tool toneAmber
class node_service_control,node_cron_tool,node_services toneMint
class node_firstboot,node_preboot,node_postboot,node_automation_config toneRose
class node_user,node_debian toneIndigo
```

## Components

### Software lifecycle

- [Software installer](https://github.com/michaing/dietpi/blob/dev/dietpi/dietpi-software): `dietpi/dietpi-software`
- [Software setup](https://github.com/michaing/dietpi/blob/dev/dietpi/func/dietpi-set_software): `dietpi/func/dietpi-set_software`
- [Software packages](https://github.com/michaing/dietpi/tree/dev/.build/software): `.build/software`
- **Installed software**

### Device management

- [System updater](https://github.com/michaing/dietpi/blob/dev/dietpi/dietpi-update): `dietpi/dietpi-update`
- [Device configuration](https://github.com/michaing/dietpi/blob/dev/dietpi/dietpi-config): `dietpi/dietpi-config`
- [Backup management](https://github.com/michaing/dietpi/blob/dev/dietpi/dietpi-backup): `dietpi/dietpi-backup`
- [Data synchronization](https://github.com/michaing/dietpi/blob/dev/dietpi/dietpi-sync): `dietpi/dietpi-sync`
- [Drive manager](https://github.com/michaing/dietpi/blob/dev/dietpi/dietpi-drive_manager): `dietpi/dietpi-drive_manager`
- [Network management](https://github.com/michaing/dietpi/blob/dev/dietpi/dietpi-network): `dietpi/dietpi-network`
- [VPN management](https://github.com/michaing/dietpi/blob/dev/dietpi/dietpi-vpn): `dietpi/dietpi-vpn`
- [WireGuard setup](https://github.com/michaing/dietpi/blob/dev/dietpi/dietpi-wireguard): `dietpi/dietpi-wireguard`

### System services

- [Service priorities](https://github.com/michaing/dietpi/blob/dev/dietpi/dietpi-services): `dietpi/dietpi-services`
- [Scheduled tasks](https://github.com/michaing/dietpi/blob/dev/dietpi/dietpi-cron): `dietpi/dietpi-cron`
- [System services](https://github.com/michaing/dietpi/tree/dev/rootfs/etc/systemd/system): `rootfs/etc/systemd/system`

### Boot and setup

- [First boot setup](https://github.com/michaing/dietpi/blob/dev/rootfs/var/lib/dietpi/services/dietpi-firstboot.bash): `rootfs/var/lib/dietpi/services/dietpi-firstboot.bash`
- [Preboot tasks](https://github.com/michaing/dietpi/blob/dev/dietpi/preboot): `dietpi/preboot`
- [Postboot tasks](https://github.com/michaing/dietpi/blob/dev/dietpi/postboot): `dietpi/postboot`
- [Automation settings](https://github.com/michaing/dietpi/blob/dev/dietpi.txt): `dietpi.txt`

### Other components

- **Device owner**
- **Debian OS**

## Connections

- Device owner → Software installer: selects software (evidence: `README.md`)
- Software installer → Software packages: installs choices (evidence: `README.md`)
- Software installer → Software setup: configures software (evidence: `README.md`)
- Software installer → Installed software: starts services (evidence: `README.md`)
- Device owner → Service priorities: sets priorities (evidence: `README.md`)
- Service priorities → Installed software: controls priorities (evidence: `README.md`)
- Device owner → System updater: requests update (evidence: `README.md`)
- System updater → Device owner: reports updates (evidence: `README.md`)
- Device owner → Device configuration: configures device (evidence: `README.md`)
- Device owner → Automation settings: configures automation (evidence: `README.md`)
- Automation settings → First boot setup: guides setup
- Debian OS → Device owner: provides OS (evidence: `README.md`)
