On this page

Installing TLS Certificates

TLS certificates (updated, more secure, version of SSL) are necessary to enable secure HTTPS connections between a browser and your application. These certificates can be bought online, or generated by Clever Cloud. In that case, we manage the whole process for you.

There is two ways to get HTTPS for your apps:

  • Let’s Encrypt: Provided by default by Clever Cloud. Free. Nothing to configure.
  • Your own certificates: If you already have a certificate, you can upload it securely.

Using the provided Let’s Encrypt certificate

We automatically generate certificates when you add a domain name to your app. It’s all you have to do, our internal certificate generator will create a TLS certificate for a domain or a sub-domain.

We do not support wildcard Let’s Encrypt certificates at the moment. If you need a wildcard certificate, you can either generate a Let’s Encrypt certificate yourself or buy one (we can resell one to you, in which case we will deal with the csr generation ourselves, contact the support to know more).

Cloudflare

If you use Cloudflare to manage your domain, the certificate generation could fail depending on your SSL/TLS settings, you will encounter 502 HTTP errors if Cloudflare expects SSL/TLS strict mode and automatically redirects to HTTPS.

To prevent this from happening you can create a page rule to bypass this policy as Let’s Encrypt needs to access the route /.well-known/acme-challenge* via HTTP to generate the certificate:

  1. Define a page rule such as this one:

    Create a bypass page rule
    Create a bypass page rule

    We also recommend to disable the cache level.

  2. Turn off HTTP to HTTPS redirection on Cloudflare:

    Turn off automatic HTTPS redirection
    Turn off automatic HTTPS redirection

    You can enable Force HTTPS in the information tab of your Clever Cloud application instead.

Uploading my own certificates

You can upload certificates yourself: https://api.clever-cloud.com/v2/certificates/new

You need to paste a PEM bundle containing (in this order):

  • the private key
  • the certificate itself
  • intermediate certificates

You should create a file.pemcontaining:

-----BEGIN RSA PRIVATE KEY-----
 <the private key>
-----END RSA PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
<the certificate>
-----END CERTIFICATE-----

You can add optionnal intermediate certificates by appending them to the file as

-----BEGIN CERTIFICATE-----
<the certificate>
-----END CERTIFICATE-----

You should note that .pem files use the unix way of terminating lines with a single line feed character. Make sure your text editor does the same.

If you need manual operations on the certificates, the most secure way to transfer your certificates is using a signed and encrypted email. Our dedicated email for receiving certificates is ssl@clever-cloud.com.

Clever Cloud on Keybase

If your are a Keybase.io user, you can find us at keybase.io/clevercloud.

Clever Cloud’s Public Key (for GPG users)

  • fingerprint: 03943517934C1FA5ED4E2F61218B86BD5278460F
  • 64-bit: 218B86BD5278460F
-----BEGIN PGP PUBLIC KEY BLOCK-----
Comment: GPGTools - https://gpgtools.org

mQINBFa4bJMBEAC21vsfJ1ay5iVUcKsP8X8GziZu8daV5G4Lqpns54zN/GB05f9+
3jV1RYRMweq7RC6XU/GDZo20ksvDw0N963/WCswCt0MyzM1O105tZ/ZbYyVV/w5w
763DXCUPdBhzcA7o31A7JgPimiceP/BcyA8CniLSD4nfzD0CiM74kdG5/vx2Ve9T
vkJ0wX5qWFvEivBPf/+jUfmdwtx5RLjH783xRuh0wWcz9ey/hsuLxJmdDuIlUccu
yH0itAMiLmI0yGscTVQ6pmLmEY1GZY3GSrTZbDOrKbJLxPjtRAtW8JvE1UD9AOqs
yvJ+QYp+6viEkQg0Fq2agCkpWTEy/6INGvjwexHkq9zUBe/Dm0awcqg46GSY8cwA
gqaaV32hPwv4fYMsz8fH50DDIAmKjJspWTeehnaXUSmr9lHpYH/l1mHPOtCvBL2e
m52YAKF5bCQEwn1p/UsysxtTaOrLO3ZoRTpM9lAeR3SfM768lnLzpI2AcpyJ95jg
btibuy59WvCQMdbA6UneaWxaOhSAtAB3OzHauXhQzru1BXfy5VOva5YHgH+4xS9n
7aqMxG0uB9X7wcPPV9FHFv+6QnKZ1fHLf6zN0tUjoXTIS6egbJqtYcTbDE8nRgoU
rwEadolEVSNnTEX3cfdueUHslMZwF+U30RG2bHSJTmUTOnVT6g1zk2hxwwARAQAB
tD5DbGV2ZXIgQ2xvdWQgKENsZXZlciBDbG91ZCdzIFNTTCBlbWFpbCkgPHNzbEBj
bGV2ZXItY2xvdWQuY29tPokCPQQTAQoAJwUCVrhskwIbAwUJB4YfgAULCQgHAwUV
CgkICwUWAgMBAAIeAQIXgAAKCRAhi4a9UnhGDwbQD/49Ol6HlYivxbxHi+uZdI2V
RoRLQ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