Inside Bitcoin
Opening the selected file…
Inside Bitcoin
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
1# macOS Build Guide3**Updated for MacOS [26](https://www.apple.com/os/macos/)**5This guide describes how to build bitcoind, command-line utilities, and GUI on macOS.7## Preparation9The commands in this guide should be executed in a Terminal application.10macOS comes with a built-in Terminal located in:12```bash13/Applications/Utilities/Terminal.app14```16### 1. Xcode Command Line Tools18The Xcode Command Line Tools are a collection of build tools for macOS.19Version 16.2 (or higher) of these tools must be20[installed](https://developer.apple.com/documentation/xcode/installing-the-command-line-tools)21in order to build Bitcoin Core from source.23To install, run the following command from your terminal:25``` bash26xcode-select --install27```29Upon running the command, you should see a popup appear.30Click on `Install` to continue the installation process.32### 2. Homebrew Package Manager34Homebrew is a package manager for macOS that allows one to install packages from the command line easily.35While several package managers are available for macOS, this guide will focus on Homebrew as it is the most popular.36Since the examples in this guide which walk through the installation of a package will use Homebrew, it is recommended that you install it to follow along.37Otherwise, you can adapt the commands to your package manager of choice.39To install the Homebrew package manager, see: https://brew.sh41Note: If you run into issues while installing Homebrew or pulling packages, refer to [Homebrew's troubleshooting page](https://docs.brew.sh/Troubleshooting).43### 3. Install Required Dependencies45The first step is to download the required dependencies.46These dependencies represent the packages required to get a barebones installation up and running.48See [dependencies.md](dependencies.md) for a complete overview.50To install, run the following from your terminal:52``` bash53brew install cmake boost capnp54```56#### Wallet Dependencies58If you do not need wallet functionality, you can use `-DENABLE_WALLET=OFF` in59the `cmake -B` step below.61SQLite is required, but since macOS ships with a useable `sqlite` package, you don't need to62install anything.64#### IPC Dependencies66If you do not need IPC functionality (see [multiprocess.md](multiprocess.md))67you can omit `capnp` and use `-DENABLE_IPC=OFF` in the `cmake -B` step below.69### 4. Clone Bitcoin repository71`git` should already be installed by default on your system.72Now that all the required dependencies are installed, let's clone the Bitcoin Core repository to a directory.73All build scripts and commands will run from this directory.75``` bash76git clone https://github.com/bitcoin/bitcoin.git77```79### 5. Install Optional Dependencies81#### GUI Dependencies83###### Qt85Bitcoin Core includes a GUI built with the cross-platform Qt Framework. To compile the GUI, we need to install86Qt, libqrencode and pass `-DBUILD_GUI=ON`. Skip if you don't intend to use the GUI.88``` bash89brew install qt@690```92Note: Building with Qt binaries downloaded from the Qt website is not officially supported.93See the notes in [#7714](https://github.com/bitcoin/bitcoin/issues/7714).95###### libqrencode97The GUI will be able to encode addresses in QR codes unless this feature is explicitly disabled. To install libqrencode, run:99``` bash100brew install qrencode101```103Otherwise, if you don't need QR encoding support, you can pass `-DWITH_QRENCODE=OFF` to disable this feature.105---107#### ZMQ Dependencies109Bitcoin Core can provide notifications via ZeroMQ. To compile ZMQ support, install the following dependency and pass `-DWITH_ZMQ=ON` when configuring.110Skip if you do not need ZMQ functionality.112``` bash113brew install zeromq pkgconf114```116Check out the [further configuration](#further-configuration) section for more information.118For more information on ZMQ, see: [zmq.md](zmq.md)120---122#### Test Suite Dependencies124There is an included test suite that is useful for testing code changes when developing.125To run the test suite (recommended), you will need to have Python 3 installed:127``` bash128brew install python129```131---133#### Deploy Dependencies135You can [deploy](#3-deploy-optional) a `.zip` containing the Bitcoin Core application.136It is required that you have `python` and `zip` installed.138## Building Bitcoin Core140### 1. Configuration142There are many ways to configure Bitcoin Core, here are a few common examples:144##### Wallet and GUI:146This enables the GUI.147If `sqlite` or `qt` are not installed, this will throw an error.149``` bash150cmake -B build -DBUILD_GUI=ON151```153##### No Wallet or GUI155``` bash156cmake -B build -DENABLE_WALLET=OFF157```159##### Further Configuration161You may want to dig deeper into the configuration options to achieve your desired behavior.162Examine the output of the following command for a full list of configuration options:164``` bash165cmake -B build -LH166```168### 2. Compile170After configuration, you are ready to compile.171Run the following in your terminal to compile Bitcoin Core:173``` bash174cmake --build build # Append "-j N" here for N parallel jobs.175ctest --test-dir build # Append "-j N" for N parallel tests.176```178### 3. Deploy (optional)180You can also create a `.zip` containing the `.app` bundle by running the following command:182``` bash183cmake --build build --target deploy184```186## Running Bitcoin Core188Bitcoin Core should now be available at `./build/bin/bitcoind`.189If you compiled support for the GUI, it should be available at `./build/bin/bitcoin-qt`.191There is also a multifunction command line interface at `./build/bin/bitcoin`192supporting subcommands like `bitcoin node`, `bitcoin gui`, `bitcoin rpc`, and193others that can be listed with `bitcoin help`.195The first time you run `bitcoind` or `bitcoin-qt`, it will start downloading the blockchain.196This process could take many hours, or even days on slower than average systems.198By default, blockchain and wallet data files will be stored in:200``` bash201/Users/${USER}/Library/Application Support/Bitcoin/202```204Before running, you may create an empty configuration file:206```shell207mkdir -p "/Users/${USER}/Library/Application Support/Bitcoin"209touch "/Users/${USER}/Library/Application Support/Bitcoin/bitcoin.conf"211chmod 600 "/Users/${USER}/Library/Application Support/Bitcoin/bitcoin.conf"212```214You can monitor the download process by looking at the debug.log file:216```shell217tail -f $HOME/Library/Application\ Support/Bitcoin/debug.log218```220## Other commands:222```shell223./build/bin/bitcoind -daemon # Starts the bitcoin daemon.224./build/bin/bitcoin-cli --help # Outputs a list of command-line options.225./build/bin/bitcoin-cli help # Outputs a list of RPC commands when the daemon is running.226./build/bin/bitcoin-qt -server # Starts the bitcoin-qt server mode, allows bitcoin-cli control227```
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.