Configuration
Connect your hosted app to its database, email and other services while keeping development and production settings separate.
For a newly generated app, use Fly secrets for private runtime values and [env] in the selected Fly TOML for commit-safe settings such as the app URLs, Supabase URL and publishable key. Desktop can also manage an environment's secrets in Doppler. Local Server supplies its own settings.
Keep encryption keys across deployments so existing data remains readable. Supply provider credentials as your engines need them.
App URLs
Set API_BASE_URL to the backend's HTTPS origin and SERVE_BASE_URL to the hosted dashboard origin. For hosted development on your machine, these can be http://127.0.0.1:3000 and http://127.0.0.1:5173.
When the dashboard and backend share a Fly app, both can use the same HTTPS origin. SERVE_BASE_URL sets the dashboard origin for links and redirects. Desktop also uses it to include the dashboard in the Fly image.
Where to find Supabase keys and the email signing secret
Copy the project URL and publishable key from Supabase's Connect dialog. Copy or create the backend secret key in Settings → API Keys. All three values must belong to the same project.
SUPABASE_URLis the project URL.SUPABASE_PUBLISHABLE_KEYstarts withsb_publishable_and is safe for browser use.SUPABASE_SECRET_KEYstarts withsb_secret_and stays on the backend. It is not a database password.
Supabase-managed Auth email needs none of the backend email settings below. Only when opting into the Kit's email hook, in Authentication → Hooks, create a Send Email HTTP hook at your backend's /<WEBHOOK_PATH_PREFIX>/webhooks/supabase-auth-email endpoint. Apps without a prefix use /webhooks/supabase-auth-email. Copy its whole signing secret, including v1,whsec_, into SUPABASE_AUTH_EMAIL_HOOK_SECRET.
The hook must be reachable from Supabase. For hosted development with local code, use a reachable development endpoint or tunnel. Follow Auth setup for the final callback URLs, and Supabase setup for the database schema.
Redis connection and cache encryption
Copy your provider's native Redis URL into REDIS_URL, including credentials. Use rediss:// if TLS is required. A REST endpoint or token is not a substitute.
rediss://default:<password>@<host>:<port>Treat a password-bearing URL as a secret. REDIS_CACHE_ENCRYPTION_KEY_B64 encrypts cached data. See Redis recovery limits before replacing or flushing the store.
Encryption key format and manual generation
CREDENTIAL_ENCRYPTION_KEY_B64 encrypts stored provider credentials. REDIS_CACHE_ENCRYPTION_KEY_B64 encrypts cached data. Each must independently decode from base64 to exactly 32 random bytes.
Generate each key independently using node -p 'require("node:crypto").randomBytes(32).toString("base64")' and save the value in your environment's secret store.
Use separate keys for development and production. Replacing the credential key without a migration prevents existing credentials from being decrypted; replacing the cache key invalidates encrypted cache entries.
For POSTMARK_SERVER_TOKEN and POSTMARK_FROM_EMAIL, follow the Postmark setup guide. It covers the shared backend connection for application emails and the optional Supabase Auth hook, plus direct SMTP as an alternative for sign-in email.
All variable names and configuration without Desktop
Use these names in the selected Fly environment.
| Service | Variable | Value |
|---|---|---|
| App URLs | API_BASE_URL | Backend URL. |
| App URLs | SERVE_BASE_URL | Dashboard URL. |
| Webhooks | WEBHOOK_PATH_PREFIX | Required for hosted deployments of new apps. Generate 12 random bytes as 16 Base64URL characters and keep the value stable across deploys. |
| Supabase | SUPABASE_URL | Project URL. |
| Supabase | SUPABASE_PUBLISHABLE_KEY | Publishable key. |
| Supabase | SUPABASE_SECRET_KEY | Backend API key. |
| Supabase | SUPABASE_AUTH_EMAIL_HOOK_SECRET | Optional signing secret for the Kit's email hook. |
| Redis | REDIS_URL | Native connection URL. |
| Redis | REDIS_CACHE_ENCRYPTION_KEY_B64 | Random 32-byte key, encoded as base64. |
| Credentials | CREDENTIAL_ENCRYPTION_KEY_B64 | Independent random 32-byte key, encoded as base64. |
| Postmark | POSTMARK_SERVER_TOKEN | Optional backend email; required with the hook or sender address. |
| Postmark | POSTMARK_FROM_EMAIL | Verified sender for optional backend email; required with its token. |
Keep backend keys and tokens out of frontend configuration. Check that the Fly environment targets the same app that holds your secrets.
The Fly TOML file identifies the app that Desktop configures. Sentry reporting and monitoring are optional.
Once configured, deploy the app. For local code that uses hosted services, supply the environment's credentials through your terminal or a gitignored .env. Development with hosted services