This setup assumes some basic knowledge about using Docker.


To access the testnet, you must first have the same genesis block. For this, you create a genesis block.

docker run -v $(pwd)/data:/aergo/data aergo/node aergosvr init /aergo/testnet-genesis.json

testnet-genesis.json is the specification of the testnet genesis block. This file is included in the Docker image, so you can use the above command without any additional setup.


When you run the Docker image named aergo/node for the first time, Docker downloads the latest image automatically. To update the image to a new version, run docker pull aergo/node. You can also specify a specific version by replacing aergo/node with aergo/node:0.9.9. Refer to Docker Hub to see a list of available tags.


When you run the server after creating the genesis block, it automatically starts synchronizing.

docker run -v $(pwd)/data:/aergo/data -p 7845:7845 -p 7846:7846 aergo/node

The -p argument map ports from the aergo server inside the container to your host machine. 7846 is for the peer to peer protocol. 7845 is for the RPC API; you can remove this port binding to disallow access to the API.


If your machine is behind a NAT (such as a router), you need to setup manual forwarding of the port 7846 to allow other peers to sync with your node.


The above commands use a default configuration file included in the Docker image that is suitable to connect to the testnet. If you want to override configuration parameters, you can create a local copy of testnet.toml and override the included version using a Docker volume, for example:

docker run -v $(pwd)/data:/aergo/data -v $(pwd)/testnet.toml:/aergo/testnet.toml -p 7846:7846 aergo/node

Please refer to Configuration for a detailed explanation of the available settings.


To customize the log format, place an arglog.toml file in the container’s working directory: -v $(pwd)/arglog.toml:/aergo/arglog.toml.