Applying an SSL Certificate to your Vultr Load Balancer enhances the security of your traffic by encrypting data transmitted between clients and your load balancer. By adding a private key, certificate, and certificate chain, you can ensure secure communications and improve trustworthiness for your users.
Follow the steps below to apply an SSL certificate to your Vultr Load Balancer using the Vultr Customer Portal, API, or CLI.
Navigate to Products and click Load Balancer.
Click your target Load Balancer to open its management page.
Click Configuration.
Click SSL Certificate.
Add Private Key.
Add Certificate.
Add Certificate Chain.
Click Save Changes.
Send a GET
request to the List Load Balancer endpoint and note the target Load Balancer's ID.
$ curl "https://api.vultr.com/v2/load-balancers" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Send a PATCH
request to the Update Load Balancer endpoint to apply an SSL certificate to the target Load Balancer.
$ curl "https://api.vultr.com/v2/load-balancers/<loadbalancer-id>" \
-X PATCH \
-H "Authorization: Bearer ${VULTR_API_KEY}" \
-H "Content-Type: application/json" \
--data '{
"ssl": {
"private_key": "-----BEGIN PRIVATE KEY-----\nYOUR_PRIVATE_KEY_HERE\n-----END PRIVATE KEY-----",
"certificate": "-----BEGIN CERTIFICATE-----\nYOUR_CERTIFICATE_HERE\n-----END CERTIFICATE-----",
"chain": "-----BEGIN CERTIFICATE-----\nYOUR_CHAIN_CERTIFICATE_HERE\n-----END CERTIFICATE-----"
}
}'
List the available Load Balancers and note the target Load Balancer's ID.
$ vultr-cli load-balancer list
Apply SSL certificate to target Load Balancer.
$ vultr-cli load-balancer update <loadbalancer-id> \
--ssl-private-key "-----BEGIN RSA PRIVATE KEY-----\n...YourPrivateKey...\n-----END RSA PRIVATE KEY-----" \
--certificate "-----BEGIN CERTIFICATE-----\n...YourCertificate...\n-----END CERTIFICATE-----" \
--certificate-chain "-----BEGIN CERTIFICATE-----\n...YourCertificateChain...\n-----END CERTIFICATE-----"