Sync and the daemon¶
antiphond is the only part of Antiphon that touches the
network. It syncs mail, sends the outbox, runs delivery rules,
raises notifications and owns the vault. It runs in the
foreground, logs to stdout/stderr, and stops cleanly on SIGHUP,
SIGINT or SIGTERM.
You do not have to install anything: the client starts a daemon for you (see below). A supervisor is only worth it if you want the daemon running before the first client launch, restarted on failure, and stopped at logout.
Tune sync¶
[sync]
interval_minutes = 2 # how often a full pass runs
idle = true # push: new mail lands within seconds
With idle = true the daemon holds one IMAP IDLE connection per
account, parked on the inbox, and syncs the moment the server
announces new mail. On servers without IDLE it falls back to
the interval. An interval_minutes of 0 disables the timer
entirely.
Concurrency¶
A pass fans out rather than queueing: up to four accounts sync at once, and within each account up to three folders fetch in parallel, every worker on its own IMAP connection. A slow or large account (or folder) holds only its own worker; the rest keep draining. The bounds are fixed, chosen to stay inside the connection limits mail servers enforce.
Zero setup: let the client start it¶
When antiphon finds no daemon it starts one itself, logging to
$XDG_STATE_HOME/antiphon/antiphond.log. The daemon outlives
the terminal. The client also checks the running daemon's
version on launch and restarts one left over from an older
build, so an upgrade never leaves a stale daemon behind the
new client. Turn autostart off to run your own supervisor:
[daemon]
autostart = false
macOS (launchd)¶
cp dist/launchd/org.antiphon.antiphond.plist ~/Library/LaunchAgents/
launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/org.antiphon.antiphond.plist
Stop it:
launchctl bootout gui/$(id -u)/org.antiphon.antiphond
Edit the ProgramArguments path if antiphond is not at
/usr/local/bin/antiphond (Homebrew on Apple silicon uses
/opt/homebrew/bin, cargo uses ~/.cargo/bin).
systemd (GNOME, KDE and most distributions)¶
antiphon setup already installs the antiphond.service user
unit on a systemd host (it stops short of enabling it, so the
choice stays yours). If you ran setup, enabling it is all that
is left:
systemctl --user enable --now antiphond
If you skipped setup, install the unit by hand first:
mkdir -p ~/.config/systemd/user
cp dist/systemd/antiphond.service ~/.config/systemd/user/
systemctl --user enable --now antiphond
Logs: journalctl --user -u antiphond. To keep it running after
logout: loginctl enable-linger.
dinit (Artix, Chimera)¶
mkdir -p ~/.config/dinit.d
cp dist/dinit/antiphond ~/.config/dinit.d/
dinitctl --user enable antiphond
Requires a user dinit instance (Artix and Chimera start one at
login; elsewhere run dinit from your session startup).
runit (Void)¶
mkdir -p ~/sv
cp -r dist/runit/antiphond ~/sv/
Point a user-level runsvdir at ~/sv, then control it with
SVDIR=~/sv sv start antiphond and friends.
OpenRC, s6 and everything else¶
OpenRC user services (0.56+) and s6 both supervise a plain
foreground command; point them at antiphond. Without a user
supervisor, use a session hook below or the client's autostart.
Desktop autostart (KDE, XFCE, LXQt, GNOME)¶
mkdir -p ~/.config/autostart
cp dist/autostart/antiphond.desktop ~/.config/autostart/
Starts antiphond at login but does not restart it on failure; prefer systemd/dinit/runit where you have them.
Minimal sessions¶
- X11 (
startx/xinit):antiphond &in~/.xinitrcbefore the window manager line. - sway:
exec antiphondin~/.config/sway/config. - Hyprland:
exec-once = antiphondinhyprland.conf. - river:
riverctl spawn antiphondin~/.config/river/init. - labwc:
antiphond &in~/.config/labwc/autostart.
Ready-made service files ship in dist/.
Reloading config¶
You do not signal the daemon to reload. Add, edit or remove an
account in the client, or change the sync interval or idle
setting on the settings Essentials tab, and the running daemon
picks it up at once; the view answers applied to the running
daemon. SIGHUP stops the daemon, it does not reload it.
If an OAuth account's sign-in expires, the client flags it in the status line and on the settings Accounts tab. Press O there, or run:
antiphon oauth login <account>
Stopping and checking¶
Any of SIGHUP, SIGINT or SIGTERM stops antiphond gracefully: it finishes the current pass, seals the vault, and exits.
antiphon doctor # is a daemon reachable? how much is queued?