Note: Docker is not the best way to run ADAMANT node. We recommend to use Ubuntu server.

ADAMANT use dPoS for making concencus in the Blockchain. To learn more about dPoS, and why run your own node, see DPoS Explained — Simply.

This manual will assist in how to install, run and update an ADAMANT node on your PC (Windows, Mac OS, Linux) using Docker. If you want to run an ADAMANT node on Ubuntu, please see the instructions.

In this example we will use Windows 10 OS.

Note: Basic IT knowledge needed.

Pre-reqs

Current version of Docker for Windows runs on 64bit Windows 10 Pro, Enterprise and Education (1607 Anniversary Update, Build 14393 or later).

PC should have:

2 GB RAM (Recommended 4 GB RAM).

10 GB free disk-space (less or more, depends on current block Height).

Installing Docker

If you haven’t already downloaded the installer (you will need the free Docker Community Edition), you can get it from https://store.docker.com/search?type=edition&offering=community. For Windows you’ll get file Docker for Windows Installer.exe. It typically downloads to your Downloads folder, or you can run it from the recent downloads bar at the bottom of your web browser.

Double-click Docker for Windows Installer.exe to run the installer.

Follow the install wizard to accept the license, authorize the installer, and proceed with the install.

You are asked to authorize Docker.app with your system password during the install process. Privileged access is needed to install networking components, links to the Docker apps, and manage the Hyper-V Virtual Machines (VMs).

Click Finish on the setup complete dialog.

Docker does not start automatically after installation. To start it, search for Docker, select Docker for Windows in the search results, and click it (or hit Enter).

When the whale in the status bar stays steady, Docker is up-and-running, and accessible from any terminal window.

Also, you need to share your local drive with docker. Right-click on the status bar icon, and select Settings. Then, select the shared drives tab and check shared checkbox. Next, press the Apply button and close the Settings window.

Installing ADAMANT node

1) Install Git client:

Go to: http://msysgit.github.com/, download and run the installer. You can use default options while installing.

2) Download ADAMANT repository

Open Microsoft Power Shell, usually it can be found in the Start menu (something like \Start Menu\Programs\Windows PowerShell\Windows PowerShell).

Type commands:

git clone https://github.com/Adamant-im/adamant-docker cd adamant-docker

Running ADAMANT node

1) Download all necessary docker images

In directory with cloned repo run the following command:

docker-compose pull

2) Next run database service

Run command

docker-compose up -d db

and then run

docker-compose logs

to verify that container successful started.

3) Next up adamant-node service

Run command

docker-compose up -d adamant-node

and as below check that start was successful.

Stopping ADAMANT node

You can stop containers by command

docker-compose stop

It will stop all running services, you can start them again by entering

docker-compose start

Validating node is installed correctly

You can check that your installation is complete by opening node-app log.

docker-compose logs --tail=10 adamant-node

It must be something like this.

Argument --tail=10 just tell docker-compose that we need only 10 last log lines (total log file can be so much, so use this argument with line numbers count that you need to analyze).

Validating node is connected to ADAMANT blockchain

Go to https://explorer.adamant.im/networkMonitor from any computer.

Find your node in the Nodes list by your node IP address. Please note, it may take up to several minutes for your node to appear in the list.

If you just installed your node, Height will be 1 — it’s likely in sync process. It can take up to 1 day or more, depending on your connection and CPU.

To check the Height of your node, use command to get Container ID:

docker ps

And then get Height:

docker exec ba7158e3d0b9 curl -k -X GET http://localhost:36666/api/blocks/getHeight

After sync completes, Height will be the same as for other nodes.

Updating ADAMANT node

1) Open Microsoft Power Shell

And run following commands:

cd adamant-docker docker-compose stop docker-compose pull docker-compose down docker-compose up -d db docker-compose up -d adamant-node

What’s next?

You can become a Blockchain delegate, forge blocks, and receive rewards for this. Go ahead — How to Become an ADAMANT Delegate.