Service references
A service reference links one service to another and injects a connection value as an environment variable. It is how an app finds its database, or how one service calls another, without you copying and pasting URLs.
Create a reference
Section titled “Create a reference”Two ways to link:
- On the canvas — drag an edge from the consuming service to the target.
- On the Variables tab — use Reference a variable from another service and pick the target and which value you want.
Helicarrier injects a variable into the consuming service, for example DATABASE_URL from a Postgres database, REDIS_URL from Redis, or a <SLUG>_URL for a plain web service. You can rename the injected key if your app expects a different name.
Why references beat copied strings
Section titled “Why references beat copied strings”A reference is a live link, not a snapshot. If the target’s address or credentials change — a database re-provision, a password rotation — every service that references it picks up the new value on its next deploy. Copy a raw URL instead and it silently goes stale.
Internal vs public URLs
Section titled “Internal vs public URLs”References can inject either kind of address, depending on what you need:
- Internal URL —
http://heli-<id>:<port>, reachable only inside the project’s private network. Use this for service-to-service calls; it is fast and never exposed publicly. - Public URL — the service’s
https://hostname, reachable from the browser. Use this when the value needs to be used client-side or from outside the platform.
For a database, you almost always want the internal URL. For linking a front-end to a public API, you may want the public one.
Precedence
Section titled “Precedence”A reference-set variable takes priority over the service’s own variables and over environment groups (see precedence). Because the reference controls the key, it is read-only in the Variables editor — remove the reference to set that key by hand.
- Set up the database side in Connect to your database.
- Expose a service publicly with Domains & TLS.