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.
Add the
filecoin-project/lotus
tap:brew tap filecoin-project/lotus
Install Lotus:
brew install lotus
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.
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.
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
Clone the repository:
git clone https://github.com/filecoin-project/lotus.git cd lotus/
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 →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"
Build the
lotus
daemon:make all
Run the final
make
command to move thislotus
executable to/usr/local/bin
. This allows you to runlotus
from any directory.sudo make install
You should now have Lotus installed. You can now start the Lotus daemon.
Intel CPUs
Clone the repository:
git clone https://github.com/filecoin-project/lotus.git cd lotus/
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 →If you are in China, take a look at some tips for running Lotus in China".
Build and install Lotus:
make clean all sudo make install