Special thanks to following resources:
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
- 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
- Add NKN user:
adduser nkn
- 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 ~
- 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
- 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
- Check
go
version
go version
- Create
nknorg
folder and change directory to that folder:
mkdir -p ~/go/src/github.com/nknorg && cd ~/go/src/github.com/nknorg
- Copy NKN repository to current folder (
nknorg
)
git clone https://github.com/nknorg/nkn.git
- Open
nkn
folder
cd nkn
- Build the source code with
make
command
make
- Copy existing
config.mainnet.json
file toconfig.json
cp config.mainnet.json config.json
-
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 usesecret seed & password
to recover your wallet. -
Create local wallet using command below. NOTE: Save file
wallet.json
and related account details (public key, password
). You will need to usewallet.json & password
to open your wallet using website https://wallet.nkn.org/ and to run NKN node.
./nknc wallet -c
-
Send 10.1 mainnet NKN coins to a local wallet (created in above paragraph with command
./nknc wallet -c
) -
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
- Load service and start
sudo systemctl daemon-reload
sudo systemctl enable nkn
sudo systemctl start nkn
- Check status of service
sudo systemctl status nkn
- Check logs:
journalctl -f -u nkn
- Stop nkn service:
sudo systemctl stop nkn
- Go to nkn directory:
cd /home/nkn/go/src/github.com/nknorg/nkn
- Update current folder with up to date github repository:
git pull
- Clean old files & build the source code with 'make' command:
make deepclean
make
- Start nkn service:
sudo systemctl start nkn
- Check logs that everything works fine:
journalctl -f -u nkn
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/