Install Holochain

Notice: These are the instructions for installing Holochain for the first time. To read how to update Holochain to the latest version, visit change or update holochain go version.

Installing with Go

1. Install GO, by downloading the installer for your operating system from below. Note that holochain-proto will only work with GO versions between 1.8 and 1.10. (1.11 will NOT work).




2. 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.

expand_less 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

expand_less For Windows

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

  • Install Windows git. Be sure to select the appropriate options so that git is accessible from the Windows command line.  N.B.: you must make sure to auto line-feed conversion set correctly, or when you check out dna files from repos, it may change the dna by changing the line endings which will change the hash of the application.

  • Install GnuWin32 make.

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).


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

$ go get -d -v

4. 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...