# How to Configure Boundary for https

**URL:** <https://discuss.hashicorp.com/t/how-to-configure-boundary-for-https/26575>\
**Category:** Boundary\
**Created:** [July 9, 2021, 3:02pm UTC](https://discuss.hashicorp.com/t/how-to-configure-boundary-for-https/26575 "2021-07-09T15:02:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ghardak](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/ghardak/32/20259_2.png) [@ghardak](https://discuss.hashicorp.com/u/ghardak)\
**Post date:** [July 9, 2021, 3:02pm UTC](https://discuss.hashicorp.com/t/how-to-configure-boundary-for-https/26575/1 "2021-07-09T15:02:29Z")

</div>

Trying to setup https for boundary on AwS with a listener on 443 and domain ACM to a target group forwarding to the controllers on port 9200.

my issue at the moment, is that boundary will work with http, but once i try to access it via https, i get a 502 returned.

Has anyone got Boundary to work with https via an application load balancer on aws? or can point me to the correct documentation

---

<div class="post-metadata">

**Author:** ![roko99](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/roko99/32/29783_2.png) [@roko99](https://discuss.hashicorp.com/u/roko99)\
**Post date:** [July 29, 2022, 3:52pm UTC](https://discuss.hashicorp.com/t/how-to-configure-boundary-for-https/26575/2 "2022-07-29T15:52:54Z")

</div>

Hello guys.  
This topic is also actual in my case. My worker is configured in next way:

```auto
    worker {
            name = "kubernetes-worker"
            description = "A worker on kubernetes cluster"
            address = "localhost"
      controllers = ["localhost"]
            public_addr = "<dns_name>:443"
    }
...
    listener "tcp" {
            address = "0.0.0.0"
            purpose = "proxy"
            tls_disable = true
    }

```

So I have nginx-ingress with tls termination between end user and boundary-worker.

But when I am trying to connect I got:

```auto
error fetching connection to send session teardown request to worker: Error dialing the worker: failed to WebSocket dial: failed to send handshake request: Get "http://<dns_name>:443/v1/proxy": x509: certificate is valid for <dns_name>

```

So it tries to call http **http** ://\<dns\_name\>:443/v1/proxy"

Am I missing something? May be there is some workaround?

---

<div class="post-metadata">

**Author:** ![Qstarnik](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/qstarnik/32/28685_2.png) [@Qstarnik](https://discuss.hashicorp.com/u/Qstarnik)\
**Post date:** [August 4, 2022, 8:41am UTC](https://discuss.hashicorp.com/t/how-to-configure-boundary-for-https/26575/3 "2022-08-04T08:41:53Z")

</div>

Hello community!

Have same problem in k8s deployment, i have virtual server before worker proxy to terminate tls.

Like: client-\>virtual-server:443\>worker:9202.

When i try to connect from client im getting

`error fetching connection to send session teardown request to worker: Error dialing the worker: failed to WebSocket dial: failed to send handshake request: Get "http://boundary-worker.domain.com:9202/v1/proxy": context deadline exceeded`

If i using `public_addr = "boundary-worker.domain.com:443"`

getting

```auto
error fetching connection to send session teardown request to worker: Error dialing the worker: failed to WebSocket dial: failed to send handshake request: Get "http://boundary-worker.domain.com:443/v1/proxy": x509: certificate is valid for *.domain.com, domain.com, not s_ij08SjLCie

```

I think that found this source code block, but don’t know about https option.

> <https://github.com/hashicorp/boundary/blob/6fdcccb9533dcd66e9346d29fb65a92baa99083e/internal/cmd/commands/connect/connect.go#L677>

---

<div class="post-metadata">

**Author:** ![anieo](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/anieo/32/33291_2.png) [@anieo](https://discuss.hashicorp.com/u/anieo)\
**Post date:** [January 21, 2023, 10:13pm UTC](https://discuss.hashicorp.com/t/how-to-configure-boundary-for-https/26575/4 "2023-01-21T22:13:18Z")

</div>

**worker to controller** connections are not HTTP but TCP connections, same as why you cannot expose TCP database through ingress.

if you are using an Nginx controller or Kubernetes controller  
use this: [Exposing TCP and UDP services - NGINX Ingress Controller](https://kubernetes.github.io/ingress-nginx/user-guide/exposing-tcp-udp-services/)

after this you will need to expose port 9201 or whatever you used in the boundary worker service on the Kubernetes ingress controller service , if you are on AWS; the AWS load-balancer will create a target group and listener for the new port, it should be in a health state. you can also test with `telnet worker.domain.com 9201`  
same for the controller It has 2 port one is cluster port 9201 which is a TCP connection the worker will need to be able to access it so don’t try to put it behind TCP SSL , you can put the API port 9200 behind SSL but i haven’t tried it.
