Skip to content

Quick Start

Build the xe binary, run a node, create a wallet, and lease a VM.

Building from source

Prerequisites

  • Go 1.24 or later
  • Git

Clone and build

git clone https://github.com/xe-network/xe-poc-2.git
cd xe-poc-2/core
go build -o xe ./cmd/xe/

To embed a version string:

go build -ldflags "-X main.version=v0.4.0" -o xe ./cmd/xe/

Running a node

./xe node

Starts a node daemon with default settings: libp2p on port 9000, HTTP API on port 8080, data in ./data. The node runs until SIGINT/SIGTERM.

Connecting to a network

./xe node -dial /ip4/45.77.226.208/tcp/9000/p2p/12D3KooW...

Multiple bootstrap peers can be comma-separated.

Exposing the API

./xe node -api-bind 0.0.0.0 -cors-origin "https://explorer.example.com"

See xe CLI Reference for all flags.

Using the CLI

The xe binary is both the node daemon and the client tool. Client commands work against any node's API:

# Use a remote node (no local node needed)
export XE_NODE=https://ldn.core.test.network

Create a wallet

xe wallet create
# Wallet created!
#   Address: 7df14bbd...891e85aa
#   File:    ~/.xe/wallet.seed

Fund the wallet

xe fund
# Claiming 100 XUSD...
# Done! XUSD=100

Testnet only

The fund command claims 100 XUSD via proof-of-work (once per 24 hours). Production will use a proper emission model.

Check providers

xe providers
# [1] 42346388...dd015557
#     Total: 4 vCPU, 8192 MB, 50 GB
#     Free:  4 vCPU, 8192 MB, 50 GB
#     XUSD:  100 | Leases: 0 active

Lease a VM

xe lease --vcpus 1 --memory 1024 --duration 300
# Provider: 42346388...dd015557
# Lease submitted: ab9ada6f...
# Lease accepted!
#   xe ssh ab9ada6f...

SSH into the VM

xe ssh ab9ada6f...
# root@lima-xe-ab9ada6f:~#

The SSH connection goes through the network's SSH gateway with end-to-end encryption — your SSH client negotiates directly with the VM's sshd.

Full demo

From nothing to a root shell on a decentralised VM:

xe wallet create
xe fund
xe lease --duration 300
xe ssh <hash>

Docker deployment

FROM golang:1.24-alpine AS build
ARG VERSION=dev
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -ldflags "-X main.version=${VERSION}" -o /xe ./cmd/xe/

FROM alpine:3.20
COPY --from=build /xe /usr/local/bin/xe
EXPOSE 8080 9000
ENTRYPOINT ["xe", "node"]
docker build -t xe .
docker run -p 8080:8080 -p 9000:9000 -v xe-data:/data \
  xe -data /data -api-bind 0.0.0.0 \
  -dial /ip4/45.77.226.208/tcp/9000/p2p/12D3KooW...

See also