Private connections between applications, Jobs, databases, and cache
A private connection creates a private, one-way path between resources in the same organization. The source (an HTTP application or a scheduled Job) calls the target (an HTTP application, a database, Valkey, or RabbitMQ®) at an internal address, without going through the internet. This works even when the target is private and has no public URL, and lets you use a database without exposing it to the internet.
Sources and targets
| Role | Resources |
|---|---|
| Source (the caller) | HTTP applications and scheduled Jobs |
| Target (the receiver) | HTTP applications, PostgreSQL, MariaDB, ClickHouse, Valkey, and RabbitMQ |
Scheduled Jobs can only be a source, never a target. Databases, Valkey, and RabbitMQ are never a source. Each target is reached on the engine's standard port:
| Target | Port |
|---|---|
| HTTP application | Default HTTP port |
| PostgreSQL | 5432 |
| MariaDB | 3306 |
| ClickHouse | 9440 (native protocol, TLS); the HTTPS port 8443 is also allowed |
| Valkey | The service port, shown in the Console after the first connection |
| RabbitMQ | 5672 (AMQP), shown in the Console |
How it works
Each connection has a source (the caller) and a target (the receiver). For an HTTP application, the source calls the target at:
http://<project>.<organization-id>.zenifra.localFor a database, Valkey, or RabbitMQ, use the same address with the engine's port, for example <project>.<organization-id>.zenifra.local:5432.
<project>is a short identifier made of lowercase letters, numbers, and hyphens, set the first time the project takes part in a connection.<organization-id>is the organization's 24-character hexadecimal identifier, shown in the Console and the API. For example:http://checkout-api.6a11bedda78ad3108eb20e2c.zenifra.local.- The address uses the organization identifier to be unique, and it does not change if the project or the organization is renamed.
- The application's public traffic stays protected by HTTPS. Only calls to an application at the internal address use HTTP on the default port, because they travel only inside your organization's private network; no certificate setup is needed for them.
- The internal name is released when the project is deleted. If you recreate a project with the same name, it reuses the same address, if the name is free.
- The target's internal address appears on the map after the project becomes the target of a connection for the first time, and stays the same afterward.
TLS connection to databases and Valkey
Databases and Valkey require an encrypted connection. At the internal address the connection is encrypted, but the certificate belongs to the service's public name, so the internal address name is not verified. Use TLS without hostname verification (for example, sslmode=require). The TLS parameter name varies by client: sslmode=require is the PostgreSQL one. Credentials stay the same as the database's.
Private connection to RabbitMQ
RabbitMQ uses the same internal address as the other targets, <project>.<organization-id>.zenifra.local. At the internal address, connect on port 5672 with amqp://, without TLS: the traffic stays inside your organization's private network. The user (app), password, and virtual host (/) stay the same:
amqp://app:<password>@<project>.<organization-id>.zenifra.local:5672/See also Queues with RabbitMQ.
Read address
When a PostgreSQL or MariaDB database has replicas (plans with more than one instance), the address above points to writes and a second address serves reads:
ro.<project>.<organization-id>.zenifra.localThe read address appears on the map next to the write address. When the number of instances of a PostgreSQL or MariaDB database changes, the write and read addresses are updated automatically on the sources as soon as the new instances are ready, usually within 2 minutes; the source may be restarted to apply the change. If the update does not happen in that interval, it happens on the source's next sync (turning the connection on or off, a new deploy of the source, or recreating the target).

Database, Valkey, or RabbitMQ without public access
PostgreSQL, MariaDB, ClickHouse, Valkey, and RabbitMQ have public access on by default: the public host and port accept TLS connections. Together with private connections, you can turn that access off and keep the database reachable only by the applications and Jobs in your organization that you connected to it.
- Create a connection from each application or Job that uses the database to it, and wait for the Active status.
- On the source, switch the connection variable (for example,
DATABASE_URL,VALKEY_URL, orRABBITMQ_URL) to the internal address shown on the map, over TLS (for RabbitMQ, use the port and scheme from Private connection to RabbitMQ), and validate the connection. - On the database, Valkey, or RabbitMQ edit page, turn off the Public access card and confirm.
After that:
- private connections keep working at the same internal address;
- the public address stops accepting connections, including from admin tools and scripts outside Zenifra;
- password or credential rotation remains available; update the new credential on the sources;
- if you remove a source's connection, it loses its only path to the database.
When you turn public access back on, the database answers again on the same public host and port, and the external connection URI stays the same. Private connections are not affected.
Rules
- A connection applies only in the direction created. Connecting A to B does not let B call A.
- There is no transitive path. If A calls B and B calls C, A does not reach C.
- Without a connection, nothing changes: there is no private path between the resources. Public applications keep reaching each other through their public URL.
- Renaming the project or the organization does not change the internal address. Existing calls keep working.
- Source and target must be in the same organization (not previews) and of an allowed type: the source is an HTTP application or a scheduled Job; the target is an HTTP application, PostgreSQL, MariaDB, ClickHouse, Valkey, or RabbitMQ. The target must be ready to receive the connection; otherwise creation is refused until it is.
- There are no connections across organizations.
- Preview environments do not take part in connections.
Create a connection
- Open the organization's connections map in the Console.
- Drag from the source resource's connector to the target resource.
- Confirm the creation.
- Wait for the connection status to change from Preparing to Active. For a source application, once the restart finishes the address is available on every instance of it; a scheduled Job does not restart and uses the address on its next runs.
- From the source, use the address shown on the map: for an application, call
http://<project>.<organization-id>.zenifra.local; for a database or Valkey, connect to<project>.<organization-id>.zenifra.local:<port>with TLS; for RabbitMQ, see Private connection to RabbitMQ.
Instead of dragging, click Connect resources, pick the source and the destination, click Review connection, and confirm.



A source application may be restarted to apply the change. A scheduled Job does not restart: the change applies to its next runs.
You need permission to change outgoing connections on the source and incoming connections on the target. The organization owner has both.
Remove a connection
When you disconnect, new connections for the pair are blocked immediately. Connections that are already open are not cut by the disconnection itself, but they may end if a source application is restarted to apply the change.
If an operation fails, the connection shows the Failed status and you can try the same action again.
Arrange the map
The map has a grid. Drag a card body to change only its position: while you drag, a dashed outline shows the cell where it will snap. When you drop it, the card takes the nearest free cell without covering another card. Moving or grouping cards does not create or remove connections.

Click Save layout to keep the positions. The layout is saved separately for each user and organization.

Use the mouse wheel, or the pinch gesture on a trackpad, to zoom the map in or out between 40% and 200%. The zoom follows the cursor position. To move the map, drag an empty area of it. The Zoom out and Zoom in buttons change the zoom in 10% steps.
Next steps
- Read the Connections API reference.
- Review project configuration options.
- Learn how to configure custom domains.
RabbitMQ® is a trademark of Broadcom, Inc. in the U.S. and other countries. Zenifra is not affiliated with or endorsed by Broadcom.
Last updated on