Edge Functions on SupaHost
How Supabase Edge Functions run on SupaHost, what's the same as Supabase Cloud, what differs (deploys, env vars, logs) and where to start.
Edge Functions are small TypeScript programs that run on Deno and answer HTTP requests. Each one gets its own URL under your project, so you can use them for work that shouldn't happen in the browser: handling Stripe webhooks, calling an API with a secret key, sending email, or running a scheduled clean-up.
SupaHost runs the same open-source Edge Runtime that Supabase uses (supabase/edge-runtime v1.78.1), so function code written for Supabase works here. What changes is how you deploy, which environment variables you get, and where you read logs.
How functions run on SupaHost
Every project that has at least one function gets a functions container on your instance. Inside it:
- A SupaHost router receives each request, checks the JWT if the function requires one, and hands the request to the right function.
- Each function runs in its own worker with up to 150 MB of memory. A worker must start sending its response within 150 seconds.
- An event worker collects console output, boot errors and request lines into the project's function log.
Functions run on your instance's VM, in the region you chose for the instance. They aren't spread across a global edge network. The functions container has a memory budget that all of a project's functions share:
| Plan | Functions container memory (per project) |
|---|---|
| Builder | 384 MB |
| Pro | 768 MB |
| Business | 1536 MB |
| Enterprise | 3 GB |
There are no per-invocation fees. Function traffic counts toward your instance's monthly egress like any other API response.
URLs
A function called send-receipt in project app-one on instance acme is served at:
https://app-one.acme.supahost.space/functions/v1/send-receipt
If the project has an active custom domain, the function is also reachable on that domain, and SUPABASE_URL inside the function points at it.
What's the same and what differs
| Topic | On SupaHost |
|---|---|
| Runtime | Deno via the open-source Edge Runtime. npm:, jsr: and https: imports work. |
| Entry file | index.ts, calling Deno.serve. Extra files and folders are allowed. |
| Deploying | From the dashboard's Functions tab or by an AI agent over MCP (deploy_edge_function). supabase functions deploy doesn't work with SupaHost. |
| JWT check | Same idea as Supabase: a per-function Require a JWT toggle, on by default. |
| Built-in env vars | SUPABASE_URL, SUPABASE_ANON_KEY, SUPABASE_SERVICE_ROLE_KEY, SUPABASE_FUNCTION_SLUG. There's no SUPABASE_DB_URL. |
| Secrets | Set in the Secrets card on the Functions tab, stored encrypted, never shown again. |
| Logs | The Logs card on the Functions tab and the MCP get_edge_function_logs tool. There's no searchable log explorer. |
| Studio | Studio's Edge Functions page shows a read-only copy of the live code. Edit and deploy from the SupaHost dashboard. |
Only the project owner can create, deploy, delete or change functions and secrets. Invited team members can see the functions and their logs.
A first look
This is a complete function. It reads a JSON body and answers with JSON:
Deno.serve(async (req) => {
const { dish } = await req.json().catch(() => ({ dish: "soup" }));
return Response.json({ suggestion: `Try a ${dish} with fresh herbs.` });
});
Call it with the project's anon key (the function keeps Require a JWT on):
curl -X POST "https://app-one.acme.supahost.space/functions/v1/suggest" \
-H "Authorization: Bearer $SUPABASE_ANON_KEY" \
-H "Content-Type: application/json" \
-d '{"dish":"risotto"}'
When to use a function (and when not to)
Use a function when you need a secret the browser must never see, need to talk to a third-party service, or need to accept a webhook. If the work is purely about your data, a Postgres function called through the Data API is often simpler and faster: see Calling database functions (RPC). For work on a timer, pair a function with pg_cron: see Running functions on a schedule.
Next steps
- Your first Edge Function: deploy and call one in a few minutes.
- Writing functions: Deno, imports and structure
- Deploying functions
- Edge Function limits
- For the full Deno and Edge Runtime API, see Supabase's Edge Functions guide.