---
title: "TLS listeners"
description: "End TLS at a load balancer with a certificate from Web Certificates or Private CA."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# TLS listeners

A `tls` listener ends TLS at the load balancer, with TLS 1.2 or 1.3, and sends plain TCP to its
targets inside your VPC. It takes a certificate (`crt_…`) that's been issued in the
project. An `https` listener ends TLS the same way and then [routes each request](/load-balancers/http).

```sh
ezgh lb listeners create lbr_4k2m9x0a7qpe --protocol tls --port 443 \
  --target-group tgp_7t3n1v8c2wzd --certificate crt_8s4f2k9d1mzq
```

- A certificate that hasn't been issued is refused: `409 certificate_not_issued`.
- You need `certificates.certificates.use` on the certificate.
- Renewals reach the listener by themselves.
- A certificate that expires, or can't be delivered, shows on the load balancer as a `lastChange` of
  `not_applied`, with the reason.

## Several domains on one listener

`--additional-certificate` (`additionalCertificates`, at most 24) adds certificates to a `tls` or `https`
listener. A client gets the one whose names cover the name it asks for (SNI); a client that asks for none
of them, or sends no name, gets the listener's own `--certificate`. Each renews by itself.

```sh
ezgh lb listeners update lbr_4k2m9x0a7qpe lsn_1b8c4d6f0gkm \
  --additional-certificate crt_5w1y7a3c9edg --additional-certificate crt_0z4x8v2n6bpr
```

The list replaces the one before; `--no-additional-certificates` empties it.

## Changing a certificate

To change a listener's certificate:

```sh
ezgh lb listeners update lbr_4k2m9x0a7qpe lsn_1b8c4d6f0gkm --certificate crt_2t6h9j3k5lnp
```

Source: https://docs.ezghcloud.com/load-balancers/tls/index.mdx
