Tutorial - Install Masternode on Ubuntu Server

Follow this guide to install a Masternode for Cunni on Ubuntu Server.

Step-by-Step Guide

  1. Open PuTTY and connect using SSH with your Ubuntu server.
  2. Create your platform Node ID:

    Run the following commands:

    openssl genpkey -algorithm ed25519 -out privkey.pem openssl pkey -in privkey.pem -noout -text_pub | tail -n +3 | tr -d '[:space:]' | xxd -r -p | sha256sum | head -c 40

    Example output:

    cd95e2034935898e9b73ad7087b47cbac849bd84

    Make a note of the generated key; this is your required P2P key for the Masternode.

  3. Close the SSH connection: exit
  4. Open your Windows wallet.
  5. Create an address for the masternode fee:

    Go to Tools -> Debug console and type:

    getnewaddress

    Example output:

    CRPLV4dXmEFMSgXg2Xu6skN9pmw8TAo4N5
  6. Send the masternode fee:

    Go back to your wallet overview.

    Press the "Send" button.

    Enter the address from the RPC command “getnewaddress” in "Pay To:". (Example: CRPLV4dXmEFMSgXg2Xu6skN9pmw8TAo4N5)

    Enter the amount of coins: 5

    Press "Send" and wait for the transaction to be confirmed by 4 blocks.

  7. Create an address for the masternode collateral:

    In the console, type:

    getnewaddress

    Example output:

    CFi68ygQkc8h27DyeBwPykVHjF6oh8PGkH
  8. Send the masternode collateral:

    Go back to your wallet overview.

    Press the "Send" button.

    Enter the address from the RPC command “getnewaddress” in "Pay To:". (Example: CFi68ygQkc8h27DyeBwPykVHjF6oh8PGkH)

    Enter the amount of coins: 2760

    Press "Send" and wait for the transaction to be confirmed by 10 blocks.

  9. Identify the transaction:

    In the console, type:

    masternode outputs

    Example output:

    {
     "fdab9dff1ff9caf5d291905ad43b9f7d69775189d4d22cb085d7fedd94ea1c6a": "0"
    }
  10. Generate a BLS key pair:

    Type:

    bls generate

    Example output:

    {
     "secret": "0acbf6f183d0c9b794b9bc0dba25f8a1a1eca21aa4f2e4a86ecd3120a59efb35",
     "public": "064bb1741f4707cfe3629176857c41e0d23cbe751061fe5d0d67b506db10c8f3f6f2b684c3cec8e4a128193a001d12e9"
    }
  11. Create additional addresses:

    Repeat getnewaddress to create addresses for:

    • Masternode owner
    • Proposal voting
    • Masternode reward

    Example outputs:

    • Owner Address: CWXGVYPHGA4gWcZ9Zp2qnubFVNagvorwEN
    • Voting Address: CSsrnbtJGYD1WmVsrsvauuwxibJyqkkqqL
    • Reward Address: CEXj9AgdCh1giGmr1BXpYsngmkMkthNngD
  12. Prepare the ProRegTx transaction:

    Modify the following line with your specific details:

    protx register_prepare_evo fdab9dff1ff9caf5d291905ad43b9f7d69775189d4d22cb085d7fedd94ea1c6a 0 203.0.113.53:19842 TWXGVYPHGA4gWcZ9Zp2qnubFVNagvorwEN 064bb1741f4707cfe3629176857c41e0d23cbe751061fe5d0d67b506db10c8f3f6f2b684c3cec8e4a128193a001d12e9 TSsrnbtJGYD1WmVsrsvauuwxibJyqkkqqL 0 TEXj9AgdCh1giGmr1BXpYsngmkMkthNngD cd95e2034935898e9b73ad7087b47cbac849bd84 26656 443 TRPLV4dXmEFMSgXg2Xu6skN9pmw8TAo4N5

    Parameters:

    • fdab9dff1ff9caf5d291905ad43b9f7d69775189d4d22cb085d7fedd94ea1c6a - Transaction ID from masternode outputs.
    • 0 - Output index.
    • 203.0.113.53:19842 - External IPv4 address of your VPS.
    • TWXGVYPHGA4gWcZ9Zp2qnubFVNagvorwEN - Owner address.
    • 064bb1741f4707cfe3629176857c41e0d23cbe751061fe5d0d67b506db10c8f3f6f2b684c3cec8e4a128193a001d12e9 - Public key from bls generate.
    • TSsrnbtJGYD1WmVsrsvauuwxibJyqkkqqL - Proposal voting address.
    • TEXj9AgdCh1giGmr1BXpYsngmkMkthNngD - Reward address.
    • cd95e2034935898e9b73ad7087b47cbac849bd84 - P2P key generated with OpenSSL.
    • TRPLV4dXmEFMSgXg2Xu6skN9pmw8TAo4N5 - Address for masternode fee.
  13. Sign the ProRegTx transaction:

    Modify and execute the following command:

    signmessage "TRPLV4dXmEFMSgXg2Xu6skN9pmw8TAo4N5" "CEXj9AgdCh1giGmr1BXpYsngmkMkthNngD|0|CWXGVYPHGA4gWcZ9Zp2qnubFVNagvorwEN|CSsrnbtJGYD1WmVsrsvauuwxibJyqkkqqL|ac19e80b02d4e8a27feb42073114070a281a2b788ba064803e8064d259b22ebc"

    Example Output:

    H/d9tkCSzqdYh8qLL1c+KDIlrb4vtFSfdxd88XDc3U/hRZ6lMuAR8TULy7vh1YXGk6AYFFV1xyPNuEdZVMN9SdI=
  14. Submit the ProRegTx transaction:

    Modify and execute the following command:

    protx register_submit 0300010001a55ee8... 7da2e1187202a1a497beca05e0e53a6e4df0dc06046f72fbf8b61c942db2982a

    Parameters:

    • 0300010001a55ee8... - Prepared transaction ID from protx register_prepare.
    • 7da2e1187202a1a497beca05e0e53a6e4df0dc06046f72fbf8b61c942db2982a - Signature from signmessage.
  15. VPS Setup:
    1. Connect via SSH and update packages:
      sudo apt-get update && sudo apt-get upgrade -y
      cd $HOME
    2. Download and set up the daemon:
      wget "https://github.com/cunniblockchain/cunnicore/releases/download/v20/cunni-daemon-linux.tar.gz" -O cunni-daemon-linux.tar.gz
      tar -xzvf cunni-daemon-linux.tar.gz
    3. Download and set up the tools:
      wget "https://github.com/cunniblockchain/cunnicore/releases/download/v20/cunni-qt-linux.tar.gz" -O cunni-qt-linux.tar.gz
      tar -xzvf cunni-qt-linux.tar.gz
    4. Install the daemon and tools:
      sudo mv cunnid cunni-cli cunni-tx /usr/bin/
    5. Create the data directory and configuration file:
      mkdir $HOME/.cunni
      nano $HOME/.cunni/cunni.conf

      Paste the following into cunni.conf:

      rpcuser=rpc_cunni
      rpcpassword=dR2oBQ3K1zYMZQtJFZeAerhWxaJ5Lqeq9J2
      rpcbind=127.0.0.1
      rpcallowip=127.0.0.1
      listen=1
      server=1
      daemon=1
      maxconnections=125
      masternode=1
      masternodeblsprivkey=0acbf6f183d0c9b794b9bc0dba25f8a1a1eca21aa4f2e4a86ecd3120a59efb35
      externalip=203.0.113.53
                                  

      Parameters:

      • externalip=203.0.113.53 - External IPv4 address of your VPS.
      • masternodeblsprivkey=0acbf6f183d0c9b794b9bc0dba25f8a1a1eca21aa4f2e4a86ecd3120a59efb35 - “secret” value from bls generate.

      Save the file with Ctrl + X.

    6. Start your Masternode:
      cunnid

Step-by-Step Guide for EvoNode

  1. Open PuTTY and connect using SSH with your Ubuntu server.
  2. Create your platform Node ID for EvoNode:

    Run the following commands:

    openssl genpkey -algorithm ed25519 -out privkey.pem openssl pkey -in privkey.pem -noout -text_pub | tail -n +3 | tr -d '[:space:]' | xxd -r -p | sha256sum | head -c 40

    Example output:

    cd95e2034935898e9b73ad7087b47cbac849bd84

    Make a note of the generated key; this is your required P2P key for the EvoNode.

  3. Close the SSH connection: exit
  4. Open your Windows wallet.
  5. Create an address for the EvoNode fee:

    Go to Tools -> Debug console and type:

    getnewaddress

    Example output:

    TRPLV4dXmEFMSgXg2Xu6skN9pmw8TAo4N5
  6. Send the EvoNode fee:

    Go back to your wallet overview.

    Press the "Send" button.

    Enter the address from the RPC command “getnewaddress” in "Pay To:". (Example: CRPLV4dXmEFMSgXg2Xu6skN9pmw8TAo4N5)

    Enter the amount of coins: 5

    Press "Send" and wait for the transaction to be confirmed by 4 blocks.

  7. Create an address for the EvoNode collateral:

    In the console, type:

    getnewaddress

    Example output:

    TFi68ygQkc8h27DyeBwPykVHjF6oh8PGkH
  8. Send the EvoNode collateral:

    Go back to your wallet overview.

    Press the "Send" button.

    Enter the address from the RPC command “getnewaddress” in "Pay To:". (Example: CFi68ygQkc8h27DyeBwPykVHjF6oh8PGkH)

    Enter the amount of coins: 2760

    Press "Send" and wait for the transaction to be confirmed by 10 blocks.

  9. Identify the EvoNode transaction:

    In the console, type:

    masternode outputs

    Example output:

    {
     "fdab9dff1ff9caf5d291905ad43b9f7d69775189d4d22cb085d7fedd94ea1c6a": "0"
    }
  10. Generate a BLS key pair for EvoNode:

    Type:

    bls generate

    Example output:

    {
     "secret": "0acbf6f183d0c9b794b9bc0dba25f8a1a1eca21aa4f2e4a86ecd3120a59efb35",
     "public": "064bb1741f4707cfe3629176857c41e0d23cbe751061fe5d0d67b506db10c8f3f6f2b684c3cec8e4a128193a001d12e9"
    }
  11. Create additional addresses for EvoNode:

    Repeat getnewaddress to create addresses for:

    • EvoNode owner
    • Proposal voting
    • EvoNode reward

    Example outputs:

    • Owner Address: TWXGVYPHGA4gWcZ9Zp2qnubFVNagvorwEN
    • Voting Address: TSsrnbtJGYD1WmVsrsvauuwxibJyqkkqqL
    • Reward Address: TEXj9AgdCh1giGmr1BXpYsngmkMkthNngD
  12. Prepare the ProRegTx transaction for EvoNode:

    Modify the following line with your specific details:

    protx register_prepare_evo fdab9dff1ff9caf5d291905ad43b9f7d69775189d4d22cb085d7fedd94ea1c6a 0 203.0.113.53:19842 TWXGVYPHGA4gWcZ9Zp2qnubFVNagvorwEN 064bb1741f4707cfe3629176857c41e0d23cbe751061fe5d0d67b506db10c8f3f6f2b684c3cec8e4a128193a001d12e9 TSsrnbtJGYD1WmVsrsvauuwxibJyqkkqqL 0 TEXj9AgdCh1giGmr1BXpYsngmkMkthNngD cd95e2034935898e9b73ad7087b47cbac849bd84 26656 443 TRPLV4dXmEFMSgXg2Xu6skN9pmw8TAo4N5

    Parameters:

    • fdab9dff1ff9caf5d291905ad43b9f7d69775189d4d22cb085d7fedd94ea1c6a - Transaction ID from masternode outputs.
    • 0 - Output index.
    • 203.0.113.53:19842 - External IPv4 address of your VPS.
    • CWXGVYPHGA4gWcZ9Zp2qnubFVNagvorwEN - Owner address.
    • 064bb1741f4707cfe3629176857c41e0d23cbe751061fe5d0d67b506db10c8f3f6f2b684c3cec8e4a128193a001d12e9 - Public key from bls generate.
    • CSsrnbtJGYD1WmVsrsvauuwxibJyqkkqqL - Proposal voting address.
    • CEXj9AgdCh1giGmr1BXpYsngmkMkthNngD - Reward address.
    • cd95e2034935898e9b73ad7087b47cbac849bd84 - P2P key generated with OpenSSL.
    • CRPLV4dXmEFMSgXg2Xu6skN9pmw8TAo4N5 - Address for EvoNode fee.
  13. Sign the ProRegTx transaction for EvoNode:

    Modify and execute the following command:

    signmessage "CRPLV4dXmEFMSgXg2Xu6skN9pmw8TAo4N5" "CEXj9AgdCh1giGmr1BXpYsngmkMkthNngD|0|CWXGVYPHGA4gWcZ9Zp2qnubFVNagvorwEN|CSsrnbtJGYD1WmVsrsvauuwxibJyqkkqqL|ac19e80b02d4e8a27feb42073114070a281a2b788ba064803e8064d259b22ebc"

    Example Output:

    H/d9tkCSzqdYh8qLL1c+KDIlrb4vtFSfdxd88XDc3U/hRZ6lMuAR8TULy7vh1YXGk6AYFFV1xyPNuEdZVMN9SdI=
  14. Submit the ProRegTx transaction for EvoNode:

    Modify and execute the following command:

    protx register_submit 0300010001a55ee8... 7da2e1187202a1a497beca05e0e53a6e4df0dc06046f72fbf8b61c942db2982a

    Parameters:

    • 0300010001a55ee8... - Prepared transaction ID from protx register_prepare.
    • 7da2e1187202a1a497beca05e0e53a6e4df0dc06046f72fbf8b61c942db2982a - Signature from signmessage.
  15. VPS Setup for EvoNode:
    1. Connect via SSH and update packages:
      sudo apt-get update && sudo apt-get upgrade -y
      cd $HOME
    2. Download and set up the daemon:
      wget "https://github.com/cunniblockchain/cunnicore/releases/download/v20/cunni-daemon-linux.tar.gz" -O cunni-daemon-linux.tar.gz
      tar -xzvf cunni-daemon-linux.tar.gz
    3. Download and set up the tools:
      wget "https://github.com/cunniblockchain/cunnicore/releases/download/v20/cunni-qt-linux.tar.gz" -O cunni-qt-linux.tar.gz
      tar -xzvf cunni-qt-linux.tar.gz
    4. Install the daemon and tools:
      sudo mv cunnid cunni-cli cunni-tx /usr/bin/
    5. Create the data directory and configuration file:
      mkdir $HOME/.cunni
      nano $HOME/.cunni/cunni.conf

      Paste the following into cunni.conf:

      rpcuser=rpc_cunni
      rpcpassword=dR2oBQ3K1zYMZQtJFZeAerhWxaJ5Lqeq9J2
      rpcbind=127.0.0.1
      rpcallowip=127.0.0.1
      listen=1
      server=1
      daemon=1
      maxconnections=125
      masternode=1
      masternodeblsprivkey=0acbf6f183d0c9b794b9bc0dba25f8a1a1eca21aa4f2e4a86ecd3120a59efb35
      externalip=203.0.113.53
                                      

      Parameters:

      • externalip=203.0.113.53 - External IPv4 address of your VPS.
      • masternodeblsprivkey=0acbf6f183d0c9b794b9bc0dba25f8a1a1eca21aa4f2e4a86ecd3120a59efb35 - “secret” value from bls generate.

      Save the file with Ctrl + X.

    6. Start your EvoNode:
      cunnid