Skip to main content

domain

The scloud domain command offers custom domain management for your Serverpod Cloud projects.

To add a custom domain to your linked project, run the scloud domain add command:

scloud domain add www.mydomain.com --target web

The valid targets are:

  • web: Relic server (e.g. REST API or a Flutter web app)
  • api: Serverpod endpoints
  • insights: Serverpod insights

To complete the setup, follow these steps:

  • Add a CNAME or ANAME record with the value of your domain (www.mydomain.com in the example above) to the DNS configuration for this domain.
  • Wait for the update to propagate. This can take up to a few hours.
  • Run the following command to verify the DNS record (Serverpod Cloud will also try to verify the record periodically):
scloud domain verify www.mydomain.com
  • When verification succeeds, the custom domain will shortly become active.
  • Run the following command to check the status:
    scloud domain list

Usage

Bring your own domain to Serverpod Cloud.

Get started by adding a custom domain to your project with the command:

$ scloud domain add example.com <target> --project <project-id>

The valid targets are:
- api: Serverpod endpoints
- insights: Serverpod insights
- web: Relic server (e.g. REST API or a Flutter web app)


Usage: scloud domain <subcommand> [arguments]
-h, --help Print this usage information.

Available subcommands:
add Add a custom domain to your project.
list List all custom domains.
remove Remove a custom domain.
verify Verify the DNS record for a custom domain.

Run "scloud help" to see global options.

See the full documentation at: https://docs.serverpod.cloud/references/cli/commands/domain

Sub commands

add

Add a custom domain to your project.

You need to have a domain name and a DNS provider that supports
TXT, CNAME and/or ANAME records.

You can add domains for each Serverpod server target.

The valid targets are:
- api: Serverpod endpoints
- insights: Serverpod insights
- web: Relic server (e.g. REST API or a Flutter web app)


Usage: scloud domain add [arguments]
-h, --help Print this usage information.
-p, --project (mandatory) The ID of the project.
Can be omitted for existing projects that are linked.
See `scloud project link --help`.
--name (mandatory) The custom domain name. Can be passed as the first
argument.
-t, --target=<api|insights|web> (mandatory) The Serverpod server target of the custom domain,
only one can be specified.

Run "scloud help" to see global options.

See the full documentation at: https://docs.serverpod.cloud/references/cli/commands/domain

list

List all custom domains.

Usage: scloud domain list [arguments]
-h, --help Print this usage information.
-p, --project (mandatory) The ID of the project.
Can be omitted for existing projects that are linked. See `scloud
project link --help`.

Run "scloud help" to see global options.

See the full documentation at: https://docs.serverpod.cloud/references/cli/commands/domain

remove

Remove a custom domain.

Usage: scloud domain remove [arguments]
-h, --help Print this usage information.
-p, --project (mandatory) The ID of the project.
Can be omitted for existing projects that are linked. See `scloud
project link --help`.
--name (mandatory) The custom domain name. Can be passed as the first argument.

Run "scloud help" to see global options.

See the full documentation at: https://docs.serverpod.cloud/references/cli/commands/domain

verify

Verify the DNS record for a custom domain.

Usage: scloud domain verify [arguments]
-h, --help Print this usage information.
-p, --project (mandatory) The ID of the project.
Can be omitted for existing projects that are linked. See `scloud
project link --help`.
--name (mandatory) The custom domain name. Can be passed as the first argument.

Run "scloud help" to see global options.

See the full documentation at: https://docs.serverpod.cloud/references/cli/commands/domain