The latest btcd release build is from 2015. There is a nice description how to build it for Linux/Mac, but for Windows it’s suggested to download the latest binaries, which are 626 commits behind master as of February 2018. Fortunately, with Golang we can easily build binaries for Windows, and we can follow the steps of the Linux build process. The only issue I faced was a problem in the Glide dependency manager and that’s how this little post was born.

We assume that Go is installed and GOPATH and GOROOT are configured.

We can attempt to build and install it for Windows with the steps below:

c:\> go get -u
c:\> mkdir btcsuite
c:\> cd btcsuite
c:\btcsuite> git clone
c:\btcsuite> cd btcd
c:\btcsuite\btcd> glide install
c:\btcsuite\btcd> go install . ./cmd/...

The first command downloads and installs Glide. The following commands create a folder where the btcd repo will be cloned. After cloning the repo we must run glide install to get all btcd dependencies.

The issue happens on the line glide install and the error is something like: Unable to export dependencies to vendor directory

This seems to be a problem with the Glide tool and to fix it, we must change one line of code in $GOPATH/src/ and rebuild the Glide tool.

In the function CustomRename, we have to replace

cmd := exec.Command("cmd.exe", "/c", "move", o, n)


cmd := exec.Command("cmd.exe", "/c", "xcopy /s/y", o, n+"\\")

Then change to the glide directory and rebuild it.

c:\> cd %GOPATH%\src\\Masterminds\glide
c:\goprojects\src\\Masterminds\glide> go build
c:\goprojects\src\\Masterminds\glide> go install

Now we’re ready to run glide install again in the btcd folder and everything should be fine.

If you want to store the blockchain on a different drive (i.e. not C:), read below.

If we want to change the default folder where btcd will download and store the blockchain, we can create a symbolic link, similar to ln -s in Linux. I wanted to change it, because I have a small 128GB SSD drive for booting Windows (C:) and 1TB spinning drive (D:) where I would like to store the data.

By default btcd stores the blockchain in c:\Users\your-user\AppData\Local\Btcd\data. If we want to move that directory to D: without disturbing the btcd expectations, we can create a symbolic link with the following commands:

First create a folder on drive D: where we’ll store the blockchain, for example:

d:\> mkdir btcd-data

Next, we must rename (move) the current data folder created by btcd:

c:\Users\your-user\AppData\Local\Btcd> move data data-original

And create the symbolic link:

c:\Users\your-user\AppData\Local\Btcd> mklink /d "data" "d:\btcd-data"

Now btcd will have its data directory where it expects it to be, but the blockchain data will actually be stored on drive D: in the d:\btcd-data folder.