/domains/{name}/certificate/custom
0.1.0Unchanged since publicationInstall a custom TLS certificate for a domain
certificatesallSupply the certificate and matching private key as PEM text in cert and key. The certificate must cover the domain and still be valid. Supply the optional certificate chain as PEM text in chain. An empty chain is treated as omitted.
The API returns 400 if cert or key is missing or if cert, key, or a nonempty chain lacks a -----BEGIN marker. It returns 500 if UrbeStack cannot prepare the PEM data for installation.
UrbeStack continues installation with a warning if the certificate omits other configured names or is self-signed. For certificates that are not self-signed, UrbeStack also warns and continues if the chain is missing or fails verification.
UrbeStack sets the domain's certificate mode to custom and excludes it from automatic renewal. The 200 response returns the installed certificate record in certificate. Use DELETE /domains/{name}/certificate to remove it.
As a command
Run as root on the serverParameters
namepath ·DomainNameRequiredcertstring, up to 65536 charactersRequiredkeystring, up to 65536 charactersRequiredchainstring, up to 131072 charactersExample
See the API overview for how to set $API and $TOKEN.curl -sS -X PUT "$API/domains/example.com/certificate/custom" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"cert": "text",
"chain": "text",
"key": "panel.port"
}'200 OK{
"certificate": {
"fingerprint": "text",
"issuer": "text",
"kind": "profile",
"name": "alice",
"names": [
"text"
],
"not_after": "text",
"not_before": "text",
"reload": {},
"warnings": [
"text"
]
}
}Errors
10 errors, each a status and a sentence400--<what> is required400--<what> may not contain ..400--<what> must be an absolute plain path400Cannot read <p>: $!400Domain name required400Domain name too long400Invalid domain name400The <part> must be in PEM form401Authentication required404Domain '<name>' not foundurbestack.com/docs/api/put-domains-name-certificate-custom/