Database Integrations
Pywa Cloud doesn’t host a database for you — an order-tracking bot, a conversation log, or anything else your bot needs to persist brings its own database, the same as any other secret (see Environment Variables & Secrets). What Pywa Cloud does do is make connecting an existing provider’s account less annoying: authorize once, and a real database gets provisioned and its connection string written into your bot for you.
Two providers are supported: Neon and Supabase (both
serverless Postgres). This is deliberately not a “pick any of five providers” list — see
Deploying a Pywa Bot for why Pywa Cloud favors real, verified integrations
over speculative ones. Redis Cloud was considered and isn’t offered: it has no OAuth flow for a
platform like Pywa Cloud to connect through on your behalf, only account API keys you’d generate
and paste in by hand — at that point there’s no advantage over creating a Redis database yourself
and setting REDIS_URL as a regular secret (see Environment Variables & Secrets).
Connect a database
Section titled “Connect a database”pywa cloud integrations connect neon# orpywa cloud integrations connect supabaseThis prints a one-time link and opens it in your browser:
To connect a neon database to this bot, open:
https://oauth2.neon.tech/oauth2/auth?client_id=...
This link expires at 2026-09-04T12:15:00Z and can only be used once.Log in to (or create) your account with the provider and authorize Pywa Cloud. When it finishes,
Pywa Cloud automatically provisions a new database project and saves the resulting connection
string as this bot’s DATABASE_URL secret — never readable back once set, same as any other
secret. For Supabase, provisioning a brand-new project takes a little time to come up, so the
connect page waits (up to 90 seconds) for it to become active before finishing; if your account
belongs to more than one Supabase organization, the platform operator needs
PYWA_CLOUD_SUPABASE_ORGANIZATION_SLUG configured so it knows which one to provision into.
Check what’s connected at any time:
pywa cloud integrations list# neon connected# supabase not connectedUsing it in your code
Section titled “Using it in your code”import osimport psycopg # or your driver of choice
conn = psycopg.connect(os.environ["DATABASE_URL"])Nothing Pywa-specific here — DATABASE_URL is a plain env var like any other secret this platform
injects, in the standard postgres://user:password@host/dbname shape.
What this doesn’t do
Section titled “What this doesn’t do”Connecting a database doesn’t trigger a redeploy on its own — your running container doesn’t see
the new DATABASE_URL until your next real pywa deploy. This is deliberate: an unprompted
redeploy is a real side effect (a brief downtime window, per
Deploying a Pywa Bot’s redeploy strategy) that shouldn’t happen as a
surprise side effect of authorizing a database connection.
This also isn’t a managed-database product — Pywa Cloud never sees your database’s actual data, only the connection string, and has no involvement in backups, scaling, or billing for it beyond what you already have with the provider directly.