MacOS

These instructions are specific to macOS. You can install Lotus on macOS 10.11 El Capitan or higher. If you are installing Lotus on a Linux distribution, head over to the Linux section.

There are several ways to install Lotus on macOS:

Install with Homebrew

You can quickly install Lotus using Homebrew on macOS.

  1. Add the filecoin-project/lotus tap:

    brew tap filecoin-project/lotus
    
  2. Install Lotus:

    brew install lotus
    
  3. You should now have Lotus installed. You can now start the Lotus daemon.

Build from source

You can build the Lotus executables from source by following these steps.

Software dependencies

You must have XCode and Homebrew installed to build Lotus from source.

XCode Command Line Tools

Lotus requires that X-Code CLI tools be installed before building the Lotus binaries.

  1. Check if you already have the XCode Command Line Tools installed via the CLI, run:

    xcode-select -p
    

    This should output something like:

    /Library/Developer/CommandLineTools
    

    If this command returns a path, then you have Xcode already installed! You can move on to installing dependencies with Homebrew. If the above command doesn’t return a path, install Xcode:

    xcode-select --install
    

Next up is installing Lotus' dependencies using Homebrew.

Homebrew

We recommend that macOS users use Homebrew to install each of the necessary packages.

  1. Use the command brew install to install the following packages:

    brew install go bzr jq pkg-config hwloc coreutils
    

Next up is cloning the Lotus repository and building the executables.

Rust

Rustup is an installer for the systems programming language Rust. Run the installer and follow the onscreen prompts. The default installation option should be chosen unless you are familiar with customisation:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Build and install Lotus

The installation instructions are different depending on which CPU is in your Mac:

M1-based CPUs

  1. Clone the repository:

    git clone https://github.com/filecoin-project/lotus.git
    cd lotus/
    
  2. Switch to the latest stable release branch:

    git checkout releases
    

    The releases branch always contains the latest stable release for Lotus. If you want to checkout to a network other than mainnet, take a look at the Switching networks guide →

  3. Create the necessary environment variables to allow Lotus to run on M1 architecture:

    export LIBRARY_PATH=/opt/homebrew/lib
    export FFI_BUILD_FROM_SOURCE=1
    export PATH="$(brew --prefix coreutils)/libexec/gnubin:/usr/local/bin:$PATH"
    
  4. Build the lotus daemon:

    make all
    
  5. Run the final make command to move this lotus executable to /usr/local/bin. This allows you to run lotus from any directory.

    sudo make install
    
  6. You should now have Lotus installed. You can now start the Lotus daemon.

Intel CPUs

  1. Clone the repository:

    git clone https://github.com/filecoin-project/lotus.git
    cd lotus/
    
  2. Switch to the latest stable release branch:

    git checkout releases
    

    The releases branch always contains the latest stable release for Lotus. If you want to checkout to a network other than mainnet, take a look at the Switching networks guide →

  3. If you are in China, take a look at some tips for running Lotus in China".

  4. Build and install Lotus:

    make clean all
    sudo make install
    

Edit this page on GitHub