Skip to Content
DatabasePostgreSQL on Zenifra

Required permissions

Use the database project ID as project-id and grant only the scope for the requested action:

ActionMinimum scope
View the projectproject.read on project:<project-id>
Change the nameproject.name.update on project:<project-id>
Change the descriptionproject.description.update on project:<project-id>
Change the passworddatabase.password.rotate on database:<project-id>
Change the versiondatabase.version.update on database:<project-id>
View the connectiondatabase.connection.read on database:<project-id>
Turn public access on or offdatabase.exposure.update on database:<project-id>
Require or stop requiring TLSdatabase.exposure.update on database:<project-id>

An owner has full access in a user session. assistant, member, and organization API Keys need the specific grant. The linked-applications lookup currently uses database.password.rotate in the API contract.

Accessing the Settings

  1. In the sidebar menu, click Projects
  2. Find and click the desired database project name
  3. On the database page, click Edit project, in the top-right corner

Available Settings

Project Name

The project name can be changed at any time.

Rules:

  • Minimum: 6 characters
  • Maximum: 32 characters
  • Only lowercase letters, numbers, and hyphens

Note: Changing the name does not affect the connection address, which uses the project ID.


Project Description

The project description can be changed at any time.

Characteristics:

  • Optional field to describe the project purpose
  • Helps identify and organize your projects
  • Can include information such as environment, customer, or purpose

Database Password

You can renew the password of the PostgreSQL app user at any time. You do not choose the new password: Zenifra generates a random one.

How to change it:

  1. In the password section, request a new password
  2. Confirm the action
  3. Copy the new password shown and store it safely; it is shown only once

Warning: The database may be unavailable during the process.

Important: Linked applications are not updated automatically. The console lists those applications; manually update the connection variable (for example, DATABASE_URL) in each one.


PostgreSQL Version

The PostgreSQL version can be updated.

Available versions:

  • PostgreSQL 15
  • PostgreSQL 16
  • PostgreSQL 17
  • PostgreSQL 18

The console only offers versions newer than the current one.

How to update:

  1. Select the desired new version
  2. Click Save

Warning: Version upgrades can cause brief periods of downtime. We recommend making the change during low-traffic hours.

Important: PostgreSQL version downgrade is not supported. Export your data with pg_dump before upgrading and test the application with the new version.


Connection String

The connection string is generated automatically and can be viewed at any time, with the password masked.

Format:

postgresql://app:<password>@postgresql-<project-id>.managed.zenifra.com:<port>/app?sslmode=require

With 2 to 6 instances, the console also shows a read-only string that routes queries to the replicas.

To copy: Click the copy button next to the connection string.

Tip: Use this string in your application's DATABASE_URL environment variable to connect to the database.


Public access

By default, the host and port in the connection string accept connections from anywhere, always over TLS. If the database only serves applications in your organization, you can turn public access off and use only private connections between applications.

To turn it off:

  1. Create the private connections for the applications that use the database and switch their connection variable to the internal address <project>.<organization-id>.zenifra.local:5432, over TLS, as described in TLS connections to databases
  2. On the project edit page, find the Public access card
  3. Turn public access off and confirm the action
  4. On the database page, the connection card now shows the Public access off notice

To turn it back on:

  1. In the Public access card, turn public access on and confirm
  2. The database accepts connections again on the same host and the same port; the external connection string stays the same

Warning: while public access is off, admin tools, local scripts, and applications outside Zenifra can no longer connect to PostgreSQL. Private connections between applications keep working, and password rotation remains available.

Note: the database must be running, and the change is not accepted while another operation is in progress on the project.


TLS

TLS encrypts everything between your application and the database: password, queries, and data. We recommend keeping it on. By default, the database requires TLS.

To stop requiring TLS:

  1. On the project edit page, find the TLS card
  2. Turn the Require TLS switch off
  3. Confirm with Stop requiring TLS

When it is off, the database also accepts unencrypted connections, for drivers that do not use TLS. The connection strings in the Console still use TLS. Connections without TLS travel in the clear over the internet: turn it off only if your application cannot use TLS.

To require TLS again:

  1. In the TLS card, turn the Require TLS switch on
  2. From then on, connections without TLS are rejected with an error that contains no encryption

Note: the database must be running, and the change uses the same permission as public access (database.exposure.update). If the change fails, the previous state is kept.


Scalability (Instances)

In hourly billing, you can increase or decrease the total number of database instances while the database is running. On monthly or yearly contracts and on the db-free plan, the count cannot be changed.

Limits:

  • Minimum: 1 instance
  • Maximum: 6 instances

Impact:

  • More instances = higher availability
  • More instances = higher cost
  • Additional instances offer automatic failover
  • Secondary instances can be used through the read-only string, reducing load on the primary instance

Note: For projects with more than 1 instance, automatic failover is enabled. If the primary instance fails, a secondary instance takes over automatically.


Storage

Database storage can be adjusted.

Limits:

  • Minimum: 1 GB
  • Maximum: 250 GB

Impact:

  • For hourly projects: storage can be increased
  • For monthly/yearly contracts: storage is set at purchase and cannot be changed during the contract
  • On the db-free plan: fixed at 1 GB

Warning: Storage reduction is not supported, and increases may cause temporary downtime. Make sure to allocate enough space for your data.


Plan

In hourly billing, you can change the database plan in the project edit page. On monthly or yearly contracts, the plan cannot be changed during the contract, A database on db-free (legacy plan) can move to a paid plan in any billing mode, but cannot go back to db-free. The change may cause temporary downtime.

Automatic renewal

On monthly and yearly contracts, the project edit page lets you enable or disable automatic contract renewal. Only the organization owner can change this option.


Project Actions

Stop the Project

When you stop the project:

  • The database is stopped
  • Database instances are shut down
  • The project becomes inaccessible
  • For hourly projects, plan billing stops, but storage costs continue

When to use it:

  • When you do not need the database temporarily
  • To save costs on hourly projects

Start the Project

To start a stopped project:

  • The database starts again
  • Database instances are initialized, with the same count the database had when it was stopped
  • The project becomes accessible again
  • For hourly projects, billing resumes

Delete the Project

Deletion is permanent and irreversible.

What happens:

  • All database instances are removed
  • All data is deleted

Warning: after you delete the project, its backups are kept for the plan's retention period and then permanently removed (Automatic backups). Export your data with pg_dump before deleting. This action cannot be undone.


Next Steps


FAQ

Can I change the database password?

Yes. At any time through the project settings; Zenifra generates the new password and shows it only once. Remember to update the connection variable in the applications that use the database.

Does changing settings cause downtime?

It depends on the change:

  • Password: May cause downtime during the process
  • PostgreSQL version: May cause brief downtime
  • Instances: May cause temporary downtime
  • Storage: May cause temporary downtime
  • Plan: May cause temporary downtime

Can I restore a deleted database?

No. Deletion is permanent, but automatic backups are kept for the plan's retention period (3, 7, 14, or 30 days) and can be restored by support within that window. After that they are permanently removed. Export your data before deleting.

What happens if the primary instance fails?

For projects with more than 1 instance, automatic failover occurs:

  • A replica is promoted to primary
  • The connection keeps the same host and port
  • Open connections can be closed during the switch; configure your application to reconnect automatically

How do I back up my database?

Zenifra makes automatic backups, included in your plan, and restores are requested from support (see Automatic backups). As an extra layer, export your data periodically with pg_dump, store the copies outside the project, and test restores.

Can I connect external applications to the database?

Yes, while public access is on, which is the default. Use the connection string provided in the settings; the string uses TLS. Database projects do not provide whitelist or blacklist controls. If no client outside Zenifra needs the database, turn public access off and connect your applications through private connections.

Last updated on

On this page