Skip to content

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.

  • 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).

Both must be PEM-encoded. Bundle the leaf cert plus any intermediates in cert.pem.

Terminal window
cat leaf.pem intermediate.pem > fullchain.pem
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.

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.

  1. Open the app in the dashboard.
  2. Endpoints tab, expand myapp.example.com.
  3. Click Upload certificate, paste the cert and key as PEM.
  4. Save. SimpleDeploy reloads the proxy and the endpoint serves the new cert right away.

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.

Terminal window
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.