Skip to content
/ vps Public
forked from masternodes/vps

A handy bash script to setup crypto masternodes in no time. Initially developed for $PIVX. Now many more ;-)

License

Notifications You must be signed in to change notification settings

damiensgit/vps

 
 

Repository files navigation

!THIS IS A FORK FOR DIGIWAGE!

Digiwage quick guide:

IMPORTANT NOTE: For multiple masternodes on the SAME VPS instance, you MUST HAVE IPv6 enabled otherwise things won't work. For vultr it's a simple checkbox when creating a VPS instance but for digital ocean a little more work is required (see their IPv6 guide).

    • Login to your VPS instance as root and run:
    • git clone https://github.com/damiensgit/vps.git && cd vps
    • For ONE MN run: ./install.sh -p digiwage, for say, 4 MN, run: ./install.sh -p digiwage -c 4
    • The digiwage source build should happen. It could take 15 minutes so be patient.
    • When the build is done and the script finishes, check the console output and make sure there are no errors.
    • On the VPS again, run nano /etc/masternodes/digiwage_n1.conf and place your genkey after masternodeprivkey= as shown.
    • Now you can activate the digiwage masternode(s) by running: /usr/local/bin/activate_masternodes_digiwage
    • This will install the daemons as ubuntu services so you can stop/restart them easily any time by running: systemctl restart digiwage_n1 (where n1 is the MN number you want to restart)
    • To interact with the digiwage cli, you must always specify the config file so e.g. to check the status of the masternode run: /usr/local/bin/digiwage-cli -conf=/etc/masternodes/digiwage_n1.conf masternode status

Tips:

  • the wallet and data are stored in /var/lib/masternodes/digiwageN/ where n is the masternode number (1,2, 3...). You will find debug.log here.
  • A 1GB Vultr instance (5 USD one) should be able to serve 5-6 masternodes without issue. Use the top command to monitor mem / cpu usage to judge.
  • Want to add another masternode down the line? EZ PZ: ./install.sh -p digiwage -c 6 (assume you had 4 setup before).
  • New coin update? Sure: ./install.sh -p digiwage -c 4 -u (remember to set number after -c to the number of nodes you have running).

Digiwage Donation address for damiensgit:

WAGE  D9BtxRRZ9cW5CmZFBHCZV9GfutBfC4Upmk

Original Readme:

Nodemaster

The Nodemaster scripts is a collection of utilities to manage, setup and update masternode instances.

I am quite confident this is the single best and almost effortless way to setup different crypto masternodes, without bothering too much about the setup part.

If this script helped you in any way, please contribute some feedback. BTC donations also welcome and never forget:

Have fun, this is crypto after all!

Masternode Donation address:

BTC  33ENWZ9RCYBG7nv6ac8KxBUSuQX64Hx3x3

Feel free to use my reflink to signup and receive a bonus w/ vultr:


NOTE on the VPS choice for starters

Vultr is highly recommended for this kind of setup. I created an easy step-by-step guide for the VPS provider vultr that will guide you through the hardest parts.


About / Background

Many masternode crypto currencies only have incomplete or even non-existing instructions available how to setup a masternode from source.

This project started as handy bash script to setup my $PIVX masternodes in 2016 when there was almost zero documentation and anything that existed was either $DASH specific, sucked and in most cases both. For that reason, i started to work on a not-so-sucking way to install a lot of different masternodes with next to none manual intervention.

If you are not already aware, visit the project site and join the slack. The website at https://pivx.org/ is also well worth a visit.

Many people use binaries, end of with an insecure configuration or fail completely. This is obviously bad for the stability of the individual network.

After doing hundreds of masternode installations in the past two years, i decided to share some of my existing auto-install and management scripts with the community to work on a generalised & reliable setup for all masternode coins.

Comparing with building from source manually, you will benefit from using this script in the following way(s):

  • 100% auto-compilation and 99% of configuration on the masternode side of things. It is currently only tested on a vultr VPS but should work almost anywhere where IPv6 addresses are available
  • Developed with recent Ubuntu versions in mind, currently only 16.04 is supported
  • Installs 1-100 (or more!) masternodes in parallel on one machine, with individual config and data
  • Compilation is currently from source for the desired git repo tag (configurable via config files) Some security hardening is done, including firewalling and a separate user
  • Automatic startup for all masternode daemons
  • This script needs to run as root, the masternodes will and should not!
  • It's ipv6 enabled, tor/onion will follow

Installation

SSH to your VPS and clone the Github repository:

git clone https://github.com/damiensgit/vps.git && cd vps

Install & configure your desired master node with options:

./install.sh -p digiwage

Examples for typical script invocation

These are only a couple of examples for typical setups. Check my [easy step-by-step guide for vultr that will guide you through the hardest parts.

Install & configure 4 digiwage masternodes:

./install.sh -p digiwage -c 4

Install 4 digiwage masternodes, update daemon:

./install.sh -p digiwage -c 4 -u

Install 6 digiwage masternodes with the git release tag "tags/v3.0.5.1"

./install.sh -p digiwage -c 6 -r "tags/v3.0.5.1"

Wipe all digiwage masternode data:

./install.sh -p digiwage -w

Install 2 digiwage masternodes and configure sentinel monitoring:

./install.sh -p digiwage -c 2 -s

Options

The install.sh script support the following parameters:

Long Option Short Option Values description
--project -p project, e.g. "pix" shortname for the project
--net -n "4" / "6" ip type for masternode. (ipv)6 is default
--release -r e.g. "tags/v3.0.4" a specific git tag/branch, defaults to latest tested
--count -c number amount of masternodes to be configured
--update -u -- update specified masternode daemon, combine with -p flag
--sentinel -s -- install and configure sentinel for node monitoring
--wipe -w -- uninstall & wipe all related master node data, combine with -p flag
--help -h -- print help info

Troubleshooting the masternode on the VPS

If you want to check the status of your masternode, the best way is currently running the cli e.g. for $digiwage via

/usr/local/bin/digiwage-cli -conf=/etc/masternodes/digiwage_n1.conf getinfo

{
  "version": 1000302,
  "protocolversion": 70701,
  "walletversion": 61000,
  "balance": 0.00000000,
  "privatesend_balance": 0.00000000,
  "blocks": 209481,
  "timeoffset": 0,
  "connections": 5,
  "proxy": "",
  "difficulty": 42882.54964804553,
  "testnet": false,
  "keypoololdest": 1511380627,
  "keypoolsize": 1001,
  "paytxfee": 0.00000000,
  "relayfee": 0.00010000,
  "errors": ""
}

Help, Issues and Questions

I activated the "issues" option on github to give you a way to document defects and feature wishes. Feel free top open issues for problems / features you are missing here: https://github.com/masternodes/vps/issues.

I might not be able to reply immediately, but i do usually within a couple of days at worst. I will also happily take any pull requests that make masternode installations easier for everyone ;-)

If this script helped you in any way, please contribute some feedback. BTC donations also welcome and never forget:

Have fun, this is crypto after all!

Management script (not yet implemented)

The management script release will follow within the next couple of days.

command description
nodemaster start digiwage (all|number) start all or a specific digiwage masternode(s)
nodemaster restart digiwage (all|number) stop all or a specific digiwage masternode(s)
nodemaster stop digiwage (all|number) restart all or a specific digiwage masternode(s)
nodemaster cleanup digiwage (all|number) delete chain data for all digiwage masternodes
nodemaster status digiwage (all|number) systemd process status for a digiwage masternode
nodemaster tail digiwage (all|number) tail debug logs for a digiwage masternode

Supported cryptos

CRYPTO Logo Url
DIGIWAGE DIGIWAGE TBC
PIVX PIVX https://pivx.org/
DASH DASH https://www.dash.org/
DESIRE DESIRE https://github.com/lazyboozer/Desire
PURE PURE https://github.com/puredev321/pure
ENT ENT http://ent.eternity-group.org/
SYNX SYNX http://syndicatelabs.io/
CHC CHAIN https://www.chaincoin.org/
ZEN ZEN https://zensystem.io/
DP DPRICE http://digitalprice.org/
VIVO VIVO https://www.vivocrypto.com/
ITZ ITZ https://interzone.space/
MEME MEME http://www.memetic.ai/
ARC ARC https://arcticcoin.org/
CRAVE CRAVE https://www.craveproject.com/
PIE PIE https://github.com/flintsoft/PIE
XCXT XCXT http://coinonatx.com/
SCORE SCORE http://scorecoin.site/
BITSEND BITSEND https://bitsend.info/
XZC ZCOIN https://zcoin.io/
INSANE INSN https://insanecoin.com/
XIOS XIOS https://bitcointalk.org/index.php?topic=2251159.0/
HAV HAV https://bitcointalk.org/index.php?topic=2336026.0
NTRN NTRN https://www.neutroncoin.com/
RNS RNS https://bitcointalk.org/index.php?topic=1809933.msg18029683#msg18029683/
SOLARIS SOLARIS http://www.solariscoin.com/
BTDX BTDX https://bit-cloud.info/
INNOVA INNOVA http://innovacoin.info/
FORCE FORCE https://bitcointalk.org/index.php?topic=2359378
BITRADIO BITRADIO https://bitrad.io/
MONA MONA https://monacocoin.net/
ALQO ALQO https://alqo.org
YUP YUP http://yupcrypto.com/
MTNC MTNC http://www.masternodecoin.org/
CROWN CROWN https://crown.tech/
BLOCKNET BLOCK https://blocknet.co/
DTMI DTMI https://bitcointalk.org/index.php?topic=2325196.0
MAGNA MAGNA https://www.magnacoin.org/
CROWD CROWD http://crowdcoin.site/
NUMUS NUMUS http://numus.cash/
NODE NODE https://bitnodes.co/
SUB1X SUB1X https://bitcointalk.org/index.php?topic=2282282.0
SEND SEND https://socialsend.io/
CREAM CREAM http://cream.technology/

Todo

  • provide my Dockerfile & Vagrantfile
  • write more test cases
  • implement a binary option (?)
  • output all supported cryptos as list within help

Errors

  • currently not fully idempotent

Ping me at contact@marsmenschen.com for questions and send some crypto my way if you are happy.

Have fun, this is crypto after all!

About

A handy bash script to setup crypto masternodes in no time. Initially developed for $PIVX. Now many more ;-)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 100.0%