Lightweight PID 1 init system and service supervisor designed for BigFred OS. Works in embedded systems based on Linux as well as in containers.
In supervise mode it can also act as a supervisord replacement: the same
process watches a declarative JSON service list, restarts daemons, and exposes
start/stop/logs over a Unix socket — without early-boot, getty, or console TTYs.
- Declarative services in
/data/etc/microinit.json(override root withDATA_DIR) - Drop-ins under
$DATA_DIR/etc/microinit.d/services/**/*.json(lexicographic later-wins) - inotify hot-reload of JSON config (no polling)
microinit supervise— container / host supervisor (supervisord-like)- Thread-per-service supervision with optional restart + backoff
- Unix socket IPC (
start/stop/restart/enable/disable/list/logs) - Optional OpenTelemetry metrics (on by default; disable with
--no-default-features) → Grafana Alloy whenopenTelemetry.enableis true - Mixed service logs on a dedicated TTY (default
/dev/tty2); init logs on/dev/tty3 - Early boot via
/etc/microinit/early-boot.sh(or$DATA_DIR/etc/microinit/early-boot.sh); embedded portable script if neither exists
export RUSTUP_TOOLCHAIN=stable
make build
make release
cargo build --release # includes OpenTelemetry exporter
cargo build --release --no-default-features # without OpenTelemetry
make release-musl # aarch64-unknown-linux-musl static
make test
make mancargo test
cargo test --no-default-features./examples/local-test/run.shUses examples/local-test/data as DATA_DIR, skips early-boot, and opens two xterms for
service / init logs.
Default builds include the OTLP exporter. Enable it at runtime in config:
"openTelemetry": {
"enable": true,
"endpoint": "http://127.0.0.1:4318",
"protocol": "http",
"serviceName": "microinit",
"exportIntervalSecs": 15
}See grafana/alloy/microinit.alloy and
grafana/dashboards/microinit.json.
- ORAS (arm64 + early-boot):
ghcr.io/dcc-bigfred/microinit-linux-arm64 - Container (distroless multiarch,
supervise):ghcr.io/dcc-bigfred/microinit
docker run --rm -v "$PWD/data:/data" ghcr.io/dcc-bigfred/microinit:main
# ENTRYPOINT /microinit CMD supervise
oras pull ghcr.io/dcc-bigfred/microinit-linux-arm64:latest-release -o ./outmicroinit [--socket PATH] init …
microinit [--socket PATH] supervise [--config PATH] [--log-to-files]
microinit start|stop|restart|enable|disable <name>
microinit start --force <name> # ignore unmet dependsOn
microinit list
microinit logs [name] [--follow] [--lines N]
See man/man8/microinit.8.mdoc and man/man5/microinit.json.5.mdoc.
MIT
See docs/README.md for the full index.
- Operator guide — manage services, write config, dependencies, boot
- Control socket API — Unix socket protocol for integrations
- Architecture — design overview (
init/supervise, reload, OTel)
