# OpenBalena on macOS

**URL:** <https://forums.balena.io/t/openbalena-on-macos/5913>\
**Category:** Product support\
**Tags:** raspberrypi3\
**Created:** [April 6, 2019, 7:39pm UTC](https://forums.balena.io/t/openbalena-on-macos/5913 "2019-04-06T19:39:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kameshs](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/kameshs/32/1743_2.png) [@kameshs](https://forums.balena.io/u/kameshs)\
**Post date:** [April 6, 2019, 7:39pm UTC](https://forums.balena.io/t/openbalena-on-macos/5913/1 "2019-04-06T19:39:51Z")

</div>

Hi,

I am trying to setup open balena on my macOS with DockerForMac. Following the quickstart guide I was able to get the server up and running. But I dont see the apps and devices getting joined. Even if do balena join some error like Error executing command `a39ce8e.local] Configuring...Command 'os-config join(....) failed with error: 4`

---

<div class="post-metadata">

**Author:** ![kameshs](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/kameshs/32/1743_2.png) [@kameshs](https://forums.balena.io/u/kameshs)\
**Post date:** [April 6, 2019, 8:27pm UTC](https://forums.balena.io/t/openbalena-on-macos/5913/4 "2019-04-06T20:27:45Z")

</div>

I get the exact issue like [https://github.com/balena-io/balena-cli/issues/1151](https://github.com/balena-io/balena-cli/issues/1151). Is there a way to make my device resolve the DNS ? since its demo deployment /etc/hosts update will be best solution… But i dont know how I can update device for it

---

<div class="post-metadata">

**Author:** ![pdcastro](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/pdcastro/32/1264_2.png) [@pdcastro](https://forums.balena.io/u/pdcastro)\
**Post date:** [June 20, 2019, 7:25pm UTC](https://forums.balena.io/t/openbalena-on-macos/5913/6 "2019-06-20T19:25:10Z")

</div>

I’ve found these numeric error codes in `os-config` source code ([errors.rs](https://github.com/balena-os/os-config/blob/v1.1.1/src/errors.rs#L155-L164)):

```rust
        ErrorKind::ReadOSConfigSchema => 3,
        ErrorKind::FetchConfiguration => 4,
        ErrorKind::StartService(_) => 5,
        ErrorKind::StopService(_) => 6,
        ErrorKind::ReloadRestartService(_) => 7,
        ErrorKind::WriteFile(_) => 8,
        ErrorKind::ServiceNotFoundJSON(_) => 9,
        ErrorKind::ConfigNotFoundJSON(_, _) => 10,
        ErrorKind::MergeConfigJSON => 11,

```

So `os-config join(....) failed with error: 4` would be `FetchConfiguration` error, which we assume is an error when the device tries to contact some of the [openBalena endpoints](https://www.balena.io/open/docs/getting-started/#Domain-Configuration):

```auto
api.mydomain.com
registry.mydomain.com
vpn.mydomain.com
s3.mydomain.com

```

I am not clear that it is necessarily a DNS error. I suggest decoding the base64 string provided in the error message (see example in [balena-cli issue 1151](https://github.com/balena-io/balena-cli/issues/1151)) to extract the actual endpoint URLs, then test whether they are reachable on the device host OS terminal – perhaps using tools like `ping`, `curl` or `nslookup`.

> Is there a way to make my device resolve the DNS ?

If it is indeed a DNS resolution issue, then instead of modifying the device’s host OS, it may be preferable (if possible) to use an external DNS server and edit the device’s `config.json` [dnsServers](https://github.com/balena-os/meta-balena#dnsservers) setting to point to that DNS server: [this comment from another forum thread](https://forums.balena.io/t/how-to-setup-cname/4609/32) covers some of them, the easiest probably being using a domain registrar’s web interface to modify CNAME or A records. For example, if you bought `kameshs.com` from GoDaddy (no affiliation!), 🙂 you could follow [this guide](https://uk.godaddy.com/help/add-a-cname-record-19236).

Also note that [balena-cli issue 1319](https://github.com/balena-io/balena-cli/issues/1319) reports that _`balena join` does not run on production balenaOS images_ ((see [dev vs prod images](https://www.balena.io/docs/reference/OS/overview/2.x/#dev-vs-prod-images)), and offers a workaround which is to open a ssh terminal to the device’s host OS then directly execute the `os-config leave/join` command. When manually running the `os-config` command on the device terminal, watch out for JSON escaping – see [this comment on issue 1151](https://github.com/balena-io/balena-cli/issues/1151#issuecomment-504031964).
