Code Monkey home page Code Monkey logo

nkn-commercial's Introduction

NKN-Commercial startup script for VPS

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.

Feature

  • 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.

Requirement

  • 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)

Security Features

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.

Installation

  1. Open startupscript.txt by text editor.
  2. Insert your NKN beneficiary wallet address benaddress="<Your Beneficiary Wallet Addr>"
  3. Change sshport="22". (DDOS attack may consume your monthly bandwidth usage)
  4. Insert your ChainDB host url if applicable. websource=""
  5. Copy & paste the script to your VPS setup page at script option.
  6. Choose your VPS setup. Remember pick the startup script option at setup.
  7. Deploy

Check Status and Pay ID Generation Fee

  • 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".

Debugging/Maintenance

  1. Login to your root by SSH Key.
  2. 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")"
  3. Check node status at terminal. systemctl status nkn-commercial
  4. Stop nkn-commercial when doing maintance like backup wallet or replace ChainDB. systemctl stop nkn-commercial
  5. Restart nkn-ccomercial after maintanance. systemctl start nkn-commercial or systemctl restart nkn-commercial
  6. Check node status at http://nstatus.org/

Remarks

  • 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

nkn-commercial's People

Contributors

durianpool avatar

Watchers

 avatar

Forkers

ppoiissbsjksms

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.