Create & import
Create a PostgreSQL service in the GUI, or describe it in YAML and import it through the GUI or zCLI. Both paths configure the same things; the YAML route is repeatable and versionable.
Create in the GUI
Go to your project dashboard and choose Add new service in the Services block:
The wizard asks for four things:
Version
- 18 (18.1)
- 17 (17.7)
- 16 (16.11)
- 14 (14.20)
Hostname
A unique service identifier, like db, sql, or postgresql. Maximum 25 characters, lowercase ASCII letters (a-z) and numbers (0-9) only, unique within the project.
Deployment mode
Highly Available (a 3-node cluster, recommended for production) or Single container (lower cost, no redundancy). See Deployment modes for the comparison.
Scaling profile and resources
Pick a scaling profile matched to your workload (OLTP, OLAP, or write-heavy). The profile sets the autoscaling defaults and tunes the PostgreSQL configuration; on top of it you can set the CPU mode (shared or dedicated) and minimum/maximum limits for CPU, RAM, and disk. See Scale & profiles for details.
The hostname and deployment mode are fixed once the service is created. The scaling profile and resource limits can be changed at any time.
Import with YAML
Zerops uses a YAML file to describe services declaratively. You can paste it in the GUI (Import services in the left menu of your project) or import it with the zCLI.
Add a service to an existing project
With zCLI:
The command is interactive: it lists your projects and lets you pick which one to import into. You can also pass the project ID directly with -P:
Create a new project
A project import additionally contains the project: section:
project:
name: my-project
# optional: project description and tags
description: A project with a PostgreSQL database
tags:
- DEMO
- ZEROPS
services:
- hostname: db
type: postgresql:ha@18
profile: oltp-production
# optional: override the profile's autoscaling defaults
verticalAutoscaling:
cpuMode: DEDICATED
minCpu: 2
maxCpu: 5
minRam: 2
maxRam: 24
minDisk: 6
maxDisk: 50
startCpuCoreCount: 3
minFreeRamGB: 0.5
minFreeRamPercent: 20
- hostname: dbstaging
type: postgresql:single@18
profile: oltp-staging
The project name comes from the YAML, so the command doesn't take one. If you are a member of more than one organization (called client in the GUI), pass the ID with --org-id; you'll find it under the client name on the project dashboard.
Usage:
zcli project project-import importYamlPath [flags]
Flags:
-h, --help Help for the project import command.
--org-id string If you have access to more than one organization, you must specify the org ID for which the
project will be created.
--working-dir string Sets a custom working directory. The default working directory is the current directory. (default "./")

The maximum size of an import YAML is 100 kB. A project import can mix PostgreSQL with any other service type.
Project parameters
The project: section is required for a project import. Only one project can be defined.
| Parameter | Description |
|---|---|
| name | The name of the new project. Duplicates are allowed. |
| description | Optional. Description of the new project. Maximum 255 characters. |
| tags | Optional. One or more string tags. Tags have no functional meaning, they only provide better orientation in projects. |
Service parameters
At least one service in the services: section is required.
| Parameter | Description |
|---|---|
| hostname | The unique service identifier; becomes the database hostname on the project's private network. Maximum 25 characters, lowercase ASCII letters (a-z) and numbers (0-9) only, unique within the project. Fixed after creation. |
| type | The service type, deployment mode, and version in |
| profile | Optional. The autoscaling profile: sets the autoscaling envelope and tunes the PostgreSQL configuration for your workload. Defaults to |
| profileOverrides | Optional. Only valid with |
| verticalAutoscaling | Optional. Overrides the profile's autoscaling defaults. All attributes are optional: |