Skip to main content

Downloading, building, and running the node using Docker

Table of Contents


We recommend you to use the simple way of building the node using the Docker image. Follow the steps below.

Step 1: Download the node

To download the node using Docker:

  1. Ensure you have Docker installed on your machine.

  2. If not, refer to Docker Installation Guide.


    If you don't use root account, run the following command to ensure you belong the user group docker:

    $ groups

    If you don't belong to the user group docker, run the following command:

    $ sudo usermod -aG docker

Step 2: Create directories and place the files


You can create an additional directory named thepower, for example, and place db and log as subdirectories there.

To create directories for files:

  1. Go to your working directory using the following command:

    cd /opt/thepower
  2. Create db and log directories in your working directory (/opt/thepower, for instance) using the following command:

    mkdir {db,log}
  3. Place genesis.txt and node.config near these directories using the following commands:

    cp ~/tea_ceremony_directory/node.config /opt/thepower/node.config
    cp ~/tea_ceremony_directory/genesis.txt /opt/thepower/genesis.txt

Before the Tea Ceremony, the client listens to the ports that will be used on this particular chain and the server checks, if those ports are available. The Ceremony itself starts right after this check. If there will be only a ceremony token specified, without the personal one, you will not be able to participate in Tea Ceremony.

If you're connecting to the Ceremony that has already ended, the Tea Ceremony client will save the node.config file. If the node.config consisted only of a private key, the Tea Ceremony client will add an actual configuration right into this file. If there is something else specified in node.config, the configuration will be saved in node_example.config. After that you need to add your node private key to this file.


The private key you get with the node.config file cannot be restored, if you lose it. Please, store it securely: place a backup onto your local machine.

Step 3: Start the node

To start the node from Docker, run:

docker run -d \
--name tpnode \
--restart unless-stopped \
--mount type=bind,source=/opt/thepower/db,target=/opt/thepower/db \
--mount type=bind,source=/opt/thepower/log,target=/opt/thepower/log \
--mount type=bind,source=/opt/thepower/node.config,target=/opt/thepower/node.config \
--mount type=bind,source=/opt/thepower/genesis.txt,target=/opt/thepower/genesis.txt \
-p 1800:1800 \
-p 1080:1080 \
-p 1443:1443 \

The commands

-p 1800:1800 \
-p 1080:1080 \
-p 1443:1443 \

specify all necessary local ports. In this example ports api, apis, and tpic are used. Specify the port of your chain from node.config file.


docker run -dThis command starts Docker in the background
--name tpnodeThis command specifies the name (optional)
--restart unless-stopped\Similar to always, except that when the container is stopped (manually or otherwise), it is not restarted even after Docker daemon restarts
--mount type=bind,source="$(pwd)"/db,target=/opt/thepower/dbPath to the database. Bound to Docker. /opt here is mandatory, because it is the path inside the container.
--mount type=bind,source="$(pwd)"/log,target=/opt/thepower/logPath to log files. Bound to Docker. /opt here is mandatory, because it is the path inside the container.
--mount type=bind,source="$(pwd)"/node.config,target=/opt/thepower/node.configPath to your node.config file. Bound to Docker. /opt here is mandatory, because it is the path inside the container.
--mount type=bind,source="$(pwd)"/genesis.txt,target=/opt/thepower/genesis.txtPath to your genesis.txt. Bound to Docker. /opt here is mandatory, because it is the path inside the container.
-p 1800:1800
-p 1080:1080
-p 1443:1443
These commands specify all necessary local ports. In these examples ports api, apis, and tpic are used. You can specify any port in node.config file.
thepowerio/tpnodePath to Docker image.

Step 4: Get the certificate

Obtain the SSL certificate for your node and place it into the db directory.

Step 5 (optional): Automated updates for node with Watchtower

If configured, every 24 hours the Watchtower will check if a new version of The Power Node is available and update it if so.


If you haven't configured automatic updates, DO NOT follow this step.

Use this guide instead.

Start a Watchtower container to automatically update node when a new version is available:

docker run -d \
--name watchtower \
--restart unless-stopped \
-v /var/run/docker.sock:/var/run/docker.sock \

How to stop the node?

To stop the node, run:

  1. docker stop tpnode
  2. docker rm tpnode
  3. docker rmi thepowerio/tpnode

How to check, if my node works?

To check, if your node works, run:

curl | jq


  • — your node address;
  • 1080 — port, that your node uses for api.

Replace the example parameters with the ones you need.

What do I need to do if something goes wrong?


If something goes wrong, go to the log folder, and read the logs. If there are errors, write to Power Ecosystem Telegram chat:


  1. You get the following error:

    ===> Failed to boot tpnode for reason {{{badmatch,undefined},


    You don't have genesis.txt and node.config files.


    Start the Tea Ceremony client BEFORE starting the node. It will get proper genesis.txt and node.config.

  2. You get the following error when starting the Tea Ceremony client:

     ~/tpnode# ./teaclient DEE570BD76F3
    -bash: ./teaclient: Permission denied


    Probably, you haven't changed teaclient file mode to executable.


    Change teaclient file mode to executable by running the following command:

    chmod +x tea*
  3. You get the following error when starting the Tea Ceremony client:

    ~# ./teaclient -n demonode05 DEE570BD76F3
    ceremony client connecting to
    Server rejects connection, reason: bad_token


    Token DEE570BD76F3 has been used by another user.


    Get the new token from the Telegram bot.

  4. You get the following error when starting the Tea Ceremony client:

    ceremony client connecting to
    =WARNING REPORT==== 19-Oct-2022::14:32:54.056133 ===
    Description: "Authenticity is not established by certificate path validation"
    Reason: "Option {verify, verify_peer} and cacertfile/cacerts is missing"

    Server rejects connection, reason: you_are_late


    You are late for the tea ceremony.


    Stick to the bot recommendations and don't be late.

  5. You see different ports displayed in server control panel and written in firewall rules.


    Problems with ports.


    Check your iptables rules:

    iptables -L -nv

    Find the rules for all three ports among the entries:

    1. If the rules are absent, please contact or tech support in our Telegram chat.
    2. If you've found a corrupted port, try to recreate rule using the server control panel.

    The Power Ecosystem is not responsible for the result of actions described below! These actions can lead to loss of access to the server.

    Another way of addressing the problem is to:

    1. Save the rules into a file using the following command:

      iptables-save -f
    2. Edit the corrupted port:

    3. Restore the rules from the file:

  6. You see the following error:



    Wrong Erlang version is installed.


    Install the recommended Ubuntu version, or try to install right Erlang version using the third party repositories or the source code.