Configuration

Configuration

All configuration options for the XE node and its deployment environment.

#Node flags

The xe binary accepts the following command-line flags (via xe node [flags]):

#General

FlagDefaultDescription
-versionfalsePrint version string and exit
-port9000libp2p TCP listen port
-api-port8080HTTP API listen port
-api-bind127.0.0.1API bind address
-dial(none)Bootstrap peer multiaddr(s), comma-separated
-data./dataStorage directory for BadgerDB, identity keys, and Lima VM state
-cors-originhttp://localhost:3000Allowed CORS origin for API responses

#Provider mode

FlagDefaultDescription
-providefalseEnable compute provider mode
-vcpus2vCPUs to offer for leasing
-memory2048Memory in MB to offer for leasing
-disk20Disk in GB to offer for leasing
-ssh-port0SSH gateway listen port (0 = disabled)
-limactl-pathlimactlPath to the limactl binary

#Examples

Minimal standalone node:

xe
xe node

Production node with bootstrap peers:

text
xe node \  -port 9000 \  -api-port 8080 \  -api-bind 0.0.0.0 \  -data /var/lib/xe node \  -dial /ip4/203.0.113.10/tcp/9000/p2p/12D3KooW...

Provider node with SSH gateway:

text
xe node \  -provide \  -vcpus 4 \  -memory 8192 \  -disk 100 \  -ssh-port 2222 \  -data /var/lib/xe node \  -dial /ip4/203.0.113.10/tcp/9000/p2p/12D3KooW...

#Environment variables

Used in the deployment .env file at /opt/xe/deploy/.env:

VariableDescriptionExample
DOMAINPrimary domain for Caddy TLS and routingldn.test.network
CORE_DOMAINDomain for direct API accessldn.core.test.network
NODE_FLAGSAll flags passed to the xe node binary-port 9000 -api-port 8080 ...

The ecosystem.config.js reads NODE_FLAGS from the .env file and passes it as command-line arguments to the xe node binary. Caddy reads DOMAIN and CORE_DOMAIN via --envfile.

#Data directory

The -data flag points to a directory containing all persistent state:

PathContentNotes
badger/BadgerDB database filesWAL, value log, manifest — all blocks, chains, leases, state chain
host.keylibp2p identity private keyEd25519, determines peer ID. Persisted across restarts.
node.keyNode account private keyEd25519, used for signing blocks and attestations
ssh_host_keySSH gateway host keyEd25519, generated on first SSH gateway start
lima/Lima VM state (LIMA_HOME)Per-VM directories with disk images, sockets, logs
lima-templates/Lima YAML templatesPer-VM config files used during limactl create
images/VM base imagesUbuntu 24.04 cloud image (~600 MB), auto-downloaded on first provider startup

#Data directory sizing

BadgerDB stores all blocks, chains, pending sends, votes, conflicts, leases, and state chain data. For a test network, 1 GB is sufficient. Lima VMs consume additional disk for QCOW2 images (typically the lease's disk_gb value per VM).

#Port summary

PortProtocolServiceExposed
9000TCPlibp2p (peer-to-peer)Yes (firewall open)
8080TCPHTTP API (xe node)No (localhost only, via Caddy)
80TCPCaddy (HTTP, ACME challenges)Yes (firewall open)
443TCPCaddy (HTTPS, TLS termination)Yes (firewall open)
2222TCPSSH gateway (if -ssh-port set)Optional (firewall open if used)

#Process management

The node is managed by pm2 with the config at /opt/xe/deploy/ecosystem.config.js:

ProcessBinaryUserDescription
xe node/usr/local/bin/xe nodexeCore node (non-root for Lima compatibility)
caddy/usr/bin/caddyrootReverse proxy and static file server

Common pm2 commands:

text
pm2 list                    # Show process statuspm2 logs xe node            # Stream xe node logspm2 restart xe node         # Restart the nodepm2 restart caddy           # Restart Caddypm2 delete xe node          # Remove from pm2 (for config reload)pm2 start ecosystem.config.js --only xe node  # Start from configpm2 save                    # Persist process list across reboots

#State chain genesis

The state chain genesis block (statechain/genesis.json) is embedded in the binary at compile time. It configures:

KeyDescription
sys.dao_keysetDAO governance keys (3 keys, threshold 2)
sys.network_idNetwork identifier (e.g. "testnet"). Included in all block hashes.
sys.timekeepersTrusted timekeeper keys + threshold. Required for lease operations.

To regenerate the genesis for a different network:

shell
go run ./scripts/gen-genesis/ mainnet

#See also