Files
fips/docs/how-to
redshiftandJohnathan Corgan cdb03c76b0 Follow the macOS install layout for config, ACL, and identity paths
The macOS packaging installs config under /usr/local/etc/fips, wired through
the launchd plist and build-pkg.sh, but the default-path constants and the
config search path were hardcoded to /etc/fips for all Unix. On macOS the
daemon and fipsctl therefore looked in a directory that does not exist: the
ACL and host-map loaders hit their NotFound no-op arm and returned empty
state, so a populated peers.deny reported effective_mode "default_open" with
enforcement inactive, and host-file aliases went unloaded, with no error.

The peers.allow, peers.deny and hosts defaults now follow the platform's
packaging, and fipsctl keygen writes its identity there too. The config
search path keeps probing /etc/fips first and adds /usr/local/etc/fips after
it, so an existing install keeps working across the upgrade and the packaged
file still wins over a stale leftover. Both the macOS search-path entry and
the keygen output directory read one SYSTEM_CONFIG_DIR constant, so they
cannot drift apart. At startup the daemon warns once about hosts, peers.allow
or peers.deny stranded at the old location; the config file is deliberately
excluded, since both directories stay on the search path and a config left
behind is still read.

The control-socket snapshot tests repoint the ACL reloader at non-existent
paths under the temp dir, so the snapshot no longer reflects whatever ACL
files happen to exist on the machine running the tests.

Platform-gated unit tests pin both layouts, so a future refactor cannot
silently drift either one. Linux and Windows behavior is unchanged.

Adding a second system config directory moves the directory the daemon
derives the identity key path from, since that comes from whichever config
file loaded last. A host carrying fips.yaml at both locations would have
resolved fips.key to the new directory, found none, and under persistent
generated a fresh identity, silently changing its npub, routing address and
mesh IPv6 with no migration path. The daemon now adopts a key stranded at the
legacy path and warns to move it rather than generating one. The fallback is
confined to keys resolved from the system config directory, so a run using
./fips.yaml or a user config is never redirected to a system key.

Co-authored-by: Johnathan Corgan <johnathan@corganlabs.com>
2026-08-09 13:40:56 +00:00
..

How-To Guides

Task-oriented, step-by-step recipes for operators with a specific goal in mind. Each guide assumes the reader already knows what FIPS is and wants to get a particular thing done — enable a feature, deploy a component, troubleshoot a class of problem.

How-to guides do not teach concepts (that is the role of design/) and do not enumerate options (that is the role of reference/). They take the reader along the shortest correct path from "I want to do X" to "X is done".

Available Guides

Guide Goal
enable-mesh-firewall.md Activate the default-deny nftables baseline on fips0
enable-nostr-discovery.md Turn on Nostr-mediated discovery (3 capabilities — resolve, advertise, open — across 5 scenarios)
deploy-tor-onion.md Run a Tor onion service for inbound FIPS connections
tune-udp-buffers.md Set host sysctls so FIPS UDP sockets don't get clamped
tune-file-descriptors.md Raise RLIMIT_NOFILE so a busy node doesn't exhaust file descriptors (EMFILE) as peer count grows
run-as-unprivileged-user.md Run the daemon under a dedicated unprivileged service account (drops the default-root posture)
deploy-gateway.md Manually deploy fips-gateway on a non-OpenWrt Linux host (LAN-to-mesh outbound + mesh-to-LAN inbound port-forwards). For the OpenWrt path, see the gateway tutorial.
troubleshoot-gateway.md Diagnostic recipes for the gateway, organised by half (outbound, inbound, common)
persistent-identity.md Provision a stable Nostr keypair so the node keeps the same npub across restarts
host-aliases.md Use shortnames (test-us01.fips, my-laptop.fips) instead of full npubs by editing /etc/fips/hosts or setting peer aliases
set-up-bluetooth-peer.md Configure a Bluetooth Low Energy peer link
diagnose-mtu-issues.md Triage MTU-shaped failures and rule out their imposters (bufferbloat, transport saturation)