This script is the fastest method to deploy nkn-commercial node at VPS. Adding this script when installing VPS will install nkn-commercial automatically at the first boot. Please read the script and understand the command before use.
Thanks to no112358/ALLinONE-nknnode. This script is modified from no112358/ALLinONE-nknnode's script. Please visit https://forum.nkn.org/t/allinone-nknnode-script-deploy-nodes-faster-with-your-own-chaindb/2753 for more details of create your own ChainDB host server.
- Install nkn-commercial automatically at first boot.
- No need to login root to install. User will be added in
/sbin/nologin
, no other setup needed. - Most suitable to VPS provider without support of One-Click Deploy. Tested on Vultr, UpCloud and Linode server.
- No Fee, No Donation. Use as you like. Feel free to change the script to suit your purpose.
- Fresh VPS - At least 1 core CPU / 1 gb memory/ 25 gb storage
- Ubuntu 20.04/ Debian 10 (Debian has smaller size of OS, save space up to ~1 GB)
- Root SSH key (essential)
- NKN beneficiary wallet address
- ChainDB if available. (please refer to https://github.com/no112358/ALLinONE-nknnode)
Please make sure you have SSH key of your VPS before deploy.
- SSH key login only. Password login prohibited.
- SSH Port change.
- Firewall
- Fail2ban
- Weekly unattended-upgrades for security packages.
- Open startupscript.txt by text editor.
- Insert your NKN beneficiary wallet address
benaddress="<Your Beneficiary Wallet Addr>"
- Change
sshport="22"
. (DDOS attack may consume your monthly bandwidth usage) - Insert your ChainDB host url if applicable.
websource=""
- Copy & paste the script to your VPS setup page at script option.
- Choose your VPS setup. Remember pick the startup script option at setup.
- Deploy
- After 15 to 30 minutes, installation of nkn-commercial will be finished.
- Then, download of ChainDB from your host server will be started, if applicable.
- Check status of your node.
- Method: Key in node's ip address at http://nstatus.org/ and check. Message of request ID generation fee will prompt after all installation are completely done.
- After payment, wait for ID generation and activation.
- If ChainDB sync from height 0, it will take few days to become state "PERSIST_FINISHED".
- Login to your root by SSH Key.
- wallet.json & wallet.pswd is located at
/home/nkn/nkn-commercial/services/nkn-node
folder. Suggest you make backup of both files outside the VPS. You may need it when you want to change server. Navigate to it with command:cd "$(find / -type d -name "nkn-node")"
- Check node status at terminal.
systemctl status nkn-commercial
- Stop nkn-commercial when doing maintance like backup wallet or replace ChainDB.
systemctl stop nkn-commercial
- Restart nkn-ccomercial after maintanance.
systemctl start nkn-commercial
orsystemctl restart nkn-commercial
- Check node status at http://nstatus.org/
- Please tell me if you success to deploy node at VPS provider besides Vultr, UpCloud or Linode. I will update README.
- I only have beginner level knowledge at Linux. Please tell me if you found bugs in the script. Thank you.
- Contact: https://durianpool.github.io/#contact