Can I run openWA inside Supabase? #1004
Replies: 1 comment 1 reply
|
Hi @sakibstime 👋 Short answer: OpenWA can't run as a process inside Supabase, but it can use Supabase as its database and media storage. Here's the detail. What won't workOpenWA is a long-running daemon (Node.js/NestJS) that keeps a WhatsApp session alive and handles the QR pairing flow. The default engine runs a full Chromium instance per session, and even the lightweight Baileys engine maintains a persistent WebSocket. Supabase provides managed Postgres, Storage, Auth, and short-lived Edge Functions — none of those are meant to host an always-on process like OpenWA. So OpenWA itself still needs to run somewhere that stays up: the simplest option is the provided Docker setup on your VPS. What will workYou can point OpenWA at your Supabase Postgres and Storage instead of its built-in backends. OpenWA supports external Postgres and S3-compatible storage out of the box. 1. Use Supabase Postgres as the database In your OpenWA environment ( DATABASE_TYPE=postgres
DATABASE_HOST=db.<your-project>.supabase.co # or your self-hosted Postgres host
DATABASE_PORT=5432
DATABASE_USERNAME=<your-supabase-user>
DATABASE_PASSWORD=<your-supabase-password>
DATABASE_NAME=postgres
POSTGRES_SCHEMA=openwa # optional, keeps tables isolated
DATABASE_SSL=true
DATABASE_SSL_REJECT_UNAUTHORIZED=true
2. Use Supabase Storage for media (optional) Supabase exposes an S3-compatible API, so OpenWA's S3 storage mode works with it: STORAGE_TYPE=s3
S3_ENDPOINT=https://<your-project>.supabase.co/storage/v1
S3_ACCESS_KEY_ID=<your-supabase-storage-key>
S3_SECRET_ACCESS_KEY=<your-supabase-storage-secret>
S3_BUCKET=<your-bucket-name>
S3_REGION=us-east-1 # set to your regionA couple of practical notes
TL;DRRun OpenWA in Docker on your VPS, and point it at Supabase for Postgres and (optionally) Storage. OpenWA itself can't live inside Supabase, but it integrates cleanly with the services Supabase provides. Hope that helps — happy to go deeper on any of the config if you need it. 🙌 |
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I have Supabase installed on my VPS. Can OpenWA run properly with Supabase?
Thank you.
All reactions