Agents
Setup notes for running the Hermes agent on a dedicated VM, with LXD (ZFS backed) available to it as a sandbox for tool use.
Provision the VM
Create an Ubuntu 26.04 VM and attach a 1 TiB block device in addition to the root disk.
Confirm the device name (a virtio disk, /dev/vdb below):
lsblkPartition the block device
Two partitions:
256 GiB—/home/hermes, ext4768 GiB— btrfs pool for LXD
sudo parted /dev/vdb --script mklabel gpt
sudo parted /dev/vdb --script mkpart home ext4 0% 256GiB
sudo parted /dev/vdb --script mkpart lxdpool btrfs 256GiB 100%This yields /dev/vdb1 (home) and /dev/vdb2 (btrfs pool).
Install LXD with a btrfs backed pool
sudo apt update
sudo apt install -y btrfs-progs
sudo snap install lxdInitialise LXD and let it create the btrfs pool on the second partition:
Answer the wizard with:
Configure a new storage pool: yes
Name:
lxdBackend:
btrfsCreate a new btrfs pool: yes
Use an existing empty block device: yes, path
/dev/vdb2
Create and mount /home/hermes
Persist the mount in /etc/fstab (by label, to survive device renaming):
Verify it mounts cleanly:
Add the hermes user
Create the user against the already-mounted home directory:
Add to sudoers:
Install Hermes
Run it as the hermes user
Give hermes LXD access
Add the user to the lxd group so it can drive containers without sudo:
Re-log (or sudo -iu hermes) for the group to take effect, then confirm:
Configure Hermes
As the hermes user, reload the shell and run the setup wizard:
Web dashboard
Add the following to ~/.hermes/.env:
Run the dashboard as a system service that restarts on failure. Service — /etc/systemd/system/hermes-dashboard.service:
Enable and start it:
Access it at http://<vm-host>:9119, and check it with:
Backup
Hermes has a native command that bundles config, the SQLite databases (WAL-safe, works while Hermes is running), .env, auth tokens, skills, sessions, and cron jobs into one timestamped zip — excluding the reinstallable codebase:
Daily backup with a systemd timer
Run the backup once a day, storing archives in ~/backup and pruning anything older than a month. These are system units that drop privileges to the hermes user via User=, so they run without an active login (no lingering required). systemd sets $HOME to /home/hermes for the service.
Backup script — /home/hermes/.local/bin/hermes-backup.sh (owned by hermes):
Service — /etc/systemd/system/hermes-backup.service:
Timer — /etc/systemd/system/hermes-backup.timer:
Enable the timer:
Check it:
Pull on a remote nightly in cron. The trailing check fails the job (non-zero exit, so cron mails you) if the destination has no backups after the sync:
Last updated