Install The Holochain Developer Tools

This guide will get you set up with the last official Holochain-Redux developer environment on macOS, Linux, and Windows. Holochain-Redux is at its end of life, and there will be no more updates. Instead of installing Holochain-Redux, we encourage you to start developing on the new version of Holochain right away.

Hardware Requirements

  • 4GB+ RAM (16GB+ recommended)
  • 4+ CPU (6+ CPU recommended)
  • 30GB+ available disk space
  • Internet connection

macOS

Pre-Installed Software

Install the Nix Package Manager

We use Nix toolkit to manage the installation of our dev tools. Install the Nix package manager with this command:

macOS 10.15 Catalina

sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume

macOS 10.14 Mojave and earlier

sh <(curl -L https://nixos.org/nix/install)

After installing Nix, log out of your user account and log in again. Or, to save effort, run this command to get your terminal to recognize the newly installed commands:

. ~/.nix-profile/etc/profile.d/nix.sh

Check that it installed correctly:

nix-shell --version

You should see something like:

nix-shell (Nix) 2.3.7

If you’d like to know more about Nix and why we use it, you can find more information here.


Install Holochain Tools

Now that you have installed Nix, you can run a development shell that contains all the prerequisites, including the correct Rust and Node.js versions and the Holochain tools. This shell won’t interfere with your current system configuration. Run this command:

nix-shell https://github.com/holochain/holonix/archive/release-0.0.85.tar.gz

The first time you run this command it will take some time to download and build, but it will be much faster the next time.

When it’s complete, you will see a new prompt starting with:

[nix-shell:

Test that Holochain is working by running:

Run in nix-shell

hc --version
holochain --version

You should see something like:

hc 0.0.52-alpha2
holochain 0.0.52-alpha2

Update/Uninstall

The version of Holochain contained in Holonix v0.0.85 is Holochain-Redux v0.0.52-alpha2. This is the end-of-life version for Holochain-Redux, which means there will be no more updates for this codebase. Holochain-Redux has been replaced by the new version of Holochain, which we encourage you to start developing on right away.

If you’d like to install an older release, read our advanced guide

Because nix-shell doesn’t modify your usual environment in any way, there’s no need to uninstall it. But if you want to clear up disk space, you can delete the entire contents of the /nix/store directory — just make sure nobody or nothing else uses Nix on your computer!

Using your text editor or IDE

In most cases you can run your editor as normal. However, if you are using a text editor or integrated development environment (IDE) that needs to communicate with the Rust compiler for real-time syntax checks, then you should launch it from inside the nix-shell. This is because Holonix comes with its own version of Rust that might be different from what you may already have installed.

To do this, just open your editor from the command line while you are in the nix-shell (this example uses Vim):

Run in nix-shell

vim my_file.rs

Next Steps

  1. Read through the Holochain Core Concepts.
  2. Start the Hello Holo Tutorial
  3. Create a new app
  4. Learn more about Holochain development in the Guidebook.
  5. Learn more about Rust and Holochain in the API Reference Documentation, Crates.io, and the Rust book.
  6. Learn more about Nix as a dev requirement and why we’re using it in the Holonix documentation.

Was this helpful?