Skip to main content
Platforms

Deploying to Supabase Functions

Deploy an existing Rivet project to Supabase Edge Functions.

This guide covers deploying an existing Rivet project to Supabase Edge Functions.

Prerequisites

Steps

Set up your project

Follow the Supabase Functions Quickstart to set up your project locally.

Set Secrets

Set your Rivet connection values as Supabase secrets. Find RIVET_ENDPOINT and RIVET_PUBLIC_ENDPOINT in the Rivet Dashboard under Settings → Namespace → Advanced → Backend Configuration and copy them in.

npx supabase secrets set \
  RIVET_ENDPOINT=https://your-namespace:sk_...@api.rivet.dev \
  RIVET_PUBLIC_ENDPOINT=https://your-namespace@api.rivet.dev

Deploy

Make sure the function has the deno.json import map from the quickstart that points rivetkit at @rivetkit/supabase. It keeps the deploy to the WebAssembly runtime; without it the deploy pulls Rivet’s native engine and fails with a 413 (request too large).

npx supabase functions deploy rivet

Register the Serverless Runner URL

After deploy, set the function URL with the /api/rivet path as the serverless runner URL in Rivet. For a function named rivet, this is usually https://your-project.functions.supabase.co/functions/v1/rivet/api/rivet.