Minimal reverse proxy that lets your app talk to Supabase through an alternate domain. Deploy anywhere Node.js runs or containerize with Docker.
Note
If you're on the Supabase Pro plan and have a custom domain, you can move your domain's DNS to Cloudflare and enable proxying. See Adding existing domain to Cloudflare and Cloudflare Proxy Status guide. Use this project if you need a free and simple workaround that just forwards traffic.
Proxies only the standard Supabase service paths:
/rest/v1, /auth/v1, /realtime/v1 (WebSocket), /functions/v1, /storage/v1
All headers (including your anon/service keys) pass through unchanged. No caching, no rate limiting.
- Fork or clone this repo.
- Create a new Web Service in Render (Node runtime).
- Set the region near your Supabase project (Singapore if you're in India). See screenshot below.
- Add the required env var
SUPABASE_URL(the original Supabase project URL, e.g.https://xyzcompany.supabase.co). - Deploy. Render will assign you a new domain like
https://your-proxy.onrender.com. - Point your client SDK to the proxy domain instead of the direct Supabase URL.
| Name | Required | Description |
|---|---|---|
SUPABASE_URL |
Yes | Your original Supabase project base URL (no trailing slash). |
ENABLE_LOGGING |
No | Set to true to enable Fastify logs. |
Render sets PORT automatically.
import { createClient } from "@supabase/supabase-js";
const supabase = createClient(
"https://your-proxy.onrender.com", // proxy domain
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY
);
const { data, error } = await supabase.from("todos").select("*");- OAuth might not work.
- Does not modify CORS; Fastify CORS is set to
origin: true(reflect request origin). Adjust if you need stricter rules. - Not a security boundary; treat it as a simple pipe.
- Add an allowlist of origins
- Add request rate limiting / logging / metrics
MIT

