VeilNet

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 argumentWhat happens
No argumentsPrints help and exits with code 0.
-h, --help or -helpPrints help.
-v, --version or -versionPrints the version.
Any other flagExits with code 2: "-x" is not a conflux option. Conflux never passes a leading flag to anchorctl.
One of conflux's commandsRuns the command. See Commands.
stop or restartExits with code 2. The message points to conflux down, conflux start and conflux anchorctl stop ….
Anything elsePassed 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:

NameResolution
statusWith no arguments, conflux's command, followed by the output of anchorctl status. With any argument, anchorctl's command, so conflux status -watch 5s works.
proxyConflux'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 ….
renewConflux's command, which takes no arguments. Any flag except -h exits with code 2 and points to conflux anchorctl renew -cred FILE.
startConflux'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.
  • status and anchorctl's commands need root in practice, because only root can read the directories.
  • proxy needs root only to register the boot service.
  • version and help need 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.

Usage
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.

Example
$ 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.

Usage
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.

Example
$ 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.

Usage
conflux enrol --manifest FILE|- [--api URL] [--ipv4 ADDRESS]
FlagDefaultDescription
--manifest FILERequiredReads the credential from FILE, or from standard input with -, up to 1 MiB.
--api URLThe credential's renewal URLOverrides the API address, which must name the same host.
--ipv4 ADDRESSThe address the issuer allocatedGives 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.

Example
$ 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.

Usage
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.

Example
$ 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.

Usage
conflux down
Example
$ sudo conflux down

conflux renew

Fetches a new credential and installs it on the running anchor, without a restart.

Usage
conflux renew
Example
$ sudo conflux renew

conflux install

Registers the boot service, and starts it if a configuration exists.

Usage
conflux install
Example
$ sudo conflux install

conflux uninstall

Removes the boot service, the configuration, the state, the identity, the extracted binaries and the logs.

Usage
conflux uninstall [--yes]
FlagDefaultDescription
--yesAsks for confirmationSkips 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.

Example
$ sudo conflux uninstall --yes

conflux status

Prints conflux's status rows, followed by the output of anchorctl status.

Usage
conflux status

It exits with code 78 when there is no configuration. To learn what each row means, see Reading Status.

Example
$ 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.

Usage
conflux version
Example
$ 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.

Usage
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.

Example
$ conflux help proxy

conflux anchorctl

Runs the embedded anchorctl with your arguments, unchanged.

Usage
conflux anchorctl [--] ARGS...

A leading -- is accepted and ignored. With no arguments, it runs anchorctl's help.

Example
$ sudo conflux anchorctl proxy

conflux serve

Runs the supervisor, which the boot service starts.

Usage
conflux serve [--foreground] [--dir DIR]
FlagDefaultDescription
--foregroundOffKeeps the supervisor attached to the terminal.
--dir DIR—Sets the root of all its paths, as CONFLUX_DIR does.
Example
$ 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.

FlagDefaultDescription
--taint TOn the first run, conflux mints one and prints itAsks for a taint at enrolment.
--ipv4 ADDRESSAsked once at a terminal. Refused with exit code 1 when there is no terminalGives 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 SPECNoneForwards a private network for the realm.
--no-subnet—Clears the list of forwarded networks.
--interface NAMEanchor0Names the network interface, with up only.
--uplink DEVThe host's networkReaches the realm over a serial line, given as /dev/X or /dev/X:BAUD.
--no-uplink—Returns to the host's network.
--peers ENTRYThe bootstrap list the credential carriesReplaces the bootstrap list with host:port or anchor…@host:port entries.
--no-peers—Returns to the credential's bootstrap list.
--api URLhttps://api.veilnet.com.auSets the https address where the machine enrols and renews.
--port NThe kernel picks oneSets the UDP port on every interface, from 1 to 65535.
--no-port—Returns to a port the kernel picks.
--low-latency, --no-low-latencyOffSends frames as QUIC datagrams, so flows do not block each other, but a lost frame is not resent.
--lan-discovery yes|no|autoauto: the credential's setting, or else anchor's default, which is onSearches the host's networks for anchors of the same realm tree.
--serve-exit, --no-serve-exitOffOffers this machine as an exit node to the internet.
--use-exit, --no-use-exitOffSends this machine's internet traffic over the overlay to an exit node.
Accepted values and conflicts
FlagRule
--taintAt 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.
--ipv4Any 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.
--subnetA 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-subnetBoth replace a list that another member's Subnets order set.
--interfaceLinux 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.
--uplinkUnix only. The fd:N form is refused, and conflux warns below 19200 baud.
--peersUse it only to reach a realm that the credential does not describe. Conflux warns when it replaces a different override.
--apiPlain 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-exitNever taken from the credential. In proxy mode, --use-exit covers only the anchor's own traffic.
ConflictsConflux 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., names start, up and proxy, and exits with code 69. It skips this check for a usage request, or when you give your own -socket or ANCHOR_SOCKET.
  • conflux anchorctl proxy lists, adds (-add) and removes (-rm) proxies on the running anchor. The changes last until the next restart, which starts from conflux.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.

CommandWhat it doesPower 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 IDLifts a block, whoever issued it.block
blocksLists 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…, as conflux status prints it. The ten-character short form in the tables of peers and blocks is not accepted.
  • To cover every private network on a member, use subnets -set '*'. The anchorctl help says all, 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, run conflux down.

To learn more, see Gossip Controls and Powers and Boundaries.

Exit Codes

Conflux exits with these codes:

CodeMeaningReturned by
0Success.Every command
1A 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
2A 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
13Needs root or Administrator.Every command that changes the machine
69Nothing 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
70A configuration that conflux or anchor refuses permanently, after three attempts. The systemd unit does not restart after this code.The supervisor
78No configuration. The systemd unit does not restart after this code.status, start, the supervisor
otherAnchorctl's own code, unchanged.Passed-through commands

Error Messages lists every message with its code.

Environment Variables

Conflux reads these environment variables:

VariableEffect
CONFLUX_DIRPuts 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=1Passes -v to anchord.
CONFLUX_ALLOW_INSECURE_API=1Allows a plain-http API address. For tests only.
ANCHOR_SOCKET, ANCHORD_TOKENSet 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.

LinuxmacOSWindowsFreeBSD, 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/
LogThe 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.plistService conflux/usr/local/etc/rc.d/conflux (FreeBSD), /etc/rc.d/conflux (OpenBSD)
What is in them
FileWhat it holds
conflux.jsonThe settings you asked for. See Configuration File.
manifest.b64The machine's identity and credential. A renewal rewrites it. It cannot be recovered from anywhere else. See What the Manifest Holds.
state.jsonWhat 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.jsonThe 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.jsonAnother 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.lockLets only one process at a time rewrite the manifest or the state.
What each command keeps
downstartinstalluninstall
Running anchorstopped(re)started(re)startedstopped
Boot servicekeptkeptregisteredremoved
conflux.jsonkeptkeptkeptdeleted
manifest.b64keptkeptkeptdeleted, for good
state.jsonkeptkeptkeptdeleted
anchord.jsonkeptrewrittenrewrittendeleted
Log file (macOS, FreeBSD, Windows)keptappendedappendeddeleted
Extracted binarieskeptkeptkeptdeleted

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:

/etc/conflux/conflux.json
{
  "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"
}
FieldTypeAbsent meansNotes
versionNumber—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.
taintsList of namesAlways writtenBefore enrolment, the taints to ask for. After enrolment, a copy of the credential's taints, checked at every start.
ipv4TextNever asked"" records that you declined an address, so conflux never asks again.
subnetsListForward nothingAs --subnet.
proxiesList of specsNoneProxy mode only. Refused in TUN mode.
uplinkTextThe host's IP networkA device, with an optional line speed.
peersListThe bootstrap list the credential carriesOverrides the credential's list. Usually absent.
portNumberThe kernel picks oneRefused together with uplink.
lowLatencytrue or falsefalseAs --low-latency.
lanDiscoverytrue or falseauto, not falseThe only field where absent does not mean false: the credential's setting decides. --lan-discovery no writes false.
serveExit, useExittrue or falsefalseNever both true.
tunNameTextanchor0As --interface.
apiBaseUrlTexthttps://api.veilnet.com.auWhere the machine enrols and renews.
exportObjectExport nothingWhere telemetry goes. See The export Block.
createdAt, updatedAtRFC 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
"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, logLevel and cardinalityLimit.
  • The three TLS fields take {"path": "…"} or {"inline": "…"}.
  • headers authenticate 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 enrol copies it into conflux.json once, and you can change it freely after that.
Three ways to set export, and how long each lasts
Set byLasts
This block, copied into anchord.json on every startUntil you change it
conflux anchorctl export -endpoint …Until the next restart or SIGHUP
A SIGHUP to anchordRe-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.