AlgoKit LocalNet | Algorand Developer Portal

AlgoKit LocalNet

The AlgoKit LocalNet feature allows you to manage (start, stop, reset, manage) a locally sandboxed private Algorand network, enabling interaction and deployment of changes against your own Algorand network without needing to worry about funding TestNet accounts or public visibility of submitted information.

AlgoKit LocalNet uses optimized Docker images for a great development experience, ensuring that images are small, start quickly, and have enabled developer-centric features like KMD for programmatically getting faucet private keys.

The philosophy of AlgoKit LocalNet is to treat it as an ephemeral network—don't store recoverable data, as resets may happen at any time despite efforts to minimize this.

For details on executing algokit localnet without docker or podman refer to the codespaces section.

Prerequisites

AlgoKit LocalNet relies on Docker and Docker Compose. You can use Podman as a Docker replacement. Install Docker following the official instructions and ensure Docker Compose is installed.

For Windows users, WSL 2 needs to be installed, which can be done by following the official installation instructions. Windows 10 should be updated to the latest version to avoid installation issues.

Alternatively, the Hyper-V backend can be used on Windows 10/11 Pro+.

Podman support

If you prefer Podman as a container engine, install and configure it first, then set it as the default container engine with algokit config container-engine podman.

Known issues

The AlgoKit LocalNet is built with 30,000 pre-generated participation keys. Once 30,000 rounds are reached, it will no longer accept new rounds. At that point, you can reset the LocalNet to continue development.

Supported operating environments

AlgoKit LocalNet is supported on Windows, Linux, and Mac on Intel, AMD chipsets, and Apple Silicon, relying on official Algorand Docker images for Indexer, Conduit, and Algod.

Container-based LocalNet

AlgoKit CLI supports both Docker and Podman for container engines, with Docker being the default.

Creating / Starting the LocalNet

To create/start an instance, run algokit localnet start. This command:

You can specify options like:

On the first run, the following images will be downloaded:

Once the LocalNet has started, the following endpoints will be available:

Creating / Starting a Named LocalNet

For control over configuration changes, use named LocalNet instances with algokit localnet start --name {name}. This will run a named LocalNet environment based on the default, but it won’t update automatically.

Specifying a Custom Configuration Directory

Multiple LocalNet instances with different configurations can be managed using --config-dir or by setting the ALGOKIT_LOCALNET_CONFIG_DIR environment variable. For example:

algokit localnet start --config-dir /path/to/custom/config

Controlling Algod Developer Mode

Use --dev or --no-dev to control the startup of algod in developer mode:

algokit localnet start --no-dev  # Starts without developer mode
algokit localnet start --dev     # Starts with developer mode (default)

Stopping and Resetting the LocalNet

Execute algokit localnet stop to stop the LocalNet without losing the current state. Use algokit localnet reset to refresh the container definition and update to the latest Docker images.

Viewing Transactions in the LocalNet

Use the AlgoKit Explore feature to check the current state of your LocalNet, including transactions.

Executing Goal Commands Against AlgoKit LocalNet

Refer to the AlgoKit Goal feature for executing goal commands. Use algokit localnet console for a Bash shell to run goal commands.

Getting Access to the Private Key of the Faucet Account

To access the private key for transferring ALGOs, use:

algokit goal account list
algokit goal account export -a {address}

Utilize the methods in AlgoKit Utils to retrieve the private key automatically.

GitHub Codespaces-based LocalNet

The AlgoKit LocalNet feature also supports running in GitHub Codespaces, allowing you to bypass Docker usage. Use the algokit localnet codespace command for this.

Options