Skip to content

Connect to your database

Once you have provisioned a database, your services need to reach it. Helicarrier gives you two paths: an automatic internal link for service-to-service traffic, and external credentials for tools on your own machine.

  • Internal URL — how your other services reach the database over Helicarrier’s private network. It never leaves the platform, so it is fast and does not require exposing the database publicly.
  • External URL — how tools outside Helicarrier (a local psql, a GUI client, a migration script) connect. External access is off by default for safety; enable it on the database when you need it (see below).

Both are shown on the database’s Connect panel, along with the individual credentials (host, port, user, password, database name).

The cleanest way to connect an app to a database is to link them, so the connection string is injected as an environment variable automatically:

  1. On the canvas, drag an edge from your service to the database — or use the Reference a variable option on the service’s Variables tab.
  2. Helicarrier injects the right variable into your service, for example DATABASE_URL for Postgres or REDIS_URL for Redis.

Because the value is a reference (not a copied string), it always tracks the database’s current credentials — if the database is re-provisioned or its password rotates, linked services follow automatically on their next deploy. You can rename the injected key if your app expects a different name. See Service references for more.

To connect from your laptop or an external service:

  1. On the database, enable external access. By default the database only accepts connections from inside the platform (loopback-only); enabling external access exposes it off-box.
  2. Optionally turn on TLS to encrypt the connection (additive — existing plaintext connections keep working).
  3. Use the external URL and credentials from the Connect panel.

Protect your data with Backups & restore.