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:
| Variable | What it is |
|---|---|
DASTER_URL | The address of your project's data API |
DASTER_SERVER_KEY | The project environment's server key |
DATABASE_URL | Your PostgreSQL database through the session pooler, with sslmode=verify-full (only when a pooler is configured) |
MYSQL_URL | Your SQL Database, with TLS, when the project has one |
MONGODB_URL | Your 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
- Open Project settings › Connection.
- In Your project connection, copy the block of variables:
DASTER_URL,DASTER_PUBLISHABLE_KEY,DASTER_SERVER_KEYand, when the pooler is on,DATABASE_URL(with$DB_PASSWORDin place of the password). - 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.
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.
| Service | Connects with |
|---|---|
| Database, Authentication, Storage, Realtime | The project connection |
| Hosting, functions, workers and cron | Runs inside the project |
| Domains, CDN | Automatic |
| App email | The server key, or a narrower App email key (see App email) |
| Push | Its own credential today |
| SMS, WhatsApp | Not 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.