Syncing

This setup assumes some basic knowledge about using Docker.

Note

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.12.0. Refer to Docker Hub to see a list of available tags.

Running

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 maps 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.

Note

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.

Configuration

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.

Note

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