Install Holochain

Installing with Go

1. Download Go. Download the "Archive" or "Installer" for version 1.8 or later for your CPU and OS. The "Source" download does not contain an executable and step 3 will fail.

2. Install Go on your system.

3. Add a new environment variable called GOPATH which points to the directory on your computer where Go libraries get installed. How to do this depends on your computer and operating system. Instructions for the most common platforms are below.

For Mac and Linux

If you DO NOT have a shell profile file, follow ALL these instructions in your terminal. If you know about shell profiles, and have one, just do steps 4 and 5

  1. $ cd ~
  2. $ touch .bash_profile
  3. $ open .bash_profile
  4. in your editor, add the following to .bash_profile, and save it
export GOPATH="$HOME/go"
export PATH="$GOPATH/bin:$PATH"
   5. $ source .bash_profile

For Windows

First you'll need to install some necessary programs if you don't already have them.

Next, in your Control Panel, select System>Advanced system settings>Environment Variables... and under System Variablesdo the following:

  1. Add a new entry with the name GOPATH and the value %USERPROFILE%\go (Or your Go workspace folder).

  2. Double-click Path, and in the window that pops up add the following entries:

    • %GOPATH%\bin

    • C:\Go\bin (Or wherever you installed Go to+\bin).

    • C:\Program Files (x86)\GnuWin32\bin (Or wherever you installed GnuWin32 make to+\bin).


4. Run the following command in a terminal to download the library and command lines tools

$ go get -d -v

5. Lastly, change directories into the new holochain-proto directory, and run maketo build the library and command lines tools for your computer.

MAC and LINUX: $ cd $GOPATH/src/
WINDOWS: $ cd %GOPATH%/src/

and then (on both)
$ make

And thats it!

To see an initial confirmation that it works, you can try running one of the commands to check your version. You should see a result something like the following. 

$ hcadmin -v
hcadmin version 0.0.x (holochain y)

With Holochain installed, the next step is understanding the command line tools...