Welcome to the Dash Forum!

Please sign up to discuss the most innovative cryptocurrency!

Masternode setup guide for non-dummies (server side)

Discussion in 'Masternode Guides' started by KryptoTypek, Apr 28, 2017.

  1. KryptoTypek

    KryptoTypek New Member

    Joined:
    Oct 1, 2016
    Messages:
    19
    Likes Received:
    11
    Trophy Points:
    3
    Hi, based on Tao's great guide, I created a shortened version for tech people who just need to quickly setup their masternode without reading through the verbose original guide. I also added an init.d script to make sure the masternode will continue running if the system reboots for some reason.

    Original guide here: https://www.dash.org/forum/threads/taos-masternode-setup-guide-for-dummies-updated-for-12-1.2680/

    Shortened version:
    Code:
    Create user
    -----------
    
    adduser mn
    passwd *****
    
    nano /etc/sudoers
    [add sudo permissions to user mn]
    
    Install Firewall
    ----------------
    
    apt-get update
    apt-get install ufw
    
    ufw allow ssh/tcp
    ufw limit ssh/tcp
    ufw allow 9999/tcp
    ufw logging on
    ufw enable
    
    ufw status
    
    Copy dasd and dash-cli to /home/mn/.dashcore
    --------------------------------------------
    
    chmod 777 ./dashd
    chmod 777 ./dash-cli
    
    Create dash.conf in folder .dashcore with content:
    --------------------------------------------------
    
    MN1 52.14.2.67:9999 XrxSr3fXpX3dZcU7CoiFuFWqeHYw83r28btCFfIHqf6zkMp1PZ4 06e38868bb8f9958e34d5155437d009b72dff33fc28874c87fd42e51c0f74fdb 0
    
    Start dash deamon
    -----------------
    
    ./dashd
    
    Install Sentinel
    ----------------
    
    sudo apt-get update
    sudo apt-get install -y git python-virtualenv
    
    cd .dashcore
    
    git clone https://github.com/dashpay/sentinel.git
    cd sentinel
    
    virtualenv venv
    sudo apt-get install -y virtualenv [only if previous command fails]
    
    venv/bin/pip install -r requirements.txt
    
    [check sync status]
    venv/bin/python bin/sentinel.py
    
    Create Sentinel cron
    --------------------
    
    crontab -e
    
    * * * * * cd /home/mn/.dashcore/sentinel && ./venv/bin/python bin/sentinel.py 2>&1 >> sentinel-cron.log
    
    Start masternode from wallet
    ----------------------------
    
    
    Ensure dashd starts in case of system reboot
    --------------------------------------------
    
    su
    cd /etc/init.d
    nano masternode
    
    [insert text:]
    
    #! /bin/sh
    
    case "$1" in
      start)
        echo "Starting masternode"
        sudo -u mn /home/mn/.dashcore/dashd
        ;;
      stop)
        echo "Stopping masternode"
        sudo -u mn /home/mn/.dashcore/dash-cli stop
        ;;
      *)
        echo "Usage: /etc/init.d/masternode {start|stop}"
        exit 1
        ;;
    esac
    
    exit 0
    
    [save and continue:]
    
    chmod 755 masternode
    update-rc.d masternode defaults
    
     
    • Like Like x 4
  2. UdjinM6

    UdjinM6 Official Dash Dev
    Dash Core Team Moderator

    Joined:
    May 20, 2014
    Messages:
    3,634
    Likes Received:
    3,534
    Trophy Points:
    1,183
    Nice! I just hope it's not your real IP/mnprivkey there... :rolleyes:
     
  3. KryptoTypek

    KryptoTypek New Member

    Joined:
    Oct 1, 2016
    Messages:
    19
    Likes Received:
    11
    Trophy Points:
    3
    Why, is that bad? JK, its actually from Tao's original quide :)