H
Hostess
CLI Commands

hostess domains

Add and manage custom domains for your Hostess projects.

Description

Manage custom domains for your Hostess projects. Custom domains let you serve your applications from your own domain names (e.g., myapp.com, api.myapp.com) instead of the default *.hostess.run URLs. Hostess automatically provisions TLS certificates for custom domains via Let's Encrypt.

All services also keep their autogenerated *.hostess.run URLs regardless of any custom domain configuration.

Every write (add, update, remove) targets a specific service in a specific environment and routes traffic immediately — no redeploy required. If the target service hasn't been deployed to that environment yet, the domain takes effect automatically on its next deploy. Each command reports which of these happened.


domains list

List all custom domains configured for a project.

Usage

Terminal
hostess domains list [flags]

Flags

FlagShortTypeDefaultDescription
--project-pstringFrom hostess.ymlProject name
--tokenstringAuth token

Examples

Terminal
hostess domains list
DOMAIN              SERVICE      STATUS       DNS
myapp.com           frontend     Active       myapp.com → ingress.hostess.run
api.myapp.com       api          Active       api.myapp.com → ingress.hostess.run
staging.myapp.com   frontend     Pending DNS  staging.myapp.com → ingress.hostess.run
Terminal
# List domains for a specific project
hostess domains list --project my-other-app

domains add

Add a custom domain to a service in your project.

Usage

Terminal
hostess domains add <domain> [flags]

Flags

FlagShortTypeDefaultDescription
--servicestringRequiredService to attach the domain to
--project-pstringFrom hostess.ymlProject name
--envstringMost recently created environment if omittedEnvironment name
--tokenstringAuth token

Examples

Terminal
# Add a domain to the frontend service
hostess domains add myapp.com --service frontend
Domain added.

Configure your DNS:
  Type:  CNAME
  Name:  myapp.com
  Value: ingress.hostess.run

Live routing updated.
Terminal
# Add an API subdomain
hostess domains add api.myapp.com --service api

# Add to a specific environment
hostess domains add staging.myapp.com --service frontend --env staging

# Add to a specific project
hostess domains add myapp.com --service frontend --project my-app

Routing Outcomes

The line after the DNS configuration reports what happened to live traffic routing:

OutcomeMeaning
Live routing updated.Traffic is routing to the new target now.
This service hasn't been deployed to this environment yet — the domain will take effect on its next deploy.Nothing to route yet; routing activates automatically on the target's next deploy.
Live routing was NOT updated.The domain was saved, but the routing update failed. Retry the command or redeploy the service to reconcile it.

DNS Configuration

After adding a domain, you need to configure a CNAME record with your DNS provider:

Record TypeNameValue
CNAMEmyapp.comingress.hostess.run
CNAMEapi.myapp.comingress.hostess.run

DNS changes can take up to 48 hours to propagate, though most providers update within minutes. Hostess will automatically detect when your DNS is configured correctly and issue a TLS certificate.

You can add a domain, deploy immediately, and configure DNS when ready. Your service remains accessible via its *.hostess.run URL while DNS is being configured.

Domain Validation Rules

  • Use a valid RFC 1123 hostname: lowercase, no wildcard, and no scheme prefix.
  • Keep domain names at or below 253 characters.
  • Use each custom domain on one Hostess service.
  • Attach custom domains to public application services.

domains update

Retarget an existing domain to a different service and/or environment.

Usage

Terminal
hostess domains update <domain> [flags]

Flags

FlagShortTypeDefaultDescription
--servicestringRetarget to this service
--envstringRetarget to this environment
--project-pstringFrom hostess.ymlProject name
--tokenstringAuth token

At least one of --service or --env is required.

Examples

Terminal
# Move a domain to a different service
hostess domains update myapp.com --service backend
Domain 'myapp.com' updated.

Live routing updated.
Terminal
# Move a domain to a different environment
hostess domains update myapp.com --service backend --env staging

DNS verification carries over when you retarget a domain — you don't need to re-verify. To point a different hostname at a service, remove the domain and add the new one; the hostname itself can't be changed in place.


domains verify

Trigger DNS verification for a domain.

Usage

Terminal
hostess domains verify <domain> [flags]

Flags

FlagShortTypeDefaultDescription
--project-pstringFrom hostess.ymlProject name
--tokenstringAuth token

Examples

Terminal
hostess domains verify myapp.com
myapp.com is verified.

If verification fails, the command shows the DNS record to point at:

myapp.com is not verified.
Point a CNAME record: myapp.com -> ingress.hostess.run

domains remove

Remove a custom domain from your project.

Usage

Terminal
hostess domains remove <domain> [flags]

Flags

FlagShortTypeDefaultDescription
--project-pstringFrom hostess.ymlProject name
--tokenstringAuth token

Examples

Terminal
hostess domains remove old-domain.com
Domain 'old-domain.com' removed.

Live routing updated.
Terminal
# Remove from a specific project
hostess domains remove staging.myapp.com --project my-app

After removing a domain from Hostess, remove the matching CNAME record from your DNS provider.


Domain Lifecycle

Here's how the domain lifecycle works from start to finish:

  1. Add domain — Run hostess domains add myapp.com --service frontend. Traffic starts routing immediately if the service is already live in that environment.
  2. Configure DNS — Add a CNAME record pointing myapp.com to ingress.hostess.run
  3. DNS verification — Hostess checks DNS periodically, or run hostess domains verify myapp.com to check immediately
  4. TLS provisioning — Once DNS is verified, Hostess automatically requests a TLS certificate from Let's Encrypt
  5. Active — Domain is live with HTTPS. All traffic to myapp.com routes to your service.

Retarget the domain to a different service or environment at any point with hostess domains update — DNS verification carries over, so status doesn't reset to step 3.

Domain Status Values

StatusDescription
Pending DNSDomain added, waiting for DNS configuration
DNS VerifiedCNAME record detected, TLS certificate being provisioned
DNS FailedDNS verification failed — check your CNAME record
ActiveDomain is fully configured with HTTPS

You can also configure domains declaratively in your hostess.yml:

hostess.yml
services:
  frontend:
    type: nextjs
    domains:
      - myapp.com
      - www.myapp.com

environments:
  staging:
    domains:
      frontend: [staging.myapp.com]
hostess domains | Hostess Docs