Running as a service
bifrostd takes no options besides --version and --help. Everything comes from the environment:
BIFROST_CONFIG, BIFROST_SOCKET, BIFROST_STATE_DIR and BIFROST_LOG. It runs as your own user.
systemd user unit
Section titled “systemd user unit”-
Create
~/.config/systemd/user/bifrost.service:~/.config/systemd/user/bifrost.service [Unit]Description=Bifröst: remote machines as local folders[Service]ExecStart=%h/.local/bin/bifrostdExecReload=/bin/kill -HUP $MAINPIDEnvironment=BIFROST_LOG=infoRestart=on-failure# the mount helpers live in the unit's cgroup: only stop bifrostd, so they keep serving and are adopted on restartKillMode=process[Install]WantedBy=default.target -
Give the daemon your SSH agent, then enable it:
Terminal window systemctl --user import-environment SSH_AUTH_SOCKsystemctl --user daemon-reloadsystemctl --user enable --now bifrostimport-environmentlasts until you log out. Put it in your login profile so it runs every session. -
Check on it:
Terminal window bifrost statusjournalctl --user -u bifrost -f
systemctl --user reload bifrost sends SIGHUP, which reloads the config at once.
Why KillMode=process
Section titled “Why KillMode=process”sshfs and rclone run as children of bifrostd, inside the unit’s cgroup. With the default
KillMode=control-group, stopping or restarting the unit sends SIGTERM to every child and every mount drops.
With KillMode=process only bifrostd stops: the mounts keep serving, and the next start adopts them in place,
same process, no remount. A crash takes the same path.
To actually tear a mount down, use bifrost unmount <target>.
The SSH agent
Section titled “The SSH agent”The daemon’s ssh inherits SSH_AUTH_SOCK from its environment, and a user service does not get your login
shell’s environment by default. bifrost doctor tells you which side you’re on:
SSH ✓ ssh /usr/bin/ssh ✓ SSH_AUTH_SOCK visible to daemonIf it shows ✗ SSH_AUTH_SOCK not visible to daemon, run the import-environment line above and
systemctl --user restart bifrost. A key without a passphrase works without an agent.
Stopping cleanly
Section titled “Stopping cleanly”SIGTERM or SIGINT stops the API, lets in-flight mount operations finish (up to 5 seconds), writes
state.json, removes the socket and exits 0. It does not unmount anything.
No launchd agent ships with Bifröst yet. Start bifrostd from a terminal, or write a LaunchAgent that runs
~/.local/bin/bifrostd with your environment.

