Custom certificates
Use a custom certificate when Let’s Encrypt won’t work for you: corporate CA, internal-only domain, mTLS, or a cert issued by an external ACME tool.
When to pick this
Section titled “When to pick this”- A corporate or private CA issues your certs.
- mTLS where the server cert chain is fixed.
- Cert lifecycle is owned by another system (Vault, cert-manager, manual).
Prepare PEM files
Section titled “Prepare PEM files”Both must be PEM-encoded. Bundle the leaf cert plus any intermediates in cert.pem.
cat leaf.pem intermediate.pem > fullchain.pemMark the endpoint as custom
Section titled “Mark the endpoint as custom”services: web: image: myapp:latest labels: simpledeploy.endpoints.0.domain: "myapp.example.com" simpledeploy.endpoints.0.port: "3000" simpledeploy.endpoints.0.tls: "custom"Deploy or redeploy. The endpoint will return TLS errors until the cert is uploaded. Custom-TLS domains are excluded from automatic certificate management (Caddy skip_certificates), so SimpleDeploy never requests a Let’s Encrypt or internal-CA cert for them, even while the cert file is missing.
Upload the cert
Section titled “Upload the cert”A cert can only be uploaded (or deleted) for a domain that is one of the app’s saved endpoints. If you just added or renamed the endpoint, save it first.
- Open the app in the dashboard.
- Endpoints tab, expand
myapp.example.com. - Click Upload certificate, paste the cert and key as PEM.
- Save. SimpleDeploy reloads the proxy and the endpoint serves the new cert right away.
curl -X PUT https://manage.example.com/api/apps/myapp/certs/myapp.example.com \ -H "Authorization: Bearer $SD_API_KEY" \ -H "Content-Type: application/json" \ -d "$(jq -n \ --arg cert "$(cat fullchain.pem)" \ --arg key "$(cat privkey.pem)" \ '{cert: $cert, key: $key}')"Replace or delete
Section titled “Replace or delete”Re-uploading overwrites the cert and key files and forces a proxy reload, so new TLS handshakes use the new cert. Connections already open keep the old cert until they reconnect. If the reload fails (for example the key does not match the cert), the API returns an error and the proxy keeps serving its previous config.
curl -X DELETE https://manage.example.com/api/apps/myapp/certs/myapp.example.com \ -H "Authorization: Bearer $SD_API_KEY"Deleting also forces a proxy reload. After deletion the domain serves TLS errors (other domains are unaffected; the proxy logs a missing-cert warning and keeps reloading normally). Upload a new cert or switch the endpoint back to auto.
Cert files edited directly on disk (in the app’s certs/ directory) are picked up on the next route refresh or deploy, since the proxy compares each cert file’s size and modification time before deciding to reload.
See also: TLS and HTTPS.