Welcome to the Dash Forum!

Please sign up to discuss the most innovative cryptocurrency!

How to Install Insight-api on Ubuntu 18.04

Discussion in 'Miscellaneous Dash Guides' started by Antti Kaikkonen, Jul 10, 2018.

  1. Antti Kaikkonen

    Antti Kaikkonen Active Member

    Joined:
    Jun 20, 2017
    Messages:
    168
    Likes Received:
    120
    Trophy Points:
    103
    I spent many hours trying to get the latest version running properly so I decided to share the commands that I used here. You should have ssh root access to a fresh Ubuntu 18.04 installation before using this guide. I personally used a vultr server (referral link).

    There is probably a simpler way to perform some of these steps. Please post in the comments.

    1) Update your server

    Code:
    apt-get update
    apt-get upgrade
    2) Install some tools and dependencies
    Code:
    apt-get install nodejs
    apt-get install npm
    apt-get install build-essential
    apt-get install libzmq3-dev
    3) Download Dash-core
    Code:
    cd /root
    wget https://github.com/dashpay/dash/releases/download/v0.12.3.2/dashcore-0.12.3.2-x86_64-linux-gnu.tar.gz
    tar -xvzf dashcore-0.12.3.2-x86_64-linux-gnu.tar.gz
    rm dashcore-0.12.3.2-x86_64-linux-gnu.tar.gz
    4) Install https://github.com/dashevo/dashcore-node
    Code:
    git clone https://github.com/dashevo/dashcore-node
    cd dashcore-node
    npm install
    npm link .
    5) Create a configuration for your node
    Code:
    cd /root
    dashcore-node create mynode
    The last command will cause an error because @dashevo/[email protected]^4.0.0 can't be found in the npm repositories. We will manually fix the errror in the next step.

    6) Fix the error
    Code:
    cd mynode
    nano package.json
    Now change
    Code:
    "@dashevo/dashcore-node": "^4.0.0" 
    to
    Code:
    "@dashevo/dashcore-node": "file:../dashcore-node"
    Now save the changes (Ctrl+x) and run
    Code:
    npm install
    7) Install insight-api service
    Code:
    dashcore-node install @dashevo/insight-api
    8) Change datadir and exec
    Code:
    nano dashcore-node.json
    Change the value of "datadir" to "/root/.dashcore"
    Change the value of "exec" to "/root/dashcore-0.12.3/bin/dashd"

    9) Run it
    Code:
    dashcore-node start
    For me it started synchronizing in 5-10 minutes and finished in 1-2 hours.
     
    #1 Antti Kaikkonen, Jul 10, 2018
    Last edited: Jul 10, 2018
    • Like Like x 2
  2. strophy

    strophy Administrator
    Dash Core Team Dash Support Group Moderator

    Joined:
    Feb 13, 2016
    Messages:
    406
    Likes Received:
    198
    Trophy Points:
    113
    Thanks @Antti Kaikkonen !! I have worked through this and confirmed the process works as advertised. I'd like to include this in the official documentation, since there are a few conflicting instructions floating around on the internet. Is there a way we can modify this so that it doesn't run with root privileges? Would this help remove the manual changes you make in step 8? Also can we add steps to install the UI and block explorer?

    @Obusco do you have a few comments here as well? What should a standard install look like? Can we fix the dependency error in steps 5/6?
     
    • Like Like x 1
  3. Antti Kaikkonen

    Antti Kaikkonen Active Member

    Joined:
    Jun 20, 2017
    Messages:
    168
    Likes Received:
    120
    Trophy Points:
    103
    @strophy the manual changes are required because the version 4.0.0 is not available in https://www.npmjs.com/package/@dashevo/dashcore-node. If 4.0.0 was available then I think step 4 could also be replaced with
    Code:
    npm install -g @dashevo/dashcore-node
    . I think I tried installing with the latest version in the npm repository (3.0.6) but didn't manage to get it working.

    I don't think I have the time to work on this this month but maybe next month.
     

Share This Page