CDN Domains
The hostnames viewers reach the proxy fleet by. A domain names the whole fleet, not a node: it resolves to every proxy that is serving, every proxy serves it with the certificate the API issued for it, and links are minted on the primary; the others are warm fallbacks, promoted by hand. All endpoints require admin privileges; a project API key gets 403.
See CDN domains in the guide for how domains, DNS and certificates fit together, and why the CDN is best kept on domains of its own.
| Method | Endpoint | Description |
|---|---|---|
GET | /api/cdn-domains | List the domains |
POST | /api/cdn-domains | Add a domain |
PATCH | /api/cdn-domains/{id} | Promote a domain, or change its Cloudflare mode |
DELETE | /api/cdn-domains/{id} | Delete a domain |
POST | /api/cdn-domains/{id}/certificate | Issue its certificate now |
The CDN Domain Object
{
"id": 1,
"hostname": "examplecdn.com",
"isPrimary": true,
"cloudflareProxied": null,
"hasCertificate": true,
"certificateExpiresAt": "2027-03-02T08:14:55+00:00",
"certificateError": null,
"createdAt": "2026-12-02T08:12:31+00:00"
}| Field | Type | Notes |
|---|---|---|
id | integer | The domain's identifier in every URL below |
hostname | string | The name, lowercase |
isPrimary | boolean | The domain new links are minted with. Exactly one domain is the primary while any exists |
cloudflareProxied | boolean | null | Whether its records are behind Cloudflare's proxy: true proxied, false DNS only, null follows the installation's setting (proxied in Cloudflare DNS) |
hasCertificate | boolean | Whether the edges have a certificate to serve it with. An edge refuses a name it has none for, at the TLS handshake |
certificateExpiresAt | string | null | When the current certificate expires. It is renewed with a third of its lifetime left |
certificateError | string | null | Why the last issuance failed — lego's own last lines, or a missing Cloudflare token — until one succeeds. A failed renewal leaves the current certificate serving |
createdAt | string |
The private key is never returned.
List Domains
GET /api/cdn-domainsResponse:
{
"data": [
{ "id": 1, "hostname": "examplecdn.com", "isPrimary": true, "…": "…" },
{ "id": 2, "hostname": "examplecdn.net", "isPrimary": false, "…": "…" }
],
"meta": {
"addresses": ["203.0.113.10", "203.0.113.11"],
"cloudflareConfigured": true,
"tls": true
}
}The primary first, then the fallbacks oldest first. meta.addresses are the public addresses every domain should resolve to (the proxies in the serving set), for an operator who keeps the records by hand. meta.cloudflareConfigured says whether a Cloudflare token is stored, without which records are not managed and certificates cannot be issued. meta.tls says whether the edges terminate TLS: false on a plain-HTTP installation, whose domains need no certificate.
Create a Domain
POST /api/cdn-domainsRequest Body:
{
"hostname": "examplecdn.com",
"cloudflareProxied": null
}| Field | Type | Required | Notes |
|---|---|---|---|
hostname | string | Yes | A DNS name of at least two labels — letters, digits and hyphens, nothing else — up to 253 characters, not already a domain. It is written into every edge's nginx config, into the playback URLs and into the certificate request, so anything else is refused |
cloudflareProxied | boolean | null | No | See the object. Defaults to null |
Response 201: { "data": { /* CDN Domain */ } }. The first domain becomes the primary; any later one is a fallback until it is promoted, which on an HTTPS installation waits for its certificate.
Saving is all there is to do. On an HTTPS installation its certificate is requested in the background and pushed to every proxy when it arrives, usually within a couple of minutes — watch hasCertificate — and only then are its records pointed at the fleet in Cloudflare, since every edge would refuse the name before. Without a Cloudflare token the issuance fails at once and records why in certificateError. A plain-HTTP installation (a development panel) issues nothing, and points the domain's records at the fleet straight away.
Update a Domain
PATCH /api/cdn-domains/{id}Request Body:
{ "isPrimary": true }| Field | Type | Notes |
|---|---|---|
isPrimary | true | Promotes the domain to primary; the old primary becomes a fallback in the same transaction. Only true is accepted: a primary is replaced by promoting another. 422 on an HTTPS installation while the domain has no certificate |
cloudflareProxied | boolean | null | Changes its Cloudflare mode, applied to its records at once; null goes back to the installation's setting. Absent leaves it as it is |
The name cannot be changed: a new name is a new domain, with its own records and certificate.
Response: { "data": { /* CDN Domain */ } }.
Delete a Domain
DELETE /api/cdn-domains/{id}Removes the records NukeVideo created for it in Cloudflare (never anyone else's) and stops the edges serving it. Deleting the primary promotes the oldest remaining domain that has a certificate (the oldest of all when none has); deleting the last one leaves nothing to mint links with, and playback and download mints answer 503 until a domain is added. Links already handed out on a deleted domain stop working once its name no longer reaches the proxies.
Response: { "message": "Domain deleted" }.
Issue a Certificate
POST /api/cdn-domains/{id}/certificateRequests the domain's certificate now rather than at the hourly renewal: a first try after storing the Cloudflare token, a retry after fixing what certificateError reported, or a renewal of one that is not due yet. The issuance runs in the background — a DNS challenge waits for its record to propagate — and is tried once. At most one is queued per domain: a second request while one is waiting or running is dropped. Issuances of different domains run one after the other, since they share one ACME account. On success the certificate replaces the current one on every proxy and certificateError is cleared; on failure certificateError says why.
Response 202: { "message": "Certificate requested" }. 422 on a plain-HTTP installation, whose edges serve no TLS and need no certificate, and when no Cloudflare token is stored (see meta.cloudflareConfigured).
Delivery Settings
How the edges sign, restrict and fetch what they deliver — CDN → Delivery in the panel. One set for the whole installation. Admin only.
GET /api/cdn-settings
PATCH /api/cdn-settings| Field | Type | Description |
|---|---|---|
tokenSecret | string | Hex in whole bytes, up to 512 digits. Signs every link; the proxies validate with it. Left out or null keeps the stored one. |
tokenName | string | Required on PATCH. The query parameter carrying the token: lowercase letters, digits and _. |
tokenWindow | integer | Required on PATCH. Default link lifetime in seconds, when a mint sets no expiresIn. |
bindIp | boolean | Bind playback links to the viewer's IP (see IP binding). |
allowedDomains | string[] | Sites whose pages may use the links (see Allowed domains). [] lifts the restriction. |
allowNullOrigin | boolean | Let a null/file:// origin through the allowed-domains check, for TV and WebView apps. |
edgeS3.accessKeyId | string | A read-only S3 key for the proxies; "" goes back to the main key. |
edgeS3.secretAccessKey | string | Write-only: required with a new accessKeyId, and never returned — the response says edgeS3.secretConfigured instead. |
A field a PATCH leaves out keeps its stored value, so a script that saves one setting cannot switch another protection off. The token secret and name, the allowed domains, the null origin and the proxy S3 key reach the edges at their next deploy — until then a link signed with a new secret or name is refused. The lifetime and IP binding apply to links minted from then on, with no redeploy.
Response: the settings as stored, in the shape above (without edgeS3.secretAccessKey).