Databases
Layero databases are plain PostgreSQL next to your projects: in the same organization, on servers in Moscow. You create a database in the dashboard (a shared one also with one CLI command), and give it to a project with a button — the connection string arrives in the build by itself.
Databases are in beta. Everything described in this section works, but the interface and some features are still changing. If a page differs from the dashboard, write to support.
The section is open to every organization: the «Базы данных» (Databases) item is in the dashboard menu, in the «Сервисы» (Services) group.
Shared and dedicated
| Shared database | Dedicated database | |
|---|---|---|
| Where it lives | on a shared Layero server | on a separate server just for you |
| Compute | shared CPU, «Shared CPU» in the dashboard | you choose cores, memory and disk |
| Space | 0.5 GB | 8 to 2 000 GB, the disk can grow |
| Plan | Pro only | any, no subscription needed |
| Price | included in Pro | from 1 350 ₽ a month, hourly from the balance |
| If Pro ends | access is closed after the grace period, the database is deleted 3 days later | doesn't depend on the subscription |
| How many | one per organization | as many as you need |
| How long to wait | under a minute | 7–13 minutes |
| PostgreSQL version | 18 | one of those offered, the newest by default |
| Backups | free: once a day, kept up to 7 days | paid option: 1 to 14 copies |
| Create from the CLI | yes | dashboard only |
A shared database is for getting started: click and go. It's enough for a prototype, a small site or an internal service.
A dedicated database is for when you need guaranteed resources, more space or another PostgreSQL version. You can create one right away or move a shared database onto it when it grows.
Prices and payment are on Pricing, all the limits are on Limits.
What the section can do
- Projects connect by themselves. Give a database to a project — the
connection string arrives in the
LAYERO_DATABASE_URLvariable, and the project gets its own role in the database. - Tables and relations — the database's contents by schema, rows and a relationship diagram right in the dashboard.
- SQL editor with bookmarks, history and a trial run of a query as a Data API role.
- Roles and RLS policies — who connects and which rows they see. Access can be granted for a limited time.
- Functions with a trial call and version history.
- Triggers — functions the database calls by itself on writes to a table.
- Extensions with a switch — the list is on Working in the dashboard.
- Monitoring — space, connections and load over an hour, a day or a week.
- Backups on a schedule, restore with a button, a dump to download.
- Access by address — from outside, only addresses on your list can connect to the database.
- Data API — the database over HTTP for the frontend, with no server of your own. Available on Pro, in beta.
Where to start
- Create a database — in the dashboard or with
layero db create. - Connect it to a project or connect to it yourself with the connection string.
- Look through Working in the dashboard to know where things are.
Pages in this section
- Creating a database — the dashboard wizard and the CLI.
- Working in the dashboard — every part of the database page.
- Connecting to a database — the connection string, encryption, access by address.
- Backups — schedule, restore, dump.
- Databases from the CLI —
layero dbin the terminal and in CI. - Pricing — prices, payment from the balance, deletion.
- Limits — space, connections, query time.