Autonomi
LearnBuildWho we ArePublicationsGet ANTStart a Node
  • Learn
  • Node
  • ANT Token
  • Developers
  • Developer Documentation
  • Getting Started
    • Installation Guide
  • Core Concepts
    • Data Types
    • Data Storage
    • BLS Keys
  • How To Guides
    • Quick Start Guide
    • Local Network Setup Guide
    • Payments Guide
    • Build Apps with Python
    • Build Apps with Rust
  • API Reference
    • API Reference Overview
    • Client API
      • Chunks
      • GraphEntry
      • Pointer
      • Register
      • Scratchpad
      • BLS Keys
      • Analyze
    • Node API
    • BLS Threshold Crypto
    • Self Encryption
    • Rust Crate API Reference
    • Python API Reference
Powered by GitBook

Get Involved

  • Start a Node
  • Discord
  • Forum

Follow Us

  • X
  • Reddit
  • LinkedIn
On this page
  • Prerequisites
  • Starting a Network
  • Connecting to the testnet
  • Cleanup and Troubleshooting
  • For hackers
Export as PDF
  1. How To Guides

Local Network Setup Guide

This guide explains how to set up and run a local Autonomi network for development and testing purposes.

Prerequisites

  • Rust toolchain (with cargo installed)

  • Git (for cloning the repository)

That's it! Everything else needed will be built from source.

Starting a Network

  1. Clone the repository:

git clone https://github.com/maidsafe/autonomi
cd autonomi
  1. Start a local EVM testnet:

cargo run --bin evm-testnet 

Keep the terminal open and running.

  1. In a separate terminal, in the same directory (autonomi), run the following command:

cargo run --bin antctl -- local run --build --clean --rewards-address 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 evm-local

Done!

Connecting to the testnet

Cleanup and Troubleshooting

To stop and cleanup after a testnet, run the following commands to kill all the nodes, the evm testnet and delete all Autonomi related files.

Warning: If you are running local live nodes or apps/clients on Autonomi DO NOT DELETE THE WHOLE Autonomi data FOLDER asyou risk losing all your data. It is recommended to run testnets on a separate user or machine.

# macOS
killall evm-testnet anvil antnode
rm -rf $HOME/Library/Application\ Support/autonomi/

# Linux
killall evm-testnet anvil antnode
rm -rf $HOME/.local/share/autonomi/

If you are on Windows, the Autonomi data folder is here:

C:\Users\<username>\AppData\Roaming\autonomi.

Note that the 3 programs above might end with .exe

For hackers

A ONE LINER I like to use to start a testnet (and the evm testnet too), and stop everything on CTRL+C:

# macOS
rm -rf $HOME/Library/Application\ Support/autonomi/; cargo run --bin evm-testnet& cargo run --bin antctl -- local run --build --rewards-address=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266; (trap 'killall evm-testnet anvil antnode' SIGINT; cat)

# Linux
rm -rf $HOME/.local/share/autonomi/; cargo run --bin evm-testnet& cargo run --bin antctl -- local run --build --rewards-address=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266; (trap 'killall evm-testnet anvil antnode' SIGINT; cat)
PreviousQuick Start GuideNextPayments Guide

Last updated 2 months ago

You can now connect to the testnet with various APIs, for example: , and . It's also possible to use the , just remember to pass the --local flag.

Note: this has to be run in the autonomi directory (the one we )

Rust
Python
Node.js
Ant CLI
cloned earlier