Running a node
What a node is, private versus public mode, and what you can do with a node.
On this page
What a node is#
A node keeps a copy of the chain and checks every transaction itself. Each transaction carries a proof; the node runs a small program, the verifier, on every proof and throws the transaction away if the proof is wrong. A node that checks for itself does not have to believe anyone.
There are two kinds:
- A follower copies and checks the chain and produces nothing. This is what "running a node" normally means.
- A block producer also puts new transactions into blocks and signs them. See Running a validator.
A wallet is a separate program that holds your keys and builds proofs. See Using the wallet.
What you can do#
| You want to | How |
|---|---|
| Try your own chain, node and wallet on one computer | Works now |
| Run a second, independent checking node on the same computer | Works now |
| Follow a chain that runs on someone else's computer | Available when the public network opens (--seed) |
| Join an existing chain as an extra block producer | Available when the public network opens (--validator-key) |
| Start from a snapshot, or delete old blocks | Available when the public network opens (--sync snapshot, --prune) |
The commands in these pages stay the same when the public network opens, with a seed address added.
Private or public#
You choose each time you start the node.
Private (the default): xlh node start
- The node listens on your own computer only (127.0.0.1). Nothing on your network or the internet can connect to it.
- Your wallet talks to your own node. No third party sees which balances you look up, because the wallet downloads the public data of every block and looks for its own notes locally.
- What it does not hide: once nodes can connect to each other, your node fetches blocks from, and sends your transactions to, other nodes, and they see your IP address and the time. There is no Tor or mix network built in.
Public: xlh node start --public
- The node listens on all network connections of your computer. Other computers can read the chain from it and send it transactions.
- There is no login, no encryption (plain HTTP) and no protection against flooding.
- Everyone who connects learns your IP address, and you see theirs.
- If your own wallet uses the same node, someone watching your network could connect your IP address to the moment your transactions appear.
- Your wallet page and keys are not exposed by this; the wallet always listens on your own computer only.
- You must open the port in your firewall or router yourself.
xlhdoes not touch them. xlhshows this explanation and asks you to typepublicbefore it starts. A script must pass--i-understand-public-mode.
If your goal is your own privacy, run private. If your goal is to serve others, run public on a machine that holds no wallet.
A separate gateway for public nodes exists in code, with an allow-list of read endpoints, rate limits and no logging by design. See Node HTTP API. It speaks plain HTTP and is started separately from the launcher.
In this section#
- Hardware and requirementsMeasured memory, processor, disk and software needs for a follower node and for a wallet.
- Install and first runHow to get the xlh command, set up your own chain, and start, check and stop a node.
- Sync modes and storageHow a node gets the chain, what each sync mode trusts, and archive versus pruned storage.
- Updating a nodeHow to update the node software, and why the verifier must match the chain.
- TroubleshootingWhat each xlh doctor message means and what to do about it.