Inside Bitcoin
Opening the selected file…
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# UNIX BUILD NOTES3Some notes on how to build Bitcoin Core in Unix.5(For BSD specific instructions, see `build-*bsd.md` in this directory.)7## To Build9```bash10cmake -B build11```12Run `cmake -B build -LH` to see the full list of available options.14```bash15cmake --build build # Append "-j N" for N parallel jobs16cmake --install build # Optional17```19See below for instructions on how to [install the dependencies on popular Linux20distributions](#dependencies).22## Memory Requirements24C++ compilers are memory-hungry. It is recommended to have at least 1.5 GB of25memory available when compiling Bitcoin Core. On systems with less, gcc can be26tuned to conserve memory with additional `CMAKE_CXX_FLAGS`:29cmake -B build -DCMAKE_CXX_FLAGS="--param ggc-min-expand=1 --param ggc-min-heapsize=32768"31Alternatively, or in addition, debugging information can be skipped for compilation.32For the default build type `RelWithDebInfo`, the default compile flags are33`-O2 -g`, and can be changed with:35cmake -B build -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O2 -g0"37Finally, clang (often less resource hungry) can be used instead of gcc, which is used by default:39cmake -B build -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang41## Dependencies43You can either build from self-compiled [depends](/depends/README.md) or44install the dependencies from your distribution package manager. Dependencies45for additional features in later columns are optional.47| Package manager | Required build dependencies | SQLite (wallet) | Cap'n Proto (IPC) | ZMQ <sup><a href="#note1">[1]</a></sup> | USDT | Qt and libqrencode (GUI) |48| ----------------------- | --------------------------- | --------------- | ----------------- | --- | ---- | ------------------------ |49| Debian / Ubuntu (`apt`) | `build-essential cmake python3 libboost-dev` | `libsqlite3-dev` | `libcapnp-dev capnproto` | `libzmq3-dev pkgconf` | `systemtap-sdt-dev` | `qt6-base-dev qt6-tools-dev qt6-l10n-tools qt6-tools-dev-tools libgl-dev qt6-wayland libqrencode-dev` |50| Fedora (`dnf`) | `gcc-c++ cmake make python3 boost-devel` | `sqlite-devel` | `capnproto capnproto-devel` | `zeromq-devel pkgconf` | `systemtap-sdt-devel` | `qt6-qtbase-devel qt6-qttools-devel qt6-qtwayland qrencode-devel` |51| Alpine (`apk`) | `build-base cmake linux-headers python3 boost-dev` | `sqlite-dev` | `capnproto capnproto-dev` | `zeromq-dev` | Not supported | `qt6-qtbase-dev qt6-qttools-dev libqrencode-dev` |52| Arch (`pacman`) | `gcc make cmake python boost` | `sqlite` | `capnproto` | `zeromq` | `systemtap` | `qt6-base qt6-tools qt6-wayland qrencode` |54<a id="note1"></a>1. Some ZMQ packages do not vendor the CMake config files, which requires `pkgconf` or `pkg-config` to be installed.56For Debian "oldstable", or earlier Ubuntu LTS releases, you may need to pick a57later compiler version, according to the [dependencies](/doc/dependencies.md)58documentation.60To build Bitcoin Core without the wallet, see [*Disable-wallet mode*](#disable-wallet-mode)61and use `-DENABLE_WALLET=OFF` to build without the wallet and skip the SQLite dependency.63Cap'n Proto is needed for IPC functionality (see [multiprocess.md](multiprocess.md)).64Compile with `-DENABLE_IPC=OFF` if you do not need IPC functionality.66ZMQ-enabled binaries are compiled with `-DWITH_ZMQ=ON` and require libzmq.68User-Space, Statically Defined Tracing (USDT) requires the systemtap-sdt69development package and must be enabled via `-DWITH_USDT=ON`.71GUI dependencies:73Bitcoin Core includes a GUI built with the cross-platform Qt Framework. To compile the GUI, we need to install74the necessary parts of Qt, the libqrencode and pass `-DBUILD_GUI=ON`. Skip if you don't intend to use the GUI.76Additionally, install the Qt Wayland platform plugin for modern desktop environments.78The GUI will be able to encode addresses in QR codes and requires libqrencode.79Otherwise, if you don't need QR encoding support, use the `-DWITH_QRENCODE=OFF` option to disable this feature in order to compile the GUI.81### Disable-wallet mode83When the intention is to only run a P2P node, without a wallet, Bitcoin Core can84be compiled in disable-wallet mode with:86cmake -B build -DENABLE_WALLET=OFF88In this case there is no dependency on SQLite.90Mining is also possible in disable-wallet mode using the `getblocktemplate` RPC call.
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.