Connect once

One connection per project; every DASTER service you add uses it without a new key.

Last updated

You connect an app to a project once. Every DASTER service you add to that project then works with the same connection: you do not create a key per service or copy settings between services.

Apps hosted on DASTER

Apps you deploy with Hosting get the connection by themselves. No click is needed. At every deployment, once Backend Cloud is ready in the project's environment, the app receives:

VariableWhat it is
DASTER_URLThe address of your project's data API
DASTER_SERVER_KEYThe project environment's server key
DATABASE_URLYour PostgreSQL database through the session pooler, with sslmode=verify-full (only when a pooler is configured)
MYSQL_URLYour SQL Database, with TLS, when the project has one
MONGODB_URLYour Document Database, with TLS, when the project has one
  • A variable you already set yourself under one of these names is kept.
  • Preview deployments never receive the connection.

DATABASE_URL reaches the database over TLS from inside the hosted app. The pooler is not open to the internet, so only apps hosted on DASTER can use it today.

Warning: When you rotate or revoke the server key, DASTER does not redeploy your hosted apps for you yet. Redeploy each live app that uses the key before the old key's overlap ends, or it keeps the old value and its requests start failing.

Apps hosted somewhere else

  1. Open Project settings › Connection.
  2. In Your project connection, copy the block of variables: DASTER_URL, DASTER_PUBLISHABLE_KEY, DASTER_SERVER_KEY and, when the pooler is on, DATABASE_URL (with $DB_PASSWORD in place of the password).
  3. Paste it into your app's environment once.

DASTER_URL and the keys work from anywhere. DATABASE_URL does not work from outside DASTER yet, because the pooler accepts connections only from apps hosted on DASTER; use the data API for now.

If the project has no keys yet, choose Create project keys first. The server key is shown once; see Project keys.

Terminal
DASTER_URL=…
DASTER_PUBLISHABLE_KEY=daster_pk_dev_…
DASTER_SERVER_KEY=daster_sk_dev_…

Which services use it today

The Services using it card on Project settings › Connection lists each service in the project and how it connects.

ServiceConnects with
Database, Authentication, Storage, RealtimeThe project connection
Hosting, functions, workers and cronRuns inside the project
Domains, CDNAutomatic
App emailThe server key, or a narrower App email key (see App email)
PushIts own credential today
SMS, WhatsAppNot available yet

Note: The server key also sends and reads App email. Push still uses its own credential: folding it into the one project connection is not available yet.

Disconnect a hosted app

A hosted app's Backend Cloud connection can be removed from the service's page. It then stays off until you connect it again; DASTER does not add it back at the next deployment.