# Open-balena on AWS

**URL:** <https://forums.balena.io/t/open-balena-on-aws/5623>\
**Category:** openBalena\
**Created:** [March 14, 2019, 1:24pm UTC](https://forums.balena.io/t/open-balena-on-aws/5623 "2019-03-14T13:24:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sanderb](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@sanderb](https://forums.balena.io/u/sanderb)\
**Post date:** [March 14, 2019, 1:24pm UTC](https://forums.balena.io/t/open-balena-on-aws/5623/1 "2019-03-14T13:24:03Z")

</div>

Hi,

I’m following the getting started tutorial for setting up open-balena on my amazon server.

I managed to do the parts until DOMAIN configuration. I think I added the CNAMES by setting up A records and pointing them to the IP address of my instance. However, I can not yet connect with balena login. Can somebody explain how to setup the CNAME configuration or explain what might be the problem? I do get a timeout when trying to connect.

Best,  
Sander

---

<div class="post-metadata">

**Author:** ![dansku](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/dansku/32/1183_2.png) [@dansku](https://forums.balena.io/u/dansku)\
**Post date:** [March 14, 2019, 1:33pm UTC](https://forums.balena.io/t/open-balena-on-aws/5623/4 "2019-03-14T13:33:56Z")

</div>

Hey @sanderb

Let’s say you have **[domain.com](http://domain.com)**, you can then add an

- `A` record called `openbalena` and pointing to the **IP address**.
- `CNAME``*.openbalena` and make it an alias of **[openbalena.domain.com](http://openbalena.domain.com)**

Then you can change your balena-cli location to the domain with the command:

```auto
export BALENARC_BALENA_URL=domain.com

```

Then try running `balena login` and it should point to your domain.

Let me know if this helps.  
PS: At 4:30 UTC we will run a live streaming showing how to setup an openBalena instance here: [https://www.twitch.tv/balenaio](https://www.twitch.tv/balenaio)

Cheers

---

<div class="post-metadata">

**Author:** ![sanderb](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@sanderb](https://forums.balena.io/u/sanderb)\
**Post date:** [March 14, 2019, 1:59pm UTC](https://forums.balena.io/t/open-balena-on-aws/5623/6 "2019-03-14T13:59:05Z")

</div>

Thank you for the quick answer.

I did update as suggested, but it is still not working.

[openbalena.myurl.com](http://openbalena.myurl.com) is pointing to the ip  
\*.openbalena.myurl.com has an alias to the first.

I’m also quite new to EC2, so something might be wrong there?

I get  
network timeout at: [https://api.xxxxxx.com/login\_](https://api.xxxxxx.com/login_)

Any help is appreciated.

---

<div class="post-metadata">

**Author:** ![dansku](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/dansku/32/1183_2.png) [@dansku](https://forums.balena.io/u/dansku)\
**Post date:** [March 14, 2019, 2:25pm UTC](https://forums.balena.io/t/open-balena-on-aws/5623/8 "2019-03-14T14:25:53Z")

</div>

Hey @sanderb,

With this configs, it would be setting [https://api.openbalena.myurl.com/login](https://api.openbalena.myurl.com/login)

Could you confirm that you are setting the right address?

Cheers

---

<div class="post-metadata">

**Author:** ![sanderb](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@sanderb](https://forums.balena.io/u/sanderb)\
**Post date:** [March 14, 2019, 3:20pm UTC](https://forums.balena.io/t/open-balena-on-aws/5623/11 "2019-03-14T15:20:32Z")

</div>

Think I jumped that hurdle. A new one in the cert section. Almost there I hope.

ERR\_TLS\_CERT\_ALTNAME\_INVALID: request to [https://api.xxxx.com/login\_](https://api.xxxx.com/login_) failed, reason: Hostname/IP does not match certificate’s altnames: Host: [api.xxxxx.com](http://api.xxxxx.com). is not in the cert’s altnames: DNS:\*.openbalena.local
