Getting Started¶
Install bootconf, write a config file, register the systemd unit, and run it for the first time.
Install¶
From source¶
Requires Go 1.24+.
git clone https://github.com/offline-lab/bootconf
cd bootconf
make
make install # installs to /usr/local/bin/bootconf
Build with version info baked in:
Cross-compile¶
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build \
-ldflags="-s -w -X github.com/offline-lab/bootconf/cmd/bootconf/commands.Version=v0.1.0" \
-o bootconf cmd/bootconf/main.go
Configure¶
Create /boot/firmware/bootconf.yaml (override with --config / -c).
A minimal config that sets hostname and provisions an admin user:
bootconf:
enabled: true
directory: /var/lib/bootconf
system:
enabled: true
hostname: myhost
timezone: UTC
users:
enabled: true
directory: /etc/bootconf/users
users:
- name: admin
enabled: true
sudo: true
authorized_keys:
- "ssh-ed25519 AAAA... admin@workstation"
See Configuration for every available field.
Add the systemd unit¶
# /etc/systemd/system/bootconf.service
[Unit]
Description=Apply boot configuration
Before=network-pre.target
Wants=network-pre.target
DefaultDependencies=no
After=local-fs.target
[Service]
Type=notify
ExecStart=/usr/local/bin/bootconf run
RemainAfterExit=yes
[Install]
WantedBy=sysinit.target
Type=notify lets systemd track exact completion. Bootconf sends READY=1 via sd_notify after all modules finish.
First run¶
Test your config without touching the system:
Dry-run traverses the full code path and catches template syntax errors, missing keys, and validation failures, but skips all file writes and command execution.
Apply the configuration:
Apply and immediately start services (users, ssh, wifi, and each enabled service):
Verify the running system matches the configuration:
Check the last run result:
What's next¶
- Configuration: every config field documented
- Modules: per-module reference with examples
- Run
bootconf --helpfor the full CLI reference