Build from docker

Build from source code

Pre-requiretments :

  1. Erlang 24 or more
  2. Node.config and genesis.txt

automatic build node

wget -O thepower.sh https://raw.githubusercontent.com/Revonode/installer-scripts/main/thepower/install.sh && chmod +x thepower.sh && ./thepower.sh

create directory and edit node.config

cd /opt/thepower
mkdir {db.log}

copy genesis and node.config to thepower

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

edit node.config

nano /opt/thepower/node.config

save your private_key

edit with example :

{tpic, #{
    peers => [
        {"<host members>", <port>},
        {"<host members>", <port>},
        {"<host members>", <port>},
        {"<host members>", <port>},
        {"<host members>", <port>},
        {"<host members>", <port>},
        {"<host members>", <port>},
        {"<host members>", <port>},
        {"<host members>", <port>},
        {"<host members>", <port>}
        ],
    allow_rfc1918 => true,
    port => <port chain use>} }.
{discovery,
    #{
        addresses => [
            #{address => "<HOST_NAME>", port => <port>, proto => tpic},
            #{address => "<HOST_NAME>", port => 1080, proto => api},
            #{address => "<HOST_NAME>", port => 1443, proto => apis}
        ]
    }
}.

{hostname, "<HOST_NAME>"}.
{dbsuffix,""}.
{loglevel, info}.
{info_log, "log/info.log"}.
{error_log, "log/error.log"}.
{debug_log, "log/debug.log"}.
{rpcsport, 1443}.
{rpcport, 1080}.

{privkey, "<PRIVATE_KEY>"}.

Get ssl

  • get acme.sh
cd
apt-get install socat
curl https://get.acme.sh | sh -s email=my@example.com
  • close terminal

  • login again

source ~/.bashrc
  • Obtain the certificate
acme.sh --server letsencrypt --issue --standalone -d <name host> \
--renew-hook "cd /opt/thepower; ./stop.sh; ./start.sh"
  • Install the certificate
acme.sh --install-cert -d <host name> \
--fullchain-file /opt/thepower/db/cert/<host name>.crt \
--key-file /opt/thepower/db/cert/<host name>.key
  • get certificate
acme.sh --info -d <your node.example.com>

run node

systemctl restart powerd
journalctl -fu powerd -o cat

check node

curl http://localhost:1080/api/node/status | jq

check ssl

  • open your browser
https://<host name>:1443/api/node/status

example : https://c1027n10.thepower.io:1443/api/node/status

Explore : https://zabbix.thepower.io/zabbix.php?action=dashboard.view

find your host ..

complete rover bot