NEXItaliano

NEXFS › Manual pages › nexfs-setup(8)

NEXFS-SETUP(8) NEXFS Administration NEXFS-SETUP(8)

nexfs-setup - a NEXFS cluster with one command per machine

nexfs-setup init [--node NAME] [--address IP] [--port N] [--disk DIR] [--encryption-key FILE] [--uses N] [--ttl MINUTES]
nexfs-setup token [--role ROLES] [--uses N] [--ttl MINUTES]
nexfs-setup token list | token revoke NUMBER
nexfs-setup join ADDRESS[:PORT] CODE --data|--meta|--client [--node NAME] [--address IP] [--disk DIR]... [--mount DIR]

Every command accepts --json (the outcome in JSON, for scripts) and -c FILE (the configuration, default /etc/nexfs/nexfs.json).

Installs and configures NEXFS without copying certificates and configurations by hand. On the first machine init creates the cluster; on every other machine join brings it in with an entry code: 32 letters and digits in groups of four, valid for a time and a number of uses chosen by whoever creates it.

The key of each machine is generated on the machine and never leaves it: a meta node only signs its certificate request. The code never travels over the network: the new machine and the meta node prove to each other that they know it, so the new machine receives the genuine CA of the cluster and nobody can get in the middle.

On the first machine: the cluster CA (/etc/nexfs/pki/ca.key, readable only by root and passed to the service as a credential), the node certificate, the cluster with one meta and data node, the filesystem, and an entry code for the other machines (by default 5 uses and 60 minutes). The node name is the host name of the machine, the address is that of its default route: they can be changed with --node and --address.
A new code (administrators only: on a meta node). --role is a list chosen from data, meta, client (by default all three); --uses the number of uses (default 1), --ttl the minutes of validity (default 60, at most one week). It prints the code and the commands to run on the new machines.
token list
The codes, with their roles, remaining uses and expiry (without the secrets).
token revoke NUMBER
Removes a code before it expires.
On the new machine, with the address of a meta node of the cluster and the code:
a data node (disks with --disk, default /var/lib/nexfs/disco0);
a meta node (with --disk also a data node): it joins the voting cluster and receives the CA key, so that it can in turn welcome new machines;
a client: the configuration and the nexfs-client@ unit that mounts the filesystem on --mount (default /nex).
The node number is chosen by the cluster. A code that is invalid, expired, used up or not allowed for that role is rejected, and the machine stays as it was.

/etc/nexfs/nexfs.json
the node configuration
/etc/nexfs/cluster.json
the meta nodes of the cluster as reported by the join channel (the configuration of a client)
/etc/nexfs/pki/
ca.crt, node.crt, node.key (0600) and, on meta nodes, ca.key (0600)

The join channel is TLS 1.3 on the node port plus one (7401 with the default port 7400), on the meta nodes that hold the CA key.

# on the first machine
nexfs-setup init
# on the other two
nexfs-setup join 192.168.1.10 K7QM-3XRA-... --meta --disk /var/lib/nexfs/disco0
# on a workstation
nexfs-setup join 192.168.1.10 K7QM-3XRA-... --client --mount /nex

nexfsctl(8), nexfsd(8), nexfs-client(8); the NEXFS guide "Installation".

Roberto Arato, Arato Ingegneria — https://aratoingegneria.it

November 2026 nexfs 1.0.0~beta4