Public
Authored by Mark Brooker

PoS node setup

The following script is an adaptation of the usual Crown install script. It is designed to install or update a node on a server with no other Crown node running. By default it pulls the linux-64 build from our Nextcloud cache (because pipeline builds expire after 7 days), makes sure your VPS is updated, installs the downloaded Crown, defines swap space if necessary, configures the firewall, adds a cron job to start the node on VPS restart, configures logrotate to manage the debug.log and finally starts the node.

It can be run as root or as any user of your choice so long as that user is in the sudo group. If you want to pull a particular pipeline build you can specify the job number with the -v parameter.

Installing a new node

  1. Generate a node private key in your wallet by
crown-cli node genkey
  1. On the VPS download this shell script pos-server-install.sh

You can use wget or curl (depending on what is installed on your VPS), eg:

wget https://gitlab.crown.tech/walkjivefly/crown-core/uploads/d5919fc9e51921143337025052b1e12b/pos-server-install.sh

or

curl -o pos-server-install.sh https://gitlab.crown.tech/walkjivefly/crown-core/uploads/d5919fc9e51921143337025052b1e12b/pos-server-install.sh

If neither is already installed on your server you can install them by

apt-get install wget curl

and then try the download again. Or you can create the script using your preferred editor and copy'n'pasting the script body shown below.

  1. Make the script executable by
chmod +x pos-server-install.sh
  1. Run it. For a system node by
./pos-server-install.sh -s -p <private key>

and for a masternode by

./pos-server-install.sh -m -p <private key>
  1. Examine the script output and confirm that the last 2 lines look like
Crown server starting
2019-01-30 03:02:37 Crown version v0.12.7.1-959b576 (2019-01-29 00:32:39 -0700)
  1. While you're waiting for the node to sync you can create a lock-in transaction for the appropriate node type in your wallet (automatic SN/MN generation is not working reliably), update your masternode.conf or systemnode.conf, restart your wallet, let it sync.

  2. When both the node and your wallet are synced you can start the nodefrom your wallet.

Updating an existing node

  1. Download the shell script pos-server-install.sh

  2. Make it executable

chmod +x pos-server-install.sh
  1. Run it by
./pos-server-install.sh
  1. Check the output ends with 2 lines like
Crown server starting
2019-01-30 03:02:37 Crown version v0.12.7.1-959b576 (2019-01-29 00:32:39 -0700)

If your node was already enabled there should be no need to restart it from the wallet.

Edited
7.65 KB
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment