CLI Reference
Every conflux command and flag with its default, and the realm controls, exit codes, environment variables, files and fields of conflux.json.
Command Dispatch
Conflux has a small, fixed set of commands. It passes every other command unchanged to the anchorctl it embeds, so conflux peers works but conflux stop does not.
Conflux decides what to do from the first argument:
| First argument | What happens |
|---|---|
| No arguments | Prints help and exits with code 0. |
-h, --help or -help | Prints help. |
-v, --version or -version | Prints the version. |
| Any other flag | Exits with code 2: "-x" is not a conflux option. Conflux never passes a leading flag to anchorctl. |
| One of conflux's commands | Runs the command. See Commands. |
stop or restart | Exits with code 2. The message points to conflux down, conflux start and conflux anchorctl stop …. |
| Anything else | Passed unchanged to anchorctl. On Unix, anchorctl takes over the process, with its input, output, exit code and signals. |
Four names belong to both conflux and anchorctl. Conflux resolves them like this:
| Name | Resolution |
|---|---|
status | With no arguments, conflux's command, followed by the output of anchorctl status. With any argument, anchorctl's command, so conflux status -watch 5s works. |
proxy | Conflux's command. A flag that conflux proxy -h does not list exits with code 2 and prints both meanings. To reach anchorctl's proxy, use conflux anchorctl proxy -add …. |
renew | Conflux's command, which takes no arguments. Any flag except -h exits with code 2 and points to conflux anchorctl renew -cred FILE. |
start | Conflux's command, which takes no arguments. Any flag except -h exits with code 2 and points to conflux anchorctl start …. |
Commands
Conflux has these commands: up, proxy, enrol, start, down, renew, install, uninstall, status, version, help, anchorctl and the hidden serve. Run them with sudo, or from an elevated PowerShell on Windows.
- Commands that change the machine exit with code 13 without root.
statusand anchorctl's commands need root in practice, because only root can read the directories.proxyneeds root only to register the boot service.versionandhelpneed no root.
conflux up
Enrols the machine if it has no credential, saves the settings in conflux.json, registers the boot service and starts the anchor with a network interface.
conflux up [--taint T]... [--ipv4 ADDRESS | --no-ipv4] [--subnet SPEC... | --no-subnet]
[--interface NAME] [--uplink DEV | --no-uplink] [--peers HOST:PORT]... [--no-peers]
[--api URL] [--port N | --no-port] [--low-latency | --no-low-latency]
[--lan-discovery yes|no|auto] [--serve-exit | --no-serve-exit] [--use-exit | --no-use-exit]For the flags, see up and proxy.
$ sudo conflux up --taint brhk-2mq9-tzva-6pjs-k4xe-nw7d-qf --ipv4 10.128.0.2/24
conflux proxy
Does what up does, in userspace and with no network interface, and publishes the ports you name from the anchor.
conflux proxy PORT[/NETWORK]=BACKEND ... [the flags of up, except --interface]
A spec takes the form OVERLAYPORT[/NETWORK]=BACKEND. The network is tcp or udp, and defaults to tcp. The backend is host:port, with an IPv6 host in brackets.
Each run replaces the whole list of specs, and specs and flags can come in any order. You can leave out the specs when --subnet or --serve-exit gives the machine something to route. For the flags, see up and proxy. To learn more, see Publishing Services.
$ sudo conflux proxy 8080=127.0.0.1:3000
conflux enrol
Installs a credential that the machine was given, such as one that a guardian issued.
conflux enrol --manifest FILE|- [--api URL] [--ipv4 ADDRESS]
| Flag | Default | Description |
|---|---|---|
--manifest FILE | Required | Reads the credential from FILE, or from standard input with -, up to 1 MiB. |
--api URL | The credential's renewal URL | Overrides the API address, which must name the same host. |
--ipv4 ADDRESS | The address the issuer allocated | Gives the anchor a different IPv4 address. |
Enrol checks everything before it writes anything, and refuses to replace an existing credential. It has no --taint flag, because only a credential's issuer grants its taints.
$ sudo conflux enrol --manifest node-14.b64
conflux start
Starts the anchor now from conflux.json, in the mode that the file names, or restarts it if it is already running.
conflux start
It first copies this conflux binary to the location the boot service runs it from. It does not change the configuration or enrol. To bring a machine back after down, use start, not up. On a machine in proxy mode, up would switch the mode and drop the proxies.
$ sudo conflux start
conflux down
Stops the anchor now, and keeps the boot service, the configuration and the identity, so a reboot brings the machine back.
conflux down
$ sudo conflux down
conflux renew
Fetches a new credential and installs it on the running anchor, without a restart.
conflux renew
$ sudo conflux renew
conflux install
Registers the boot service, and starts it if a configuration exists.
conflux install
$ sudo conflux install
conflux uninstall
Removes the boot service, the configuration, the state, the identity, the extracted binaries and the logs.
conflux uninstall [--yes]
| Flag | Default | Description |
|---|---|---|
--yes | Asks for confirmation | Skips the confirmation, and is required when there is no terminal to ask at. |
The identity cannot be recovered afterwards. To see what each command keeps, see Files and Directories.
$ sudo conflux uninstall --yes
conflux status
Prints conflux's status rows, followed by the output of anchorctl status.
conflux status
It exits with code 78 when there is no configuration. To learn what each row means, see Reading Status.
$ sudo conflux status
conflux version
Prints the release, the commit and the platform, then the anchor set that conflux carries and the SHA-256 digests of its binaries.
conflux version
$ conflux version conflux 1.0.0-pre (f47de0fac83d24489664ca15fc6a317ac9c9f683) linux/amd64 anchor set <set id> anchord <sha-256> anchorctl <sha-256>
conflux help
Prints the usage of conflux and anchorctl, or of one command.
conflux help [COMMAND]
On its own, it prints conflux's usage, then anchorctl's usage below a horizontal rule. With a command name, it prints that command's usage, whichever binary owns the command.
$ conflux help proxy
conflux anchorctl
Runs the embedded anchorctl with your arguments, unchanged.
conflux anchorctl [--] ARGS...
A leading -- is accepted and ignored. With no arguments, it runs anchorctl's help.
$ sudo conflux anchorctl proxy
conflux serve
Runs the supervisor, which the boot service starts.
conflux serve [--foreground] [--dir DIR]
| Flag | Default | Description |
|---|---|---|
--foreground | Off | Keeps the supervisor attached to the terminal. |
--dir DIR | — | Sets the root of all its paths, as CONFLUX_DIR does. |
$ sudo conflux serve --foreground
Flags
Flags take one dash or two: -x or --x. A value follows as --x=v or --x v.
up and proxy
up and proxy take the same flags, except --interface, which only up takes. Conflux saves every flag in conflux.json, so a later run or a reboot keeps the value until you change it.
Repeat --taint, --subnet and --peers to give more than one value. To undo a flag, give its --no- form, or --lan-discovery auto. Giving both flags of a pair exits with code 1.
| Flag | Default | Description |
|---|---|---|
--taint T | On the first run, conflux mints one and prints it | Asks for a taint at enrolment. |
--ipv4 ADDRESS | Asked once at a terminal. Refused with exit code 1 when there is no terminal | Gives the anchor an IPv4 address, as a.b.c.d or a.b.c.d/len. |
--no-ipv4 | — | Records that the machine has no IPv4 address, but it can still reach IPv4 peers. |
--subnet SPEC | None | Forwards a private network for the realm. |
--no-subnet | — | Clears the list of forwarded networks. |
--interface NAME | anchor0 | Names the network interface, with up only. |
--uplink DEV | The host's network | Reaches the realm over a serial line, given as /dev/X or /dev/X:BAUD. |
--no-uplink | — | Returns to the host's network. |
--peers ENTRY | The bootstrap list the credential carries | Replaces the bootstrap list with host:port or anchor…@host:port entries. |
--no-peers | — | Returns to the credential's bootstrap list. |
--api URL | https://api.veilnet.com.au | Sets the https address where the machine enrols and renews. |
--port N | The kernel picks one | Sets the UDP port on every interface, from 1 to 65535. |
--no-port | — | Returns to a port the kernel picks. |
--low-latency, --no-low-latency | Off | Sends frames as QUIC datagrams, so flows do not block each other, but a lost frame is not resent. |
--lan-discovery yes|no|auto | auto: the credential's setting, or else anchor's default, which is on | Searches the host's networks for anchors of the same realm tree. |
--serve-exit, --no-serve-exit | Off | Offers this machine as an exit node to the internet. |
--use-exit, --no-use-exit | Off | Sends this machine's internet traffic over the overlay to an exit node. |
| Flag | Rule |
|---|---|
--taint | At most 32 names, each 1 to 64 bytes of printable UTF-8 with no space, ,, @ or +. Once the machine has a credential, conflux accepts only the taints it grants. More than one taint prints a containment warning. |
--ipv4 | Any unicast address outside 198.18.0.0/15, and not a /0. A private address is advertised to peers. A public address is used as the source address but is not advertised. |
--subnet | A SPEC is a prefix, an interface name or '*', optionally followed by @a+b to bind it to taints. Only private networks are accepted: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 100.64.0.0/10 and fc00::/7. The list holds at most 64 entries of up to 255 bytes each, bound to at most 16 taints that this machine carries. |
--subnet, --no-subnet | Both replace a list that another member's Subnets order set. |
--interface | Linux and Windows use the name as given. macOS and the BSDs number their own utunN and tunN devices, and treat a name of that form as the unit to request. |
--uplink | Unix only. The fd:N form is refused, and conflux warns below 19200 baud. |
--peers | Use it only to reach a realm that the credential does not describe. Conflux warns when it replaces a different override. |
--api | Plain http is refused unless CONFLUX_ALLOW_INSECURE_API=1 is set. On a sovereign network, enrol sets the address from the credential. |
--serve-exit, --use-exit | Never taken from the credential. In proxy mode, --use-exit covers only the anchor's own traffic. |
| Conflicts | Conflux refuses --port 0. It also refuses --port or --lan-discovery yes together with --uplink, and --serve-exit together with --use-exit. |
Other Commands
enrol, uninstall and serve have their own flags, listed with each command.
Passed-Through Commands
Conflux passes every command it does not own to anchorctl: peers, route, routes, connect, punch, events, metrics, export, telemetry, block, unblock, blocks, taints, subnets, send, subscribe, keygen, issue, delegate, renew-link, install-link, id, inspect, config, mint-realm, mint-anchor.
The anchorctl that conflux carries does not include root, so that command answers as unknown.
- When no daemon is running, conflux answers
nothing is running here., namesstart,upandproxy, and exits with code 69. It skips this check for a usage request, or when you give your own-socketorANCHOR_SOCKET. conflux anchorctl proxylists, adds (-add) and removes (-rm) proxies on the running anchor. The changes last until the next restart, which starts fromconflux.json.conflux anchorctl export -endpoint …changes telemetry on the running daemon until the next restart. See The export Block.
Realm Controls
Six anchorctl commands let one member act on others in the same realm. Conflux passes them through like any other anchorctl command. All of them except blocks act on another member, never on this machine.
| Command | What it does | Power needed |
|---|---|---|
block -target ID [-days N] [-reason TEXT] | Shuts another member out of the realm, on every member, until the block ends or is lifted. Without -days, it lasts until a member lifts it. | block |
unblock -target ID | Lifts a block, whoever issued it. | block |
blocks | Lists the blocks in force. | None |
taints -peer ID [-set A,B] [-timeout D] | Reads another member's taints, or moves the member to other taints. | taint |
subnets -peer ID [-set A,B | -clear] [-timeout D] | Reads the networks another member forwards for the realm, or replaces its list. | subnets |
telemetry -from ID [-timeout D] | Asks another member for its status, routes and counters. | telemetry |
- Each command needs its power in this machine's credential. The issuer grants powers in the same way as taints.
- Credentials from the instance VeilNet hosts grant no powers, so on that instance anchor refuses these orders and says why.
- On a sovereign network, the root node that the guardian hosts issues these orders, and the guardian may grant a power to a machine.
- Give the full 58-character AnchorID,
anchor…, asconflux statusprints it. The ten-character short form in the tables ofpeersandblocksis not accepted. - To cover every private network on a member, use
subnets -set '*'. The anchorctl help saysall, which anchor does not accept. - A block does not stop the blocked anchor. It keeps running outside its realm until the block ends or is lifted, and every peer shows
DATA no. To stop the anchor on this machine, runconflux down.
To learn more, see Gossip Controls and Powers and Boundaries.
Exit Codes
Conflux exits with these codes:
| Code | Meaning | Returned by |
|---|---|---|
| 0 | Success. | Every command |
| 1 | A failure not listed below, including a setting refused after the flags are read, such as an invalid address. | Every command, and the supervisor on a failure that the service manager should restart |
| 2 | A usage error, such as an unknown flag, stop or restart, proxy with nothing to serve, enrol without --manifest, or uninstall declined. | Conflux's own commands |
| 13 | Needs root or Administrator. | Every command that changes the machine |
| 69 | Nothing to act on. For example, no daemon is running, conflux is not installed, or the credential is fixed-term and cannot renew. | Passed-through commands, start, down, renew |
| 70 | A configuration that conflux or anchor refuses permanently, after three attempts. The systemd unit does not restart after this code. | The supervisor |
| 78 | No configuration. The systemd unit does not restart after this code. | status, start, the supervisor |
| other | Anchorctl's own code, unchanged. | Passed-through commands |
Error Messages lists every message with its code.
Environment Variables
Conflux reads these environment variables:
| Variable | Effect |
|---|---|
CONFLUX_DIR | Puts a whole separate installation, including its boot service, in one directory. The service name takes a suffix derived from the directory, conflux-<hash>.service or conflux_<hash> for rc, so it cannot replace the machine's own service. The control socket's path must stay under the kernel's limit of 104 to 108 bytes. Use it for tests, or on hosts whose default filesystem is mounted noexec. See Extracted Binaries. |
CONFLUX_DEBUG=1 | Passes -v to anchord. |
CONFLUX_ALLOW_INSECURE_API=1 | Allows a plain-http API address. For tests only. |
ANCHOR_SOCKET, ANCHORD_TOKEN | Set by conflux for a passed-through command, unless they are already set. A -socket flag that you type takes precedence. |
Files and Directories
Conflux keeps one configuration per machine, owned by root and outside every home directory. Every directory has mode 0700 and every file has mode 0600. On Windows, a protected access list gives SYSTEM and Administrators sole access.
| Linux | macOS | Windows | FreeBSD, OpenBSD | |
|---|---|---|---|---|
Configuration (conflux.json) | /etc/conflux/ | /Library/Application Support/conflux/ | %ProgramData%\conflux\ | /usr/local/etc/conflux/ |
| State: the identity, derived state, binaries, the service's copy of conflux | /var/lib/conflux/ | /Library/Application Support/conflux/ | %ProgramData%\conflux\ | /var/db/conflux/ |
Run (anchord.sock, token, ready) | /run/conflux/ | /var/run/conflux/ | %ProgramData%\conflux\run\ | /var/run/conflux/ |
| Log | The journal | /var/log/conflux.log | %ProgramData%\conflux\logs\conflux.log | /var/log/conflux.log (FreeBSD), /var/log/daemon (OpenBSD) |
| Boot service | /etc/systemd/system/conflux.service | /Library/LaunchDaemons/org.veilnet.conflux.plist | Service conflux | /usr/local/etc/rc.d/conflux (FreeBSD), /etc/rc.d/conflux (OpenBSD) |
| File | What it holds |
|---|---|
conflux.json | The settings you asked for. See Configuration File. |
manifest.b64 | The machine's identity and credential. A renewal rewrites it. It cannot be recovered from anywhere else. See What the Manifest Holds. |
state.json | What conflux has worked out, such as the AnchorID, the credential's expiry and the last renewal attempt. If you delete it, the next start learns these values again. |
anchord.json | The daemon's configuration, generated from conflux.json on every start. Edits to it do not last. |
bin/<setID>/ | anchord and anchorctl, extracted from conflux, with wintun.dll on Windows. Old sets are removed after 24 hours. |
anchor/subnets.json | Another member's Subnets order, if one is in force. --subnet or --no-subnet removes it. |
conflux (conflux.exe on Windows) | The copy of conflux that the boot service runs. up, proxy, install and start refresh it. |
conflux.lock | Lets only one process at a time rewrite the manifest or the state. |
| down | start | install | uninstall | |
|---|---|---|---|---|
| Running anchor | stopped | (re)started | (re)started | stopped |
| Boot service | kept | kept | registered | removed |
conflux.json | kept | kept | kept | deleted |
manifest.b64 | kept | kept | kept | deleted, for good |
state.json | kept | kept | kept | deleted |
anchord.json | kept | rewritten | rewritten | deleted |
| Log file (macOS, FreeBSD, Windows) | kept | appended | appended | deleted |
| Extracted binaries | kept | kept | kept | deleted |
To learn how conflux protects the manifest, see Security.
Configuration File
conflux.json holds the settings you asked for and everything a reboot needs. Every up and proxy rewrites it, and leaves out the fields that are at their defaults:
{
"version": 1,
"mode": "proxy",
"taints": ["brhk-2mq9-tzva-6pjs-k4xe-nw7d-qf"],
"ipv4": "10.128.0.5/24",
"proxies": ["5432=127.0.0.1:5432", "80=127.0.0.1:3000"],
"createdAt": "2026-09-06T06:35:41Z",
"updatedAt": "2026-09-06T06:35:41Z"
}| Field | Type | Absent means | Notes |
|---|---|---|---|
version | Number | — | 1. Conflux refuses a file from a newer conflux and names both versions. |
mode | "tun" or "proxy" | — | The command that wrote the file. See the two modes. |
taints | List of names | Always written | Before enrolment, the taints to ask for. After enrolment, a copy of the credential's taints, checked at every start. |
ipv4 | Text | Never asked | "" records that you declined an address, so conflux never asks again. |
subnets | List | Forward nothing | As --subnet. |
proxies | List of specs | None | Proxy mode only. Refused in TUN mode. |
uplink | Text | The host's IP network | A device, with an optional line speed. |
peers | List | The bootstrap list the credential carries | Overrides the credential's list. Usually absent. |
port | Number | The kernel picks one | Refused together with uplink. |
lowLatency | true or false | false | As --low-latency. |
lanDiscovery | true or false | auto, not false | The only field where absent does not mean false: the credential's setting decides. --lan-discovery no writes false. |
serveExit, useExit | true or false | false | Never both true. |
tunName | Text | anchor0 | As --interface. |
apiBaseUrl | Text | https://api.veilnet.com.au | Where the machine enrols and renews. |
export | Object | Export nothing | Where telemetry goes. See The export Block. |
createdAt, updatedAt | RFC 3339 time | — | Written by conflux. |
Editing by Hand
You can edit the file by hand. Then run sudo conflux start, and the anchor restarts with the settings in the file.
If anchor would refuse the file, conflux refuses it first, names the field and does not retry. Anchor finds problems that depend on the host when it starts. Examples are a subnet whose interface is not up yet, which anchor retries, and TLS material under export that does not load.
The export Block
export sets where this machine's telemetry goes. Conflux copies the block unchanged into the daemon's configuration, so the field names match anchor's. Conflux refuses an unknown or repeated field and names it.
"export": {
"enabled": true,
"endpoint": "guardian.example.gov:4317",
"metrics": true,
"logs": true,
"headers": { "authorization": "Basic …" },
"metricIntervalNanos": 60000000000,
"resourceAttributes": { "site": "field-2" }
}- The fields are
enabled,endpoint(host and port, not a URL),insecure,headers,metrics,traces,logs,flows,metricIntervalNanos,traceSampleRatio,serviceName,resourceAttributes,exportTimeoutNanos,shutdownTimeoutNanos,caCert,clientCert,clientKey,logLevelandcardinalityLimit. - The three TLS fields take
{"path": "…"}or{"inline": "…"}. headersauthenticate this machine to a collector, so treat them as credentials.- Conflux refuses an enabled block with no endpoint, or with none of metrics, traces, logs and flows turned on.
- A credential from a guardian may carry an export block.
conflux enrolcopies it intoconflux.jsononce, and you can change it freely after that.
| Set by | Lasts |
|---|---|
| This block, copied into anchord.json on every start | Until you change it |
conflux anchorctl export -endpoint … | Until the next restart or SIGHUP |
| A SIGHUP to anchord | Re-reads the file and discards the setting from the command above |
sudo conflux status prints the endpoint that this file names, and shows which of these settings the running daemon follows.