Skip to content

Setting up node on Linux

Imtiyaz Shaikh edited this page Mar 4, 2020 · 5 revisions

Setting up node on Linux (Ubuntu 18)

Below are the instructions to set up the node for betanet and mainnet.

Pre-requisites

  1. VM with Linux OS - Ubuntu 18 Server (Minimum 1 GB RAM, 20-30 GB Storage) & Public IP
  2. Node binary for Linux (Build one from the source code - Build Instruction: https://docs.nano.org/integration-guides/build-options/)

Instructions

1. SSH login to the server.

  • sudo apt-get update

2. Uploading the binary using FTP or SFTP

  • Create a directory for Node:
  • mkdir Node
  • cd Node
  • Upload 2 binaries (btcb_node & btcb_rpc) to Node directory using FTP access (You may use FileZilla for Windows or CyberDuck for MacOS)

3. Creating App Directory

  • cd ..
  • mkdir BtcbData

4. Configuring the Node:

  • Inside BtcbData directory, create 2 files.
  • nano config-node.toml
  • nano config-rpc.toml

Copy the configuration and paste it to respective files:

5. Creating Node Service:

  • sudo nano /etc/systemd/system/btcb.service

[Unit]
Description=BTCB Node
Before=multi-user.target
StartLimitIntervalSec=0

[Service]
Type=simple
Restart=always
RestartSec=1
User=root
ExecStart=/root/Node/btcb_node run --daemon
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
RestartPreventExitStatus=255
StandardOutput=syslog
StandardError=syslog

[Install]
WantedBy=multi-user.target

6. Running the Node

  • sudo systemctl daemon-reload
  • sudo systemctl enable btcb.service
  • sudo systemctl start btcb.service
  • sudo systemctl status btcb.service

7. Testing
Your node is running on

  • Betanet: :35000
  • Mainnet: :9075

You may try RPC calls using Postman.

Clone this wiki locally