Saphan StudioDocs
Deployment

Per-user vs system-wide state (the --system flag)

Where the install goes and where the state goes are independent decisions, and only one of them is made at install time.

Install location and state location are independent. By default the engine keeps its daemon state per user (macOS: ~/Library/Application Support/saphan and ~/Library/Logs/saphan; Linux: the XDG directories). With the global --system flag — or automatically when running as root — it uses the FHS paths instead: /etc/saphan, /run/saphan, /var/log/saphan.

A system-wide package does not imply system-wide state: packages ship no service units and start nothing. Every server surface — saphan server, saphan serverd, saphan-gateway and saphan-oauth — is started by an explicit verb and manages its own pidfile under the same daemon path ladder; whether they run per-user or system-wide is the --system decision at run time. Nothing on this page ever starts one for you, which is why Central servers: saphan-gateway and saphan-oauth is a section and not a footnote.