How To Use Custom Domain While Terminating TLS by App?

Hi,
I need my apps to terminate TLS by itself, Since I don’t have access to key of certificate. I’ve tried to use `lego` with my custom domain to create certificate and key. The problem is that I don’t want fly get certificate for my domain since I won’t gonna have access to key. I need my handler to be only tcp, no tls. How to achieve that?

[services]
internal_port = 8080
protocol = ‘tcp’

[[services.ports]]
port = 443
handlers = [‘tcp’] # No handlers, raw TCP

[[vm]]
memory = ‘256mb’
cpu_kind = ‘shared’
cpus = 1
memory_mb = 256

Hi… As a quick side note, you want handlers = [] in this case (empty list).

The set of valid handlers can be found here:

https://fly.io/docs/networking/services/#configure-connection-handlers

Moreover, the first stanza should be [[services]] (double brackets).

(I don’t know the certificates side, though; hopefully someone who does will chime in!)

1 Like