Skip to main content

Configuration

This page lists where homebutler finds its config file and every key that file accepts, with the type, default and meaning of each. homebutler runs without a config file, using the defaults below. homebutler init creates one interactively; you can also write it by hand and check it with config validate.

Resolution order​

homebutler uses the first of these that applies:

  1. The --config <path> flag.
  2. The HOMEBUTLER_CONFIG environment variable.
  3. ~/.config/homebutler/config.yaml, if the file exists.
  4. ./homebutler.yaml in the current folder, if the file exists.

If none applies, built-in defaults are used. The first two rules don't check that the file exists: a path you name is used as given, and a path that doesn't exist makes commands run on defaults without an error. config validate reports it.

config validate shows which rule selected the file, one of these four:

File /home/you/cfg/flag.yaml
Source --config flag

File /home/you/cfg/env.yaml
Source $HOMEBUTLER_CONFIG

File /home/you/.config/homebutler/config.yaml
Source ~/.config/homebutler/config.yaml (XDG)

File homebutler.yaml
Source ./homebutler.yaml

On Windows​

~ is your profile folder, so rule 3 is C:\Users\<you>\.config\homebutler\config.yaml. %APPDATA% isn't searched. SSH keys and known_hosts are read from C:\Users\<you>\.ssh, where Windows' own ssh-keygen puts them.

A server's key: can be written ~/.ssh/id_ed25519, ~\.ssh\id_ed25519 or as a full path. In YAML, quote a Windows path with single quotes or leave it unquoted: double quotes treat \U as an escape.

key: 'C:\Users\you\.ssh\id_ed25519'

Files from earlier versions​

homebutler still reads these, so an older setup keeps working:

Old formCurrent formBehavior
~/.homebutler/alerts.yamlnotify: and alerts.rules in config.yamlRead only when config.yaml has neither alerts.rules nor a notify provider. Each use prints warning: ~/.homebutler/alerts.yaml is deprecated, move rules/notify into config.yaml.
~/.homebutler/watch/config.jsonwatch: in config.yamlA value in config.yaml wins.
backup_dir: <path>backup.dirBoth are read. backup.dir wins.
watch.enabled, watch.notify_on, watch.on_incident, watch.on_flapping, watch.cooldownThe same keys under watch.notifyBoth are read. If watch.notify is present, the flat keys are ignored.

Check the file​

homebutler config validate

config validate reads the config the way every other command does and reports three things: which file it used and why, what each section resolved to, and what is wrong. It makes no network connection and writes nothing.

🗂 Config validation
File /home/you/cfg/full.yaml
Source --config flag

Sections
✓ servers 2 servers (local-box, nas)
✓ proxmox 1 endpoint (pve)
✓ wake 1 target
✓ alerts cpu 80% · memory 70% · disk 85% · ignoring 1 container(s): nightly-backup
✓ notify ntfy
✓ watch enabled=true · notify_on=incident · cooldown=10m
✓ backup /home/you/backups
· backup_dir /home/you/backups
✓ web token set · dashboard can edit the config

Findings
⚠️ servers[1].key: Key file ~/.ssh/id_ed25519 does not exist.
→ Connections to this server will fail when they are attempted.

⚠️ Config is valid — 1 warning

A ✓ marks a section the file sets and · one it leaves out. Findings are errors (❌) or warnings (⚠️):

  • An error means something won't work, such as a duplicate server name or a threshold above 100. The command exits 1.
  • A warning means the file parses but probably doesn't do what you intended. The command exits 0, or 1 with --strict.

homebutler ignores a key it doesn't recognize without any message, so a typo silently switches a feature off. config validate finds those keys and suggests the nearest top-level name:

Findings
⚠️ Line 1: field notifiy not found in the homebutler config
→ Did you mean "notify"? Unrecognised keys are ignored silently, so this line currently has no effect.
FlagMeaning
--strictExit 1 when there are warnings, not only errors.
--jsonPrint the result as JSON: path, source, exists, sections, findings and valid. Each finding has severity, field, message and hint.
--config <path>Check a specific file.

File permissions​

A config file that holds a secret must not be readable by group or others. When it is, every command except doctor refuses to start, and config validate reports an error:

error: config error: config file /home/you/cfg/perm.yaml contains plaintext secrets but permissions are too open (0644); run: chmod 600 /home/you/cfg/perm.yaml

Run chmod 600 on the file. These keys count as secrets, and only when they hold a value: servers[].password, proxmox[].token, proxmox[].action_token, notify.telegram.bot_token, notify.slack.webhook_url, notify.discord.webhook_url, notify.webhook.url, notify.ntfy.topic, notify.ntfy.token, notify.gotify.token and web.token.

servers​

A list of machines. See Multi-server for how homebutler connects.

KeyTypeDefaultMeaning
namestringnone, requiredName used by --server, deploy, trust and the dashboard. Must be unique.
hoststringnoneAddress or hostname. Required unless local: true.
localbooleanfalseThe machine homebutler runs on.
userstringrootSSH user.
portinteger22SSH port, 1 to 65535.
authstringkeykey or password.
keystring~/.ssh/id_ed25519, then ~/.ssh/id_rsaPrivate key path. ~/ is expanded.
passwordstringnoneRequired when auth: password. A password with auth: key is ignored, and config validate warns.
binstringhomebutlerPath of the homebutler binary on the server.

proxmox​

A list of Proxmox VE API endpoints, read with an API token and no SSH. See Proxmox VE.

KeyTypeDefaultMeaning
namestringnone, requiredEndpoint name. Must be unique.
hoststringnone, requiredAddress or hostname.
portinteger8006API port.
token_idstringnone, requiredAPI token ID, such as monitoring@pve!readonly.
tokenstringnoneThe token secret. Set this or token_file, not both.
token_filestringnoneFile that holds the token secret. ~/ is expanded. The file must exist.
fingerprintstringnoneExpected certificate fingerprint.
ca_filestringnoneCA certificate file used to verify the endpoint.
insecurebooleanfalseSkip certificate verification.
timeoutduration10sRequest timeout, a positive Go duration.
action_token_idstringnoneToken ID of a second credential used only for guest power actions.
action_tokenstringnoneSecret for the action credential. Set this or action_token_file.
action_token_filestringnoneFile that holds the action secret. A file readable by group or others gets a warning.
guestslistnoneGuests that watch expects to keep running. Other guests are not alerted on.
guests[].nodestringnoneProxmox node name.
guests[].typestringnoneqemu or lxc.
guests[].vmidintegernoneGuest ID, greater than 0.

Guest actions use only the action credential. Without one, the actions are unavailable. Using the read token ID as action_token_id triggers a warning.

wake​

A list of Wake-on-LAN targets. See Wake-on-LAN.

KeyTypeDefaultMeaning
namestringnone, requiredName passed to wake.
macstringnone, requiredMAC address such as AA:BB:CC:DD:EE:FF.
ipstringnoneBroadcast address for the packet.

alerts​

Thresholds for the alerts command and the alert watcher.

KeyTypeDefaultMeaning
cpunumber90CPU percentage. 0 to 100; 0 alerts on every check, so config validate warns.
memorynumber85Memory percentage.
disknumber90Disk percentage, applied to every mount.
ignorelist of stringsnoneContainer names whose stopping and starting isn't reported. Use the name docker ps shows.
ruleslistnoneSelf-healing rules, below.

A rule under alerts.rules:

KeyTypeDefaultMeaning
namestringnone, requiredUnique rule name.
metricstringnone, requiredcpu, memory, disk or container.
thresholdnumbernonePercentage from 1 to 100. Required for cpu, memory and disk.
watchlist of stringsnoneNames to watch. Required for container.
kindstringdockerWhat the names in watch are: docker, systemd or pm2.
actionstringnone, requirednotify, restart or exec.
execstringnoneCommand to run. Required for exec.
timeoutduration30sLimit for the exec command.
cooldowndurationnoneMinimum time between firings of the rule.

If a rule fails to load, watch starts without the rules and the threshold and container checks still run. config validate reports the rule that failed.

notify​

Notification channels, all off until configured. A channel is used only when its block is complete; an incomplete block disables that channel and leaves the others on. homebutler notify test sends one message per channel.

ChannelKeysNotes
telegrambot_token, chat_idBoth required.
slackwebhook_urlMust start with http:// or https://.
discordwebhook_urlMust start with http:// or https://.
webhookurlReceives homebutler's own JSON payload.
ntfyurl, topic, tokenurl and topic required. token is for a protected topic.
gotifyurl, tokenBoth required. token is an application token.

watch​

Settings for watch. All keys are optional.

KeyTypeDefaultMeaning
notify.enabledbooleanfalseSend notifications for incidents. Needs a complete notify channel.
notify.notify_onstringflappingall, incident, flapping or off.
notify.on_incidentbooleanderivedSet by notify_on.
notify.on_flappingbooleanderivedSet by notify_on.
notify.cooldownduration5mMinimum time between notifications, such as 10m.
flapping.short_windowduration10mShort window for counting restarts.
flapping.short_thresholdinteger3Restarts in the short window that count as flapping.
flapping.long_windowduration24hLong window for counting restarts.
flapping.long_thresholdinteger5Restarts in the long window that count as flapping.
retention.max_incidentsinteger200Incidents kept on disk, newest first. A negative number keeps all of them.

backup​

Where backups go and how many to keep. See Backup and restore.

KeyTypeDefaultMeaning
dirstring~/.homebutler/backupsBackup folder. A warning appears when neither it nor its parent exists.
retention.max_archivesinteger0Archives to keep. 0 keeps all. A negative number warns.
retention.max_bytesstringnoneSize cap for the folder, such as 500MB or 20GB. Units B, K, M, G, T with an optional B or iB. An unparseable size is an error.

web​

Settings for the web dashboard.

KeyTypeDefaultMeaning
tokenstringnoneBearer token for the dashboard API. Setting it enables the dashboard's actions and makes its settings editable. The file must be mode 0600.

Example​

A file that sets every section. config validate accepts it when ~/pve.token exists, and warns if ~/.ssh/id_ed25519 doesn't:

servers:
- name: local-box
host: 127.0.0.1
local: true
- name: nas
host: 192.168.1.20
user: pi
port: 2222
auth: key
key: ~/.ssh/id_ed25519
bin: /usr/local/bin/homebutler
proxmox:
- name: pve
host: 192.168.1.10
token_id: monitoring@pve!readonly
token_file: ~/pve.token
timeout: 10s
guests:
- node: pve
type: qemu
vmid: 100
wake:
- name: desktop
mac: "AA:BB:CC:DD:EE:FF"
ip: "192.168.1.255"
alerts:
cpu: 80
memory: 70
disk: 85
ignore:
- nightly-backup
rules:
- name: web-down
metric: container
watch: [web]
action: restart
cooldown: 5m
notify:
ntfy:
url: https://ntfy.example.com
topic: homelab
watch:
notify:
enabled: true
notify_on: incident
cooldown: 10m
flapping:
short_window: 5m
short_threshold: 3
long_window: 1h
long_threshold: 6
retention:
max_incidents: 100
backup:
dir: /home/you/backups
retention:
max_archives: 5
max_bytes: 20GB
web:
token: <long-random-token>