Use the Node CLI

Here's how to use the ant CLI to run one or more Autonomi nodes from your terminal and contribute storage space to the Network

The ant CLI lets you run one or more Autonomi nodes from your terminal and contribute your spare storage space to the Network.

circle-info

If this is your first time, we'd recommend you start with just a single node, so you can get a feel for how your machine and connection handle it. Then add more as your resources allow.

circle-info

You only need your public wallet address for this. Do not paste your private key or secret recovery phrase into any of these commands.

1

Install the ant CLI

On Mac and Linux:

curl -fsSL https://raw.githubusercontent.com/WithAutonomi/ant-client/main/install.sh | bash

On Windows:

irm https://raw.githubusercontent.com/WithAutonomi/ant-client/main/install.ps1 | iex

When the install finishes, you can check it worked with:

ant --help

If your terminal says ant cannot be found, close it and open a new one, then try again.

2

Start the background daemon

Run:

ant node daemon start

This starts a small background process that manages your nodes for you.

You can check it is running with:

ant node daemon status
3

Add your wallet address

Now register a node with your wallet address:

ant node add --rewards-address 0xYourWalletAddress

Any Ethereum address can be used here, but you'll need a compatible wallet if you want to see and use anything your nodes earn.

If this is the first time you've done this, the CLI will fetch the latest ant-node binary for you automatically.

4

Start your node

Run:

ant node start

If you only want to start one specific node later on, use its service name instead:

ant node start --service-name node1
5

Check that your node is running

To see all of your registered nodes and their status, run:

ant node status

To see a summary of the background daemon, run:

ant node daemon status

The daemon status command will also show you a local console URL you can open in your browser.

Once your node is running, it will begin gathering data and serving it to the Network.

Your nodes will update themselves automatically over time, so you do not need to manually reinstall the node binary for normal updates.

6

Add more nodes later if you want to

When you're ready to contribute more storage space, just add more nodes and start them:

ant node add --rewards-address 0xYourWalletAddress --count 2
ant node start

If you'd prefer to choose the ports yourself, you can do that too:

ant node add --rewards-address 0xYourWalletAddress --count 2 --node-port 12000-12001
7

Stop your nodes

To stop all of your running nodes, run:

ant node stop

Or stop just one of them:

ant node stop --service-name node1
8

Reset everything if you need a clean start

First stop your nodes:

ant node stop

Then reset everything:

ant node reset --force

The reset command will not run while nodes are still running.

This removes your node data, logs, and local node registry, so only use it if you really want to start over.

9

Congratulations

You are up and running, and contributing to the Autonomi Network from the Command Line.

Notes

  • If you install ant using the commands above, you should not need to enter bootstrap peers manually for normal live-network use.

  • When you add nodes, the CLI will show you where each node's data and logs are being stored.

Other useful commands

If you want to stop the background daemon itself, first stop your nodes:

ant node stop
ant node daemon stop

If you want to check the daemon again later:

ant node daemon status

If you want to update the ant CLI itself:

ant update

Advanced options

When adding nodes, there are a few extra options you may find useful:

  • --metrics-port to set metrics ports

  • --network-id to target a specific network

  • --bootstrap to provide bootstrap peers manually

  • --env to pass environment variables to the node

For a fuller list of commands and options, run:

Last updated