Skip to main content

default_admin_addr

Function default_admin_addr 

Source
pub fn default_admin_addr() -> PathBuf
Expand description

Default admin endpoint per platform, per docs/protocol-v1.md §“Admin endpoint”.

On Linux the resolution chain is:

  1. $XDG_RUNTIME_DIR/inferd/admin.sock (set by systemd-logind on session start; the per-user equivalent of /run/<svc>/).
  2. $HOME/.inferd/run/admin.sock for sessions without logind (containers, ssh without a real login session).
  3. /tmp/inferd-<uid>/admin.sock as a last resort.

Historically inferd defaulted to /run/inferd/admin.sock. That path is only writable by root and so was incompatible with systemd --user units; the chain above matches the path the systemd unit declares via RuntimeDirectory=inferd.