# PostgreSQL on Zerops [PostgreSQL ↗](https://www.postgresql.org/) is a powerful, open-source object-relational database with a 35-year track record for reliability, robustness, and performance. On Zerops it runs as a **fully managed service**: automated encrypted backups, vertical autoscaling, optional high availability with automatic failover, and a configuration tuned to your workload, with no server to administer. ## Quick start Add a PostgreSQL service to your project with a `zerops-import.yaml`: ```yaml title="zerops-import.yaml" services: - hostname: db # type is postgresql:{mode}@{version} type: postgresql:single@18 # workload-tuned autoscaling profile profile: oltp-staging ``` Import it with the zCLI: ```bash zcli project service-import zerops-import.yaml ``` The moment the container boots you have a working database. See [Create & import](/postgresql/how-to/create) for the GUI flow and the full configuration reference. ## What you get out of the box - **A default database and user**, both named `db` (encoding `UTF8`, locale `C.UTF-8`), with a randomly generated password. - **Connection details and environment variables**, including hostname, ports, and ready-made connection strings. See [Connect](/postgresql/how-to/connect). - **Workload-tuned configuration** via the [scaling profile](/postgresql/how-to/scale#scaling-profiles) you choose (OLTP, OLAP, or write-heavy). - **Automated, encrypted backups** stored in isolated object storage. See [Manage & data](/postgresql/how-to/manage#backups). - **Vertical autoscaling** that grows and shrinks CPU, RAM, and disk with real usage. ### Supported versions ## Deployment modes Choose the reliability model when you create the service. It is set through the service `type` and is **fixed for the life of the service**. | Mode | type | What it is | | --- | --- | --- | | **Highly Available** | `postgresql:ha@N` | A 3-node cluster spread across separate physical machines, with data stored redundantly, automatic failover, and a read-replica port. Recommended for production. | | **Single container** | `postgresql:single@N` | One container, so lower cost but no redundancy. Data since the last backup is lost if it fails. Good for development and non-critical workloads. | :::tip In HA mode, route read-only queries to the replica port (`5433`) to take load off the primary. See [Scale & profiles](/postgresql/how-to/scale#high-availability) and [Connection ports and TLS](/postgresql/how-to/connect#connection-ports-and-tls). ::: ## Next steps - [Create & import](/postgresql/how-to/create) — Create a service in the GUI or with zerops-import.yaml. - [Connect](/postgresql/how-to/connect) — Ports, TLS, pooling, env vars, VPN, and management tools. - [Scale & profiles](/postgresql/how-to/scale) — Autoscaling, workload profiles, and high availability. - [Manage & data](/postgresql/how-to/manage) — Users, extensions, backups, and export/import. ## Need help? Stuck, or want to share what you built? Our core team and community are on Discord. - [Discord](https://discord.com/invite/WDvCZ54) — Join the Zerops community on Discord. Ask questions and share your tips. - [zCLI](/references/cli) — Get more out of Zerops with the command-line tool.