Out Plane
domain

domain add

Register a custom domain.

writes--dry-run

Registers a domain and, when an application is named, points it there in the same call.

The certificate is issued once DNS resolves to the record domain dns prints. There is nothing else to configure and nothing to renew.

Usage

outplane domain add <HOST> [flags]

Arguments

ArgumentTypeDescription
HOSTstringThe domain, such as app.example.com. Required.

Flags

FlagTypeDescription
--pathstringWhich route on the host, defaulting to the root. Needed only when the host carries several.
--appstringApplication to point it at.
--portintWhich of the application's ports. Optional when it serves one.

The global flags apply as well.

Output

FieldTypeDescription
idstring | null
hoststring
pathstringTrailing slashes are stripped; the root is /.
appstring | nullNull while the route points nowhere.
appIdstring | null
portIdstring | nullThe port record the route binds to.
sslboolAlways true: a certificate is issued for every custom domain.
urlstring | nullThe address the route answers on.
changedbool

Examples

A domain for an application

outplane domain add app.example.com --app checkout --port 3000

Register the host first, point it later

outplane domain add app.example.com

A second route on the same host

outplane domain add example.com --path /api --app api01 --port 8080

Check the request without registering anything

outplane domain add app.example.com --dry-run --json
{
  "changed": false,
  "host": "app.example.com",
  "path": "/"
}

What to Know

  • The host and the path together have to be unique. The same host with a different path is a second route and is allowed.
  • /.well-known/acme-challenge is refused: the platform answers certificate challenges there, and a route on it would stop the certificate renewing.
  • A TCP port cannot take a domain, and neither can an application that has never deployed successfully.
  • Adding does not make it work. DNS has to point at the record this prints, and the certificate follows once it resolves.
  • How many domains a team may have is a plan limit, so exceeding it is exit 7.

Errors

Beyond 0 for success, this command exits with:

ExitKindMeaning
2usageInvalid arguments, unknown flag, or client-side validation failure.
3authNot authenticated, token revoked or expired, or forbidden for this team.
5not_foundThe named resource does not exist, or is not visible to this credential.
7quotaPlan limit reached or payment required. Not a rate limit; retrying will not help.
8upstreamThe Out Plane API returned a server error.

The code on the error object is one of domain.host_required, domain.host_invalid, domain.path_invalid, domain.path_reserved, domain.app_required, domain.port_not_found, domain.no_ports, quota.limit_reached, app.not_found. Branch on that, or on the exit status. The message is prose and changes.

On this page