aeriumdev/aerium

By aeriumdev

Updated 9 months ago

A full-node implementation of the Aerium blockchain in Go.

Image
Networking
Languages & frameworks
Developer tools
0

2.2K

aeriumdev/aerium repository overview

Preface

Docker is a tool that simplifies the process of creating, deploying, and running applications using containers. With containers, developers can bundle all the necessary parts of an application, including libraries and dependencies, and deploy them as a single package.

In this document, we will guide you on how to run Aerium using Docker, step by step.

Prerequisites

Before running Aerium with Docker, ensure that you have a clear understanding of how aerium-daemon and aerium-wallet works. Then you need to install docker in your system. If you are using Windows please make sure you have installed WSL.

Docker Images

The Aerium docker images are available at Docker Hub. You can pull the latest image with this command:

docker pull aeriumdev/aerium

Initializing the Node

Now you need to create a wallet and setup a working directory for your node. A working directory is a place where you save blockchain data and wallets. Open the Terminal and run the following command:

docker run -it --rm -v ~/aerium:/root/aerium aeriumdev/aerium aerium-daemon init

Here's an explanation of the Docker flags:

  • -it: Makes the Docker container interactive for command-line interaction.
  • --rm: Cleans up the temporary environment automatically when you're done.
  • -v <local_dir>:<container_dir>: Allows to choose where to store the Aerium data.

Wallet seed is important

Keep your wallet seed phrase private and secure. If someone else gains access to your seed phrase, they can control your wallet and funds.

Running the Node

Now you can start the node and sync with the network. Run the following command in the Terminal:

docker run -it -d -v ~/aerium:/root/aerium \
  -p 19933:19933 \
  -p 19933:19933/udp \
  -p 50051:50051 \
  -p 8080:8080 \
  --name aerium aeriumdev/aerium aerium-daemon start --password <WALLET_PASSWORD>

This command creates and runs a Docker container named "aerium". Here's an explanation of the Docker flags:

  • -p <host_port>:<container_port>: Maps a port from your host machine to a port in the Docker container.
  • -d: Starts the container in detached mode. The container runs in the background.
  • --name <NAME>: Allows you to assign a custom name to a container.
Default Ports

The default network ports in Aerium are defined as follows. It is recommended not to change these default ports:

  • P2P port is 19933. P2P supports both UDP and TCP protocols.
  • gRPC port is 50051. The gRPC module is enabled by default for localhost.
  • gRPC-gateway port is 8080. The gRPC-gateway is disabled by default.
  • JSON-RPC port is 8545. The JSON-RPC service is disabled by default.
Essential Commands

You can manage the Aerium Docker container with these essential commands:

Stop the container:

docker stop aerium

This command gracefully stops the "aerium" container.

Start the container:

docker start aerium

This command starts the Aerium Docker container.

View Container Logs:

To check the logs:

docker logs aerium --tail 1000 -f

Here's an explanation of the Docker flags:

  • --tail 1000: Displays the last 1000 lines of logs.
  • -f: Shows the log output in real-time.

Remove Docker container:

If you want to upgrade the node, you should first remove the current container:

docker rm aerium

After removing the Aerium Docker container, you can create and run a new version, as explained above.

Enabling IPv6

By default, Docker only supports IPv4. IPv6 is only supported on Linux systems. Enabling IPv6 can help you improve connectivity and security. To enable IPv6 for Docker, follow the official documentation here.

Managing Wallet Using Docker

You can use Aerium Docker to manage the wallet. For example, you can check the balance of your wallet as shown below:

docker run -it --rm -v ~/aerium:/root/aerium aeriumdev/aerium aerium-wallet address all --balance --stake

Example docker compose

Here is example docker compose for run aerium node.

version: '3'

services:
  aerium:
    hostname: aerium
    container_name: aerium
    image: aeriumdev/aerium:latest
    command: aerium-daemon start -w /aerium
    restart: always
    volumes:
      - ./aerium:/aerium
    ports:
      - 19933:19933 # required: p2p port
      - 50051:50051 # optional: access to port grpc on host
      - 8080:8080 # optional: access to port grpc gateway on host
      - 8545:8545 # optional: access to port json rpc on host
      - 8081:80 # optional: access to port http on host

Tag summary

Content type

Image

Digest

sha256:8c776391b

Size

40.4 MB

Last updated

10 months ago

docker pull aeriumdev/aerium