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# OpenBSD Build Guide3Bitcoin Core is supported on [the two most recent OpenBSD releases](https://www.openbsd.org/faq/faq5.html#Flavors).5This guide describes how to build bitcoind, command-line utilities, and GUI on the latest release.7## Preparation9### 1. Install Required Dependencies10Run the following as root to install the base dependencies for building.12```bash13pkg_add git cmake boost14```16SQLite is required for the wallet:18```bash19pkg_add sqlite320```22To build Bitcoin Core without the wallet, use `-DENABLE_WALLET=OFF`.24Cap'n Proto is needed for IPC functionality (see [multiprocess.md](multiprocess.md)):26```bash27pkg_add capnproto28```30Compile with `-DENABLE_IPC=OFF` if you do not need IPC functionality.32See [dependencies.md](dependencies.md) for a complete overview.34### 2. Clone Bitcoin Repo35Clone the Bitcoin Core repository to a directory. All build scripts and commands will run from this directory.36``` bash37git clone https://github.com/bitcoin/bitcoin.git38```40### 3. Install Optional Dependencies42#### GUI Dependencies43###### Qt645Bitcoin Core includes a GUI built with the cross-platform Qt Framework. To compile the GUI, we need to install46the necessary parts of Qt, the libqrencode and pass `-DBUILD_GUI=ON`. Skip if you don't intend to use the GUI.48```bash49pkg_add qt6-qtbase qt6-qttools50```52###### libqrencode54The GUI will be able to encode addresses in QR codes unless this feature is explicitly disabled. To install libqrencode, run:56```bash57pkg_add libqrencode58```60Otherwise, if you don't need QR encoding support, use the `-DWITH_QRENCODE=OFF` option to disable this feature in order to compile the GUI.62---64#### Notifications65###### ZeroMQ67Bitcoin Core can provide notifications via ZeroMQ. To compile ZMQ support, install the following dependency and pass `-DWITH_ZMQ=ON` when configuring.68```bash69pkg_add zeromq70```72#### Test Suite Dependencies73There is an included test suite that is useful for testing code changes when developing.74To run the test suite (recommended), you will need to have Python 3 installed:76```bash77pkg_add python py3-zmq # Select the newest version of the python package if necessary.78```80## Building Bitcoin Core82### 1. Configuration84There are many ways to configure Bitcoin Core, here are a few common examples:86##### Wallet and GUI:87This enables wallet support and the GUI, assuming SQLite and Qt 6 are installed.89```bash90cmake -B build -DBUILD_GUI=ON91```93Run `cmake -B build -LH` to see the full list of available options.95### 2. Compile97```bash98cmake --build build # Append "-j N" for N parallel jobs.99ctest --test-dir build # Append "-j N" for N parallel tests.100```102## Resource limits104If the build runs into out-of-memory errors, the instructions in this section105might help.107The standard ulimit restrictions in OpenBSD are very strict:108```bash109data(kbytes) 1572864110```112This is, unfortunately, in some cases not enough to compile some `.cpp` files in the project,113(see issue [#6658](https://github.com/bitcoin/bitcoin/issues/6658)).114If your user is in the `staff` group the limit can be raised with:115```bash116ulimit -d 3000000117```118The change will only affect the current shell and processes spawned by it. To119make the change system-wide, change `datasize-cur` and `datasize-max` in120`/etc/login.conf`, and reboot.
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.