Skip to main content

Connect to an IOTA Network

IOTA CLI

IOTA provides IOTA command line interface (CLI) to interact with IOTA networks:

  • Create and manage your private keys
  • Create example NFTs
  • Call and publish Move modules

You can use the CLI or SDKs to send transactions and read requests from using the JSON-RPC and the following endpoint: https://fullnode.<IOTA-NETWORK-VERSION>.iota.io:443.

Alphanet

At the moment, you can only use the Alphanet API, faucet and explorer:

Environment Set Up

First, Install IOTA. After you install IOTA, request IOTA test tokens for the network you are using. If connected to Localnet, use cURL to request tokens from your local faucet.

To check whether IOTA is already installed, run the following command:

which iota

If IOTA is installed, the command returns the path to the IOTA binary. If IOTA is not installed, it returns iota not found.

Release Info;

See the IOTA Releases page to view the changes in each IOTA release.

Connect Your CLI to a Network

You can connect to an IOTA network using the following command that will start the IOTA CLI Client:

iota client

First Run

If this is the first time you run the command, you will be prompted to configure the client.

1. Create client.yaml

Config file ["<FILE-PATH>/.iota/iota_config/client.yaml"] doesn't exist, do you want to connect to a IOTA Full node server [y/N]?

Enter y to proceed. You receive the following response:

2. Select the Network

IOTA Full node server URL (Defaults to IOTA Devnet if not specified) :

If you want to connect to the Devnet, you can simply press Enter.

Alphanet

At the moment, you can only use the Alphanet API, faucet and explorer:

If not, specify your desired node URL. If you choose to add a custom URL, you should also add an alias for ease of access:

Environment alias for [<URL-ENTERED>] :

3. Generate Keys and Address

Select key scheme to generate keypair (0 for ed25519, 1 for secp256k1, 2: for secp256r1):

Finally, you will be prompted to select the key scheme you want to use. After this, you will receive a message that states the selected key-scheme, the generated address and your secret recovery phrase.

Generated new keypair for address with scheme "ed25519" [0xb9c83a8b40d3263c9ba40d551514fbac1f8c12e98a4005a0dac072d3549c2442]
Secret Recovery Phrase : [hat become demise beyond history wood stage add nice list jaguar legend]

Add a Network Environment

The IOTA CLI Client allows you to add any number of network environments.

Check the Current Network ENVs

You can easily check the currently configured environments using the following command, which will output the environment alias and URL, as well as indicate the currently active environment:

iota client envs

The command outputs the available environment aliases, with (active) denoting the currently active network.

localnet => http://0.0.0.0:9000 (active)
alphanet => https://api.iota-rebased-alphanet.iota.cafe:443
Alphanet

At the moment, you can only use the Alphanet API, faucet and explorer:

You can add a new environment using the iota client new command. You should specify and alias and rpc URL, for example:

client new-env --alias local --rpc http://0.0.0.0:9000

Switch Network Environment

You can switch the current environment using the following command:

iota client switch --env <EnvAlias>
  • Where <EnvAlias> is one of your currently set environments. You can use the following networks to develop on IOTA. If you are still developing your application, you should use the Devnet or Testnet, as these networks provide convenient faucets for test tokens.

IOTA Networks

Alphanet

A temporary network while still in early development, used before public launch of IOTA Rebased. Will be replaced by the Testnet afterwards.

Alphanet

At the moment, you can only use the Alphanet API, faucet and explorer:

Devnet

The latest stable release. As such, it has the latest features that were tested in the development branch of the repository.

Testnet

Once a release has been battle-tested in the Devnet, it moves to the Testnet. You can use this network to test your software in real-world conditions.

Data persistence is not guaranteed on the Testnet and Devnet

Devnet data is wiped regularly as part of scheduled software updates.

The data on Testnet persists through the regular update process, but might be wiped when necessary. Testnet data wipes are announced ahead of time.

Testnet node validators

The IOTA Alphanet, Testnet and Devnet networks consist of four validator nodes operated by the IOTA Foundation.

Mainnet

The fully operational production network, with data persistence and where tokens have real value.

Local Networks

You can also spin up a local IOTA network for local development.