Naijacloud
Docs

Moving from Supabase

Naijacloud reads Supabase's folder layout and runs Deno.serve handlers, so most Edge Functions deploy from the same checkout with one changed command.

3 min read

Deploy from your Supabase checkout

Run this from the folder that holds supabase/. The CLI finds supabase/functions/<name>/ by itself.

Terminal
bash
naijacloud functions deploy hello --project <your-project>

The commands map almost one to one:

SupabaseNaijacloud
supabase functions deploy hellonaijacloud functions deploy hello --project <your-project>
supabase secrets set NAME=valuenaijacloud env set NAME --service functions-runtime --project <your-project>
supabase functions listnaijacloud functions list --project <your-project>
supabase functions delete hellonaijacloud functions delete hello --project <your-project>
Deno.env.get("NAME")Deno.env.get("NAME") or process.env.NAME

The URL changes from https://<ref>.supabase.co/functions/v1/hello to the one the CLI prints, https://<your-project>-fn.naijacloud.app/functions/v1/hello. The /functions/v1/<name> part stays the same, so update the base URL in your frontend and webhooks.

Move the secrets

List what Supabase has with supabase secrets list, then set each one here. If you keep them in a local .env file, import it in one go:

Terminal
bash
naijacloud env import supabase/.env --service functions-runtime --project <your-project>

Then deploy again so the functions read them. See Secrets and variables.

What doesn't carry over yet

  • verify_jwt. Functions don't check a Supabase JWT for you. Every function is public, so check the token in your code.
  • Supabase's own variables. Supabase sets SUPABASE_URL, SUPABASE_ANON_KEY and SUPABASE_SERVICE_ROLE_KEY for you. If a function still talks to Supabase, set the ones it reads with naijacloud env set.
  • Schedules. A function Supabase ran on a schedule, or through pg_cron, becomes a cron job here.

Moving the database and storage too? The Supabase migration guide covers the whole app.