Supabase Functions
Run Rivet workers on Supabase Edge Functions.
Supabase Edge Functions is a serverless platform: there is no long-lived process, so the control plane calls your /api/rivet endpoint to start actors. The function URL has to be public and registered.
Requirements
- A Supabase project
- The Supabase CLI configured for it
- A control plane, either Rivet Cloud or your own
Steps
Set the secrets
npx supabase secrets set \
RIVET_ENDPOINT=https://your-namespace:sk_...@api.rivet.dev \
RIVET_PUBLIC_ENDPOINT=https://your-namespace@api.rivet.dev
Both values are described in Workers.
Check the import map
deno.json must point rivetkit at @rivetkit/supabase. That keeps the deploy on the WebAssembly runtime. Without it the deploy pulls the native engine and fails with a 413, request too large.
Deploy
npx supabase functions deploy rivet
Register the URL
Set the function URL with the /api/rivet path as the serverless runner URL in the dashboard. For a function named rivet this is usually:
https://your-project.functions.supabase.co/functions/v1/rivet/api/rivet
Scaling
Supabase autoscales Edge Functions for you: there are no instances or replicas to configure. The one scaling bound you own is maxConcurrentActors on the serverless runner config, which caps concurrent actors across the whole pool and defaults to 1000. See the production checklist.
Next steps
- Production checklist
- Cloudflare Workers, the other WebAssembly-runtime target