Preparation
The commands in this guide should be executed in a Terminal application. macOS comes with a built-in Terminal located at:1. Xcode Command Line Tools
The Xcode Command Line Tools are a collection of build tools for macOS. These tools must be installed to build Bitcoin Core from source.2. Homebrew Package Manager
Homebrew is a package manager for macOS that allows you to install packages from the command line easily. While several package managers are available for macOS, this guide focuses on Homebrew as it is the most popular.Install Homebrew
Visit https://brew.sh and follow the installation instructions.
If you encounter issues while installing Homebrew or pulling packages, refer to Homebrew’s troubleshooting page.
3. Install Required Dependencies
These dependencies represent the packages required to get a barebones installation up and running. See dependencies.md for a complete overview.4. Clone Bitcoin Repository
git should already be installed by default on your system. Now that all required dependencies are installed, clone the Bitcoin Core repository:
5. Install Optional Dependencies
Wallet Dependencies
If you do not need wallet functionality, you can use-DENABLE_WALLET=OFF in the configuration step below.
SQLite is required for the wallet, but macOS ships with a usable
sqlite package, so you don’t need to install anything additional.IPC Dependencies
If you do not need IPC functionality (see multiprocess.md), you can omitcapnp from the installation above and use -DENABLE_IPC=OFF in the configuration step.
GUI Dependencies
Install Qt6
Bitcoin Core includes a GUI built with the cross-platform Qt Framework. To compile the GUI, install Qt and pass
-DBUILD_GUI=ON:ZMQ Dependencies
Support for ZMQ notifications requires the following dependency. Skip if you do not need ZMQ functionality.Test Suite Dependencies
There is an included test suite that is useful for testing code changes when developing. To run the test suite (recommended), you will need Python 3:Deploy Dependencies
You can deploy a.zip containing the Bitcoin Core application. This requires python and zip to be installed.
Building Bitcoin Core
1. Configuration
There are many ways to configure Bitcoin Core. Here are a few common examples:The first example enables the GUI. If
sqlite or qt are not installed, this will throw an error.2. Compile
After configuration, you are ready to compile:3. Deploy (Optional)
You can create a.zip containing the .app bundle:
Running Bitcoin Core
Bitcoin Core should now be available at./build/bin/bitcoind. If you compiled support for the GUI, it should be available at ./build/bin/bitcoin-qt.
There is also a multifunction command line interface at ./build/bin/bitcoin supporting subcommands like:
bitcoin nodebitcoin guibitcoin rpc- and others (list with
bitcoin help)