How It Works/Service Slots

Service Slots

When setting a variable's value in the Environment tab, you can use $slot.name references. Jetpacked resolves these at deploy time by substituting the actual value from the referenced service or platform resource.

Generic database slots

These resolve to the active database when exactly one database service is provisioned:

Reference Resolves to
$db.url Full connection URL
$db.host Hostname
$db.port Port number
$db.user Username
$db.password Password
$db.name Database name

If you have more than one database service active, generic $db.* slots are left unresolved. Use the service-specific slots instead.

Service-specific slots

Use these when you have multiple database services or want to be explicit:

Reference Service
$postgres.url PostgreSQL connection URL
$postgres.host PostgreSQL hostname
$postgres.port PostgreSQL port
$postgres.user PostgreSQL username
$postgres.password PostgreSQL password
$postgres.name PostgreSQL database name
$mysql.url MySQL connection URL
$mysql.host · $mysql.port · $mysql.user · $mysql.password · $mysql.name MySQL fields
$mongodb.url MongoDB connection URL
$mongodb.host · $mongodb.port · $mongodb.user · $mongodb.password · $mongodb.name MongoDB fields
$cache.url Redis connection URL

App URL slot

Reference Resolves to
$jetpacked.url Your app's public HTTPS URL

Examples

Construct a custom connection string:

CUSTOM_DB_DSN=postgresql://$postgres.user:$postgres.password@$postgres.host:$postgres.port/$postgres.name?sslmode=require

Wire your app's public URL for NextAuth OAuth callbacks:

NEXTAUTH_URL=$jetpacked.url

Unrecognised slot names are left as-is in the generated .env file.

© 2026 Jetpacked. All rights reserved.

PrivacyTerms