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.


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 successfully!

Configure your DNS:
  Type:  CNAME
  Name:  myapp.com
  Value: ingress.hostess.run
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

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 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.
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
  2. Configure DNS — Add a CNAME record pointing myapp.com to ingress.hostess.run
  3. DNS verification — Hostess periodically checks if the CNAME is configured correctly
  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.

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]