Skip to content

Running Gitian with Docker

This is a streamlined guide for running Gitian builds with Docker on Ubuntu, Debian or Mac hardware.


Ensure you have Docker installed. See for installation instructions.

If you're using Linux, make sure to go through the Linux post-install walkthrough, especially the Manage Docker as a non-root user section, to avoid having to use sudo all the time.

Prepare a build workspace

Create a workspace directory (e.g. ~/bchn-gitian) and cd into it. You'll only need to run through this setup once so long as you retain the workspace.

Install dependencies

You'll need git and curl installed. If on Linux, just do sudo apt install curl git.

Gitian setup

# Fetch the `` script
git clone
cp bitcoin-cash-node/contrib/ .

# If you are on a MacOS host, you will need the MacOS-capable fork
# of gitian-builder, if on Linux, you can skip this step.
git clone -b macos_support_no_debian_cache

# Run the initial Gitian setup
./ --docker --setup

# If you need to build for MacOS, also fetch this archive which has been
# extracted from the free SDK.
mkdir -p gitian-builder/inputs
(cd gitian-builder/inputs
curl -LO
echo "2408d07df7f324d3beea818585a6d990ba99587c218a3969f924dfcc4de93b62 MacOSX10.15.sdk.tar.xz" | sha256sum -c)
# This should echo "MacOSX10.15.sdk.tar.xz: OK"

Build binaries

Finally, use the following command to run the build process. Replace satoshi with your GitLab name and replace 23.1.0 with the most recent tag (without the "v"). Use the latest released version available.

./ --docker --detach-sign --no-commit -b satoshi 23.1.0

See the Verify hashes section of the main Gitian build guide for build verification and signing instructions.