Skip to main content
Creates a PostgreSQL service in the effective organization. Because a service is billable, the command asks for confirmation unless you pass --yes.

Required flags

string
required
Name for the new service. Must be unique within the organization.
integer
required
CPU in millicores. 1000 is one vCPU, so 250 is a quarter and 2000 is two.
integer
required
Memory in MiB, for example 1024 for 1 GiB.
integer
required
Storage in GiB.

Optional flags

Anything you leave out is left out of the request, and the server applies its own default.
string
PostgreSQL version. One of postgres-14, postgres-15, postgres-16, postgres-17 or postgres-18.
integer
Number of replicas, 1 or more. Each replica is a full copy, so it uses the same CPU, memory and storage again.
boolean
Turn scheduled backups on. Use --no-backup-enabled to turn them off.
integer
How many days to keep scheduled backups. Your plan sets the maximum; see Plans and pricing.
string
When scheduled backups run, in cron format: minute, hour, day of month, month, day of week. For example, "0 2 * * *" is every day at 2:00 AM. Quote it so your shell doesn’t expand the * characters.
boolean
default:"false"
Skip the confirmation prompt. Required when there’s no terminal, for example in CI.
string
Organization to create the service in, instead of the selected one.
boolean
default:"false"
Print the result as JSON on stdout.
There is no --plan or --tier flag. Your organization’s subscription decides what you can create, and the server checks your quota.

Examples

Confirmation

The prompt names the organization and every value that will be sent:
Only y continues. Any other answer, including just pressing Enter, cancels with DECLINED (exit 2) and nothing is created. If there’s no terminal and you didn’t pass --yes, the command fails with CONFIRMATION_REQUIRED (exit 2) without sending anything.

Output

With --json:
The command returns as soon as the API accepts the request. The service is not ready yet. Poll sabaoth postgres get until status is ready.

If the result is unknown

If the request was sent but no response came back (for example, the network dropped), the service may or may not have been created. The CLI never retries a create, because a retry could create a second billable service. Instead it fails with UNKNOWN_MUTATION_OUTCOME, marked as not retryable. Run sabaoth postgres list to check whether the service exists before trying again.

Errors