Author

Topic: [Tutorial] Installing Insight bitcoin blockchain API on windows (Read 8404 times)

legendary
Activity: 1140
Merit: 1000
The Real Jude Austin
I am on Windows 8.1 and I can't get passed the install.

A lot of packages are failing.

Is there any updated tutorial?
member
Activity: 90
Merit: 10
Extra step 1 for windows:

install node-gyp
install visual studio express 2013


and

instead of the windows cmd shell, use the cygwin shell (that can actually run sh commands.. )
member
Activity: 72
Merit: 12
This tutorial is a step by step guide on how to install the insight bitcoin blockchain api on your local windows machine.

The purpose behind this is a preventative measure for the future as i have begun work on several local browser based PHP applications and clients in which you will be able to run on a windows server machine and these applications are dependent on Insight. Follow up threads will be started for each new application and client. If you have reached this thread from one of my other threads for an application or client, please post application specific questions in their respective threads.

Disclaimer: I am neither the creator or a developer of Insight API, this thread is for install instructions or questions on windows machines only. For problems with Insight API itself please contact the development team themselves through github

For now, the tutorial.....

How to install Insight Bitcoin Blockchain API on your local machine

Prerequisites

You will need a machine running Windows Server, Windows 7, or Windows 8. For future application and client purposes i recommend Windows Server 2012R2. Yes this is a $10k-$60k piece of software, but i trust that those of you who want it know how to get it for free.

You will also need to downlaod and install

Python 2.7.x or newer
Node.js
Git for windows Use the default installer options except, select “Run Git from the Windows Command Prompt” when prompted
If you are running a 64bit windows 7 system you will need the 64-bit SDK
I also recommend Visual Studio 2012, But you can skip it if you are comfortable with windows CMD.

Installing

Step 1:

Once everything from above is installed either;

Open a Windows Visual Studio development command prompt (C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\VsDevCmd.bat)

OR

Open a windows CMD window run as administrator.

Next in either window (VS or CMD) Type the following;

cd C:\

then press enter

Then copy and paste the below and press enter

git clone https://github.com/bitpay/insight-api.git

then type the following

cd C:\insight-api (hit enter)
npm install (hit enter)

Step 2:

Locate your current bitcoind data directory, which is normally located at %APPDATA%\Bitcoin. Copy and paste this filepath to a notepad for later.

Step 3:

Type Windows Key-R and enter "rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,3" , then press OK. This will launch the System Properties panel. ( if this does not work enter it into CMD and hit enter) Here, click on Environment Variables, and under User Variables, add the following:

    INSIGHT_NETWORK: Set this to livenet if your bitcoind is running on mainnet. If on testnet, set this to testnet
    BITCOIND_DATADIR: Set this to your bitcoind data dir you found in the step above
    BITCOIND_USER: Whatever your bitcoind RPC user is set to (rpcuser= in the bitcoin.conf in your bitcoind data dir)
    BITCOIND_PASS: Whatever your bitcoind RPC password is set to (rpcpassword= in the bitcoin.conf in your bitcoind data dir)

If you are running on a different host, or set of ports, you will also need to set BITCOIND_HOST, BITCOIND_PORT, and BITCOIND_P2P_PORT as appropriate.

Once done, click OK on both the Environment Variables and System Properties windows to save your changes and close them out.

Step 4:

Open up a command window and run......

"node C:\insight-api\insight.js"

You can run it on start up by adding to your Start up program group in Windows.

Result:

After running insight, it should start parsing the blockchain data from the bitcoind data directory you specified (at BITCOIND_DATADIR).

You can do other things during this time, although i would not recommend shutting down the computer without first terminating the parsing function.

Thats it, your machine is now running an instance of Insight !!!!! Good job on following directions Smiley
Jump to: