---
title: "White-label branding"
description: "Brand one organization at runtime (Enterprise) with its name, logo, colours, white label and a custom sign-in domain, or rebrand a whole deployment."
---

There are two kinds of branding, and they do not compete:

- **Per organization, at runtime (Enterprise).** An organization's admin sets
  its own product name, logo, colours and support contact in **Settings →
  Branding**, optionally turns on white label, and can give its people their
  own sign-in address. Nothing is rebuilt and nothing is restarted: the change
  shows on the next page load for everyone in that organization, in the
  dashboard, in the mail the organization's members receive, and in the NHI
  Security console.
- **Per deployment, at build time.** An operator renames the whole deployment
  with environment variables and dashboard build arguments. Every organization
  on it sees that identity unless it has its own.

## Per-organization branding

Needs the `custom_branding` plan feature, which the Enterprise plan includes. A
partner who resells the product to its own customers gets it as an
entitlement override on each customer organization; there is no separate
partner plan. Owners and admins (`organization:manage`) change it; every
member sees the result.

| Setting | Rules |
|---|---|
| Product name | Up to 64 characters. Empty shows the deployment's name |
| Logo | PNG or JPEG, judged by the file's bytes rather than its name or type, at most 256 KiB, 16 to 1024 pixels on each side. **SVG is refused**, because an SVG can carry script. Square works best |
| Primary colour | `#RRGGBB`. Buttons, links, selection and the focus ring |
| Accent colour | `#RRGGBB`, optional (the primary when empty). Secondary actions |
| Support email and URL | One plain address; an `https://` URL |
| White label | Removes every mention of the deployment's product. Needs a product name |

### Colours are checked against WCAG AA

A colour is refused, with the ratio in the message, when:

- neither a white label nor the light theme's text colour reaches **4.5:1** on
  it as a button (the fill is the same in both themes, so this holds in both);
- the primary is under **4.5:1** on the light theme's page and surface, where
  it is the link colour;
- the accent is under **3:1** there, where it is a focus ring.

The dark theme's variants are not asked for. They are derived by raising the
colour's lightness until it clears the same thresholds on the dark theme's
page and surface, so no stored colour can leave either theme illegible. The
settings page lists every pairing with its ratio, and the API returns the same
list (`contrast` on `GET /api/v1/settings/brand`).

### Where it shows

| Surface | What changes |
|---|---|
| Dashboard | Wordmark and logo, the browser tab title and icon, the colour tokens in both themes, the product names in the product switcher and in copy |
| Mail to the organization's members (invitations, finding alerts, policy failures, SLA, trial and AI-credit notices) | The From display name (the address stays the deployment's, so SPF and DKIM still pass), the logo, the button colour, the footer's support contact, and links on the organization's verified custom domain |
| NHI Security console, signed in through the dashboard | Product name, logo, support contact, accent and tab title |
| Sign-in page on the organization's custom domain | Name, logo and colours, before anyone has signed in |

Account mail that belongs to no organization (address verification, password
reset) keeps the deployment's brand.
Mail links and the logo point at the organization's verified custom domain.
Until it has one, they point at the deployment's own address, so a
white-labelled organization's mail is free of the deployment's name only once
its domain is verified.

### White label

Off, an organization's console and mail show its own name and add a small
"Powered by" line naming the deployment's product. On, nothing a member can
read names the deployment's product: the support-access card says "Platform
support", the Help menu offers the organization's support contact instead of
the deployment's documentation, and the NHI Security console drops the
deployment's documentation link and support address. Tests render the
dashboard shell, an invitation email and the NHI Security console under a
foreign white-label brand and fail if `TRUSTIVAN`, `TrustOwl` or `trustowl`
appears.

What white label does not rename is listed under
[What cannot be rebranded](#what-cannot-be-rebranded): identifiers that are
stored, signed or typed, such as database roles, cookie names and Go packages,
keep their spelling. So do the names of artefacts a member copies from a setup
dialog, such as the `trustivan-collector` IAM role and service account and the
`trustivan-runtime` Helm chart, because they name published files.

### If the plan lapses

The brand stops applying and the deployment's brand shows again. Nothing is
deleted, and nobody is locked out: the custom domain stops mapping to the
brand, and sign-in still works on the deployment's own address. Removing a logo
and releasing a domain never need the plan.

## Custom sign-in domain

An organization can give its people their own address, such as
`security.example.com`, that shows its brand on the sign-in page.

1. **Claim it.** In **Settings → Branding → Custom sign-in domain**, enter the
   hostname. The deployment's own domain and its subdomains are refused.
2. **Prove it.** Publish the TXT record the page shows:
   `_domain-verification.<hostname>` with the value
   `domain-verification=<token>`. A job checks every unverified domain every
   five minutes; **Check now** checks at once. Only one organization can hold a
   hostname verified; a claim alone blocks nobody.
3. **Point it.** A CNAME (or A/AAAA records) for the hostname to the
   deployment's edge. The certificate is obtained when the first visitor
   arrives (below).

Sign-in methods that hand off to another site (single sign-on, GitHub,
Google) return to the deployment's own address, because that is the callback
registered with the provider, and passkeys are bound to `WEBAUTHN_RP_ID`.
Password sign-in completes on the custom domain.

### Serving custom domains at the edge

Custom domains need an edge that can obtain a certificate for a hostname it
has never seen, and only for hostnames an organization has proven. With Caddy
that is [on-demand TLS](https://caddyserver.com/docs/automatic-https#on-demand-tls)
with an `ask` endpoint. The API serves one:

`GET /internal/tls/ask?domain=<hostname>` answers **200** only for a verified
custom domain whose organization still has `custom_branding`, and **404** for
anything else, so the edge never requests a certificate for a name nobody
proved. It is outside `/api/v1` and should be reachable only from the edge
(on the internal network, as below).

```caddy
{
	on_demand_tls {
		ask http://api:8080/internal/tls/ask
	}
}

# Every hostname not named elsewhere in this file: organizations' custom domains.
https:// {
	tls {
		on_demand
	}
	encode zstd gzip
	# The dashboard serves the pages and proxies /api and /nhi itself, so a
	# custom domain needs no other route.
	reverse_proxy dashboard:3000
}
```

`api` and `dashboard` are the Compose service names; use your own. Keep your
deployment's named sites above the catch-all. Do not publish
`/internal/tls/ask` through the edge.

## Per-deployment branding

### What can be rebranded

| Surface | Where it is set | When it takes effect |
|---|---|---|
| Product name in API messages, mail, exports and the authenticator-app issuer | `BRAND_NAME` on the API and worker | Process start |
| The dashboard, documentation and website addresses named in customer-facing text | `APP_URL`, `DOCS_URL`, `WEBSITE_URL` on the API and worker | Process start |
| Product name in the dashboard: wordmark, browser tab title and page copy | `NEXT_PUBLIC_BRAND_NAME` build argument | Dashboard image build |
| Accent colour | `NEXT_PUBLIC_BRAND_ACCENT`, `NEXT_PUBLIC_BRAND_ACCENT_DIM` build arguments | Dashboard image build |
| Logo beside the wordmark | `NEXT_PUBLIC_BRAND_LOGO_URL` build argument | Dashboard image build |
| Where the dashboard's documentation and website links go | `NEXT_PUBLIC_DOCS_URL`, `NEXT_PUBLIC_WEBSITE_URL` build arguments | Dashboard image build |

### The backend

Set these on every API and worker process and restart. Nothing is compiled in.

| Variable | Default | Purpose |
|---|---|---|
| `BRAND_NAME` | `TRUSTIVAN` | The product name in every customer-visible string the backend writes |
| `APP_URL` | `DASHBOARD_URL` when that is set, otherwise `https://app.trustivan.com` | The dashboard address named in customer-facing text |
| `DOCS_URL` | `https://docs.trustivan.com` | The documentation address, including the `documentationUri` in the SCIM service-provider configuration |
| `WEBSITE_URL` | `https://trustivan.com` | The public website address |

All three addresses must be absolute `http://` or `https://` URLs. Anything
else stops the process at startup with the variable named, because these are
printed into messages your customers follow and a typo there is found by a
customer. A trailing slash is removed.

`BRAND_NAME` reaches, among others:

- outbound mail subjects, bodies and the From display name;
- the issuer an authenticator app files a TOTP account under;
- the `User-Agent` on webhook and notification deliveries;
- the messages `kubectl` prints when the admission webhook warns or refuses;
- SCIM resource and authentication-scheme descriptions;
- the notes and disclaimers in compliance reports;
- validation and credential error messages that name the product.

A **slug** of the name is used where a string has to be a filename or an
identifier: the producer field of SBOM and audit exports, and the audit
export's filename. The slug is the name in lower case with each run of
characters other than letters and digits replaced by one hyphen, so
`Acme Secure` becomes `acme-secure`. A name with no letters or digits falls
back to `trustivan`.

Mail needs one more setting to look like yours: `SMTP_FROM` is the envelope
sender, and receivers reject mail from a domain you do not control. See
[Send mail through your SMTP relay](/how-to/configure-smtp).

### The dashboard

The dashboard's branding variables are all `NEXT_PUBLIC_`, which Next.js
inlines into the build output. **Setting them on a running container does
nothing.** They are build arguments, so a rebranded dashboard is its own image.

```bash
docker build \
  --build-arg NEXT_PUBLIC_BRAND_NAME="Acme Security" \
  --build-arg NEXT_PUBLIC_BRAND_ACCENT="217 91% 60%" \
  --build-arg NEXT_PUBLIC_BRAND_ACCENT_DIM="217 91% 24%" \
  --build-arg NEXT_PUBLIC_BRAND_LOGO_URL="https://cdn.acme.example/logo.svg" \
  --build-arg NEXT_PUBLIC_DOCS_URL="https://docs.acme.example" \
  --build-arg NEXT_PUBLIC_WEBSITE_URL="https://acme.example" \
  --build-arg API_PROXY_URL="http://api:8080" \
  -f dashboard/Dockerfile -t acme-dashboard:1.0.0 .
```

Run it from the repository root. `API_PROXY_URL` is not branding, but it is
baked in the same way and every deployed dashboard image needs it. See
[Environment variables](/configuration/environment#dashboard-build-arguments).

| Build argument | Form | Effect |
|---|---|---|
| `NEXT_PUBLIC_BRAND_NAME` | Text | The wordmark, the browser tab title, and the product name wherever the dashboard's copy mentions it |
| `NEXT_PUBLIC_BRAND_ACCENT` | A bare HSL triple, such as `217 91% 60%` | The accent colour |
| `NEXT_PUBLIC_BRAND_ACCENT_DIM` | A bare HSL triple | The accent's dim companion, used for active backgrounds |
| `NEXT_PUBLIC_BRAND_LOGO_URL` | An `http://` or `https://` URL, or a path on the dashboard's own origin | An image shown in place of the built-in mark, at 20 by 20 pixels |
| `NEXT_PUBLIC_DOCS_URL` | URL. Default `https://docs.trustivan.com` | Where the dashboard's documentation links point |
| `NEXT_PUBLIC_WEBSITE_URL` | URL. Default `https://trustivan.com` | Where sign-out lands, and the provider sign-in link on the sign-in page |

Every value is validated, and an invalid one is **dropped rather than
applied**. A malformed accent leaves your customers looking at the default
palette, not at an error page. That also means a mistake is silent, so check
the result:

- **Accents are HSL triples, not hex.** Three numbers separated by spaces, the
  last two with percent signs. `#3b82f6` is dropped.
- **Logos are fetched by the browser.** `data:` and `javascript:` URLs are
  dropped. Host the image somewhere your users' browsers can reach.
- **An empty or whitespace-only name** leaves `TRUSTIVAN`.

An image built with none of these set is the ordinary TRUSTIVAN dashboard.

<Warning>
`BRAND_NAME` and `NEXT_PUBLIC_BRAND_NAME` are separate settings of separate
programs, and nothing reconciles them. Set both to the same value, or the
dashboard and the mail it triggers will disagree about what the product is
called.
</Warning>

## What cannot be rebranded

**Licence attribution.** The third-party notices shipped with the product and
the attribution line in the dashboard are fixed text that no branding value
reaches. They are an obligation of the licences TRUSTIVAN is built on, and the
obligation holds whatever logo is in the corner.

**Identifiers an operator or an integration types.** These keep their spelling
under any brand, because each one is stored, signed, matched or scripted
against:

- environment variable names;
- binary and image names;
- the database roles `trustowl_app` and `trustowl_job`;
- Prometheus metric names, which begin `trustowl_`;
- cookie names such as `trustivan_session`;
- HTTP header names, including the webhook signature headers your customers'
  receivers verify.

**The public website and this documentation.** The TRUSTIVAN website is not part
of a self-hosted deployment. Point `WEBSITE_URL`, `DOCS_URL`
and their `NEXT_PUBLIC_` counterparts at your own.

**NHI Security's own default.** The NHI Security console keeps the
deployment's brand in its own database and reads none of the variables on
this page. A standalone NHI Security deployment changes it from the operator
console: see [Change the brand](/nhi-security/platform-operators#change-the-brand).
Inside TRUSTIVAN, an organization's own brand reaches that console through the
session (above); the deployment default is the one its migrations set.

## Check the result

For an organization's brand:

1. Save a name and a colour in **Settings → Branding**. The page repaints at
   once, and the tab title shows the name.
2. Invite a test address. The mail's From name, logo, button colour and footer
   are the organization's.
3. Open NHI Security from the product switcher. Its rail shows the name and
   logo.
4. Once the domain is verified, `curl -s -o /dev/null -w '%{http_code}'
   'http://api:8080/internal/tls/ask?domain=<hostname>'` from the edge host
   prints `200`, and the sign-in page on that hostname shows the brand.

For the deployment's:

1. Load the dashboard. The wordmark and the tab title show your name, your
   logo sits beside it, and accent-coloured elements use your colour.
2. Send yourself an invitation or a password reset. The subject and the From
   display name show your name.
3. Enrol a second factor on a test account. The authenticator app files it
   under your name.
4. Export an audit log. The filename begins with your slug.

## Related

- [Environment variables](/configuration/environment#branding): the backend
  variables in the full list.
- [Send mail through your SMTP relay](/how-to/configure-smtp): the sender
  address.
- [Production Compose](/installation/production-compose): supplying your own
  dashboard image to the stack.
