<p>macOS portable binaries are uploaded to bitcoincore.org. On the download page, under <code>Mac OS X</code> is a link to <code>tar.gz</code>. That tarball contains the macOS portable binaries.</p>

<hr>

<p>Bitcoin Core's release process using gitian does produce these portable binaries. So you can replicate the same process to build your own portable binaries. You can read about how to do that <a href="https://github.com/bitcoin/bitcoin/blob/master/doc/release-process.md#building" rel="nofollow noreferrer">here</a>.</p>

<p>There is a script, <code>contrib/gitian-build.py</code> that should do everything for you. It should work on Ubuntu. It will install all of the necessary dependencies and setup the gitian environment before doing the build when you run it with the <code>--setup</code> option.</p>

<p>Your build command with this script would look something like</p>

<pre><code>bitcoin/contrib/gitian-build.py -Dnb -o x &lt;name&gt; 0.20.0
</code></pre>

<p>Use the <code>-h</code> option to get usage information</p>

<p><code>-D</code> tells the script to not try to sign the resulting <code>.assert</code> file that contains all of the build hashes.</p>

<p><code>-n</code> tells the script to not try to commit the <code>.assert</code> file that is created.</p>

<p><code>-b</code> means to do a build</p>

<p><code>-o x</code> tells the script to specifically do a macOS build (<code>-o</code> means operating system, <code>x</code> for OSX)</p>

<p><code>&lt;name&gt;</code> that's where you would put your username. This is just for identifying signers who participate in the gitian build process. You can just set this to be whatever you want.</p>

<p><code>0.20.0</code> is the version to build, in this case, 0.20.0. You can put whatever other version you want.</p>

<p>The script will create a directory named <code>bitcoin-binaries</code>. Inside of that will be a directory with the version name. And inside that directory will be 2 files - a <code>.tar.gz</code> file and a <code>.dmg</code> file. The <code>.tar.gz</code> file contains the portable binaries that you can use.</p>

<hr>

<p>Additionally some gitian builders (like myself) upload all of their gitian build results so you could just download those files.</p>

<p>Personally, I upload my results to <a href="https://github.com/achow101/bitcoin/releases" rel="nofollow noreferrer">github</a>. The macOS portable binaries are named <code>bitcoin-&lt;version&gt;-osx64.tar.gz</code>.</p>

<p>Jonas Schnelli also uploads the results of his builds. You can find them at on his <a href="http://build.jonasschnelli.ch/gitian/#releases" rel="nofollow noreferrer">website</a>.</p>

<p>In both cases, the files that you download should have hashes that match those of other gitian builds. The gitian builders commit their hashes to <a href="https://github.com/bitcoin-core/gitian.sigs" rel="nofollow noreferrer">this github repository</a> so you can go there to check that the file you download has the same hash that the gitian builders computed.</p>

CC BY-SA 4.0
2020-06-06T05:24:07.410Z
2020-06-06T05:24:07.410Z
Ava Chow
<p>Bitcoin Core ships a portable <code>bitcoind</code> with the Linux and Windows releases, but doesn't ship one with macOS. And I couldn't find instructions on how to build one.</p>

<p>Can someone provide step-by-step instructions on how to build a portable <code>bitcoind</code> binary for macOS? </p>

<p>The host platform can be Ubuntu or macOS. I have access to both.</p>

<p>(Just to clarify, the goal is to have a self-contained <code>bitcoind</code> binary that runs on different macOS machines without having to install additional dependencies)</p>

CC BY-SA 4.0
2020-06-06T05:05:39.957Z
The bitcoind provided by the install should be portable. Have you tried installing Bitcoin Core on one machine and then just copying the bitcoind binary?
Ava Chow
CC BY-SA 4.0
2020-06-06T05:28:13.340Z
The Bitcoin Core macOS install doesn't have a `bitcoind` in it
M.K. Safi
CC BY-SA 4.0
2020-06-06T05:32:01.940Z
Oh I didn't think to check the `tar.gz` file. It does contain the files I need. I suspect those will be portable but I haven't tried yet! Thank you!
M.K. Safi
<bitcoin-core><bitcoind>
How to build a portable bitcoind binary for macOS?
M.K. Safi
# How to build a portable bitcoind binary for macOS?

(Asked by: username_0 on 2020-06-06)

Bitcoin Core ships a portable `bitcoind` with the Linux and Windows releases, but doesn't ship one with macOS. And I couldn't find instructions on how to build one.

Can someone provide step-by-step instructions on how to build a portable `bitcoind` binary for macOS?

The host platform can be Ubuntu or macOS. I have access to both.

(Just to clarify, the goal is to have a self-contained `bitcoind` binary that runs on different macOS machines without having to install additional dependencies)

**Tags:** bitcoin-core, bitcoind

> **Comments:**
> **username_1**: The bitcoind provided by the install should be portable. Have you tried installing Bitcoin Core on one machine and then just copying the bitcoind binary?  
> **username_0**: The Bitcoin Core macOS install doesn't have a `bitcoind` in it  
> **username_0**: Oh I didn't think to check the `tar.gz` file. It does contain the files I need. I suspect those will be portable but I haven't tried yet! Thank you!  

---

## 1 answers

### Answer by username_1 on 2020-06-06. Score: 2 | Accepted answer

macOS portable binaries are uploaded to bitcoincore.org. On the download page, under `Mac OS X` is a link to `tar.gz`. That tarball contains the macOS portable binaries.

---

Bitcoin Core's release process using gitian does produce these portable binaries. So you can replicate the same process to build your own portable binaries. You can read about how to do that [here](https://github.com/bitcoin/bitcoin/blob/master/doc/release-process.md#building).

There is a script, `contrib/gitian-build.py` that should do everything for you. It should work on Ubuntu. It will install all of the necessary dependencies and setup the gitian environment before doing the build when you run it with the `--setup` option.

Your build command with this script would look something like

```
bitcoin/contrib/gitian-build.py -Dnb -o x <name> 0.20.0

```

Use the `-h` option to get usage information

`-D` tells the script to not try to sign the resulting `.assert` file that contains all of the build hashes.

`-n` tells the script to not try to commit the `.assert` file that is created.

`-b` means to do a build

`-o x` tells the script to specifically do a macOS build (`-o` means operating system, `x` for OSX)

`<name>` that's where you would put your username. This is just for identifying signers who participate in the gitian build process. You can just set this to be whatever you want.

`0.20.0` is the version to build, in this case, 0.20.0. You can put whatever other version you want.

The script will create a directory named `bitcoin-binaries`. Inside of that will be a directory with the version name. And inside that directory will be 2 files - a `.tar.gz` file and a `.dmg` file. The `.tar.gz` file contains the portable binaries that you can use.

---

Additionally some gitian builders (like myself) upload all of their gitian build results so you could just download those files.

Personally, I upload my results to [github](https://github.com/achow101/bitcoin/releases). The macOS portable binaries are named `bitcoin-<version>-osx64.tar.gz`.

Jonas Schnelli also uploads the results of his builds. You can find them at on his [website](http://build.jonasschnelli.ch/gitian/#releases).

In both cases, the files that you download should have hashes that match those of other gitian builds. The gitian builders commit their hashes to [this github repository](https://github.com/bitcoin-core/gitian.sigs) so you can go there to check that the file you download has the same hash that the gitian builders computed.


---

