Administration
Service
The package installs tierd.service. A first install enables it for boot without
starting it; upgrades keep your enable/disable choice and do not restart a running node.
sudo systemctl start tierd
sudo systemctl stop tierd
sudo systemctl restart tierd
systemctl status tierd
journalctl -u tierd -f
The unit restarts the daemon on failure after 2 seconds. Arguments come from
TIER_ARGS in /etc/tier/tierd.env; see
Daemon arguments.
Sandbox
The packaged unit runs tierd without root and with a restricted view of the system:
DynamicUser=yes: a transient service account allocated by systemd.- Persistent state in
/var/lib/tier, mode0700. With a dynamic user, systemd keeps it at/var/lib/private/tierand links it as/var/lib/tier. - Runtime directory
/run/tierd, mode0750, for the admin socket. - No capabilities,
NoNewPrivileges, read-only system (ProtectSystem=strict), no access to home directories, private/tmpand devices. - Protected kernel tunables, modules, logs, control groups, clock, and hostname.
- Only
AF_INET,AF_INET6, andAF_UNIXsockets; no new namespaces, no SUID/SGID, no writable-executable memory, native system calls only, filtered to@system-servicewithout@privilegedand@resources.
Admin socket
The daemon exposes a local Unix socket, /run/tierd/tierd.sock, with mode
0660, owned by the service's dynamic account. tierctl,
tier-messenger, and tier-agent use it, so on a packaged install
they run as root.
Override the path with --sock <path> (tierctl,
tier-messenger), TIER_ADMIN_SOCK (tierctl), or
admin_socket in the tier-agent config.
tierctl
| Command | Action |
|---|---|
tierctl id | Print this node's peer ID (64 hex). |
tierctl peers | Counts from the node's local membership view and the list of infrastructure peers. Client-only peers are counted but not listed. This is the default command. |
tierctl user add [seed] | Host a new user identity, or import one from a 64-hex Ed25519 seed. Prints the user ID. |
tierctl user ls | List the user IDs hosted on this node. |
tierctl user rm <user-id> | Stop hosting a user identity. |
tierctl send <peer-id> [suite] <message> | Send an encrypted node-to-node message to a device. |
tierctl send-user <from-user> <to-user> [suite] <message> | Send from a local user to a user; fans out to the recipient's online devices. |
tierctl stream <user-id> | Subscribe as a local user and print its message and receipt stream. |
tierctl status <user-id> | Print a user's online status: online, offline, or unknown. |
tierctl inbox | Print and drain received node messages. |
Peer and user IDs are 64 hexadecimal characters. suite is classical,
hybrid, or pq, default hybrid (see
Encryption).
Hosted users
A node can host several user identities. Each one is stored as
/var/lib/tier/users/<user-id-hex>.seed (the 32-byte Ed25519 seed, mode
0600) and reloaded on restart. They are managed only with tierctl
or created by applications, never through configuration. While a user has a live subscriber,
the node keeps it enrolled in the user directory; see
Identity model.
Backups
The node seed and the user seeds are the identities. Anyone with a copy can act as that node or user; losing them loses the identity. Back them up with access controls appropriate for secret keys:
sudo tar -C /var/lib/tier -czf tier-identity.tar.gz node_key users
tierd refuses to start if node_key is present but unreadable, the
wrong size, or corrupt: it never silently replaces an existing identity. A new key is generated
only when the file is absent.
Updates
See Updating for GitHub releases and Geek Foundation PPA for unattended upgrades.