Giter VIP home page Giter VIP logo

nkn-guide's Introduction

NKN node guide

Hardware requirements

Guide

Updating node

Useful links

Special thanks to following resources:

Hardware requirements

Coins to launch miner: 10.1 NKN coins

Operating system: Ubuntu is recommended (works perfectly with Debian)

Memory: 1GB

CPU: 1 CPU

Disk space: ~20 GB

Internet connection speed: 10Mbps up and down is a minimum

IP address: 1 IP version 4 (IPv4)

Ports: TCP/UDP ports 30001-30021

Guide

  1. Update & install newest versions of the packages for OS. And install packages make; curl; git :
apt-get update
apt-get upgrade -y
apt-get install make curl git -y
  1. Add NKN user:
adduser nkn
  1. Give nkn user super user rights adding it to the sudo-group. And switch to nkn user. Open home directory of nkn user:
usermod -aG sudo nkn
su nkn
cd ~
  1. Install latest Go version (installing go1.17.3):
sudo wget https://golang.org/dl/go1.17.3.linux-amd64.tar.gz && sudo tar -C /usr/local -xvf go1.17.3.linux-amd64.tar.gz
  1. Update env variables to include go:
cat >> ~/.bashrc << 'EOF'
export GOPATH=$HOME/go
export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin
EOF

source .bashrc
  1. Check go version
go version
  1. Create nknorg folder and change directory to that folder:
mkdir -p ~/go/src/github.com/nknorg && cd ~/go/src/github.com/nknorg
  1. Copy NKN repository to current folder (nknorg)
git clone https://github.com/nknorg/nkn.git
  1. Open nkn folder
cd nkn
  1. Build the source code with make command
make
  1. Copy existing config.mainnet.json file to config.json
cp config.mainnet.json config.json
  1. Create separate wallet for rewards using https://wallet.nkn.org/. NOTE: Save secret seed and related account details (public key, password). You will need to use secret seed & password to recover your wallet.

  2. Create local wallet using command below. NOTE: Save file wallet.json and related account details (public key, password). You will need to use wallet.json & password to open your wallet using website https://wallet.nkn.org/ and to run NKN node.

./nknc wallet -c
  1. Send 10.1 mainnet NKN coins to a local wallet (created in above paragraph with command ./nknc wallet -c)

  2. Go to home folder and create service file to run NKN node in the background.

NOTE: Change <YOUR_WALLET_PASSWORD> in the service file below to the password from your local wallet

cd ~

sudo tee /etc/systemd/system/nkn.service > /dev/null <<EOF
[Unit]
Description=nkn

[Service]
User=nkn
WorkingDirectory=/home/nkn/go/src/github.com/nknorg/nkn
ExecStart=/home/nkn/go/src/github.com/nknorg/nkn/nknd -p <YOUR_WALLET_PASSWORD>
Restart=always
RestartSec=3
LimitNOFILE=500000

[Install]
WantedBy=default.target
EOF
  1. Load service and start
sudo systemctl daemon-reload
sudo systemctl enable nkn
sudo systemctl start nkn
  1. Check status of service
sudo systemctl status nkn
  1. Check logs:
journalctl -f -u nkn

Updating node

  1. Stop nkn service:
sudo systemctl stop nkn
  1. Go to nkn directory:
cd /home/nkn/go/src/github.com/nknorg/nkn
  1. Update current folder with up to date github repository:
git pull
  1. Clean old files & build the source code with 'make' command:
make deepclean
make
  1. Start nkn service:
sudo systemctl start nkn
  1. Check logs that everything works fine:
journalctl -f -u nkn

Useful links

NKN website: https://nkn.org/

NKN telegram: https://t.me/nknorg

NKN discord: https://discord.com/invite/hrZvrVa

Create wallet using web: https://wallet.nkn.org/

Check node status: http://nstatus.org/

NKN explorer: https://nscan.io/

nkn-guide's People

Contributors

rost1989 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.