490 Commits

Author SHA1 Message Date
Vaibhav 1e444589c6 fix(self-hosted): standardize function auth responses (#48012) 2026-09-17 10:10:01 +02:00
Manuel Rubio e693f206f5 fix(self-hosted): remove expose of app.settings.jwt_secret (#45003) 2026-09-15 19:38:21 +02:00
Mandar Joshi 0a409db31c fix(self-hosted): proxy .well-known route for auth (#50306) 2026-09-15 19:01:59 +02:00
Siddharth Gaikwad 920459e9be fix(docker): ship volumes/storage so it is not created as root (#50299) 2026-09-15 18:50:00 +02:00
Andrey A. 8c7a4d9dbb chore(self-hosted): update 2026-09-09 - 0.8.1 (#50172) 2026-09-09 15:45:54 +02:00
Raúl Barroso f5f897a29b feat(functions): inject env var function slug (#49617)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Feature (self-hosted Edge Functions)

## What is the current behavior?

The self-hosted Edge Functions router
(`docker/volumes/functions/main/index.ts`) doesn't tell a function which
slug a request resolved to. As a result, `@supabase/server`'s
`withOAuthProtectedResource` can't derive its canonical resource URL and
falls back to reconstructing it from the request path against the
internal `api-gw` origin, so the advertised OAuth Protected Resource is
/wrong for self-hosted deployments.

## What is the new behavior?

`main/index.ts` now injects `SUPABASE_FUNCTION_SLUG: service_name` per
request (after the `Deno.env.toObject()` snapshot, so nothing in the
container env can shadow it).

Combined with the operator's `SUPABASE_PUBLIC_URL`, the advertised
resource is the correct external
`{SUPABASE_PUBLIC_URL}/functions/v1/{slug}`, not the internal
`http://api-gw:8000`.

Verified on the docker stack: the slug is injected per-function, the
resource origin resolves to `SUPABASE_PUBLIC_URL`, and the `401`
`www-authenticate` carries the right `resource_metadata`.

## Additional context

Fixes AI-1128

Companion to `@supabase/server` [PR
#117](https://github.com/supabase/server/pull/117) and the [CLI slug
injection](https://github.com/supabase/cli/pull/6345)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Edge workers now receive the correct function slug in their runtime
environment, improving per-function request handling.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-08-28 12:32:30 +02:00
Tanya Bouman eabe06be5b typo fix: placehoder -> placeholder (#43451) 2026-08-21 13:38:24 +00:00
Andrey A. 22e2370b35 docs(self-hosted): add poolers how-to guide (#49303) 2026-08-21 07:10:18 -06:00
Inder Singh 768cf11b9c feat(self-hosted): add pgbouncer override (#49052) 2026-08-20 11:21:54 +02:00
Etienne Stalmans 04ddc6bef8 chore: update cors for pg routes (#49136)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Bug fix - config hardening

## What is the current behavior?

CORS is applied at the global level in a permissive mode

## What is the new behavior?

Self-hosted envoy config should apply CORS to the `/pg` routes. These
should only be called from the studio dashboard (when called via a
browser).

uses `SUPABASE_PUBLIC_URL`, which should mean this isn't a breaking
change.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Security & Access**
  * Added stricter CORS controls for the `/pg/` route.
* Requests are limited to the configured public URL and localhost
origins.
* Standard HTTP methods and headers are supported, with preflight
responses cached for one hour.

* **Documentation**
* Updated self-hosting guidance to describe the `/pg/` route’s CORS
policy.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-08-17 10:28:09 -07:00
Katerina Skroumpelou 9ef9f1b8c1 feat(self-host): use @supabase/server in functions template and docs (#48996)
Updates the self-host Edge Functions template to use `@supabase/server`,
matching the CLI's `supabase functions new` templates (part of SDK-1150,
follows up on #45635 which exposed `SUPABASE_JWKS` to the functions
container). The `hello` example function now wraps its handler in
`withSupabase({ auth: 'none' })` and resolves the package through a
per-function `deno.json` import map, which the runtime auto-discovers,
so no dispatcher changes are needed. The self-hosted functions guide is
updated to match: the create-a-function snippet, a `ctx.supabaseAdmin`
example replacing the manual esm.sh `createClient` wiring, and a note
that `auth: 'user'` requires `SUPABASE_JWKS`. Verified on
`supabase/edge-runtime:v1.74.0` with the compose environment variables:
`curl /functions/v1/hello` returns the same response body as before, so
existing docs and troubleshooting pages stay accurate.

The `docker/.gitignore` change: `volumes/functions/**` ignores
self-hosters' own functions, but it also hid the new `deno.json`, which
must ship with the repo for the `hello` import to resolve. The allowlist
entries follow the existing `main/index.ts` pattern.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Edge Functions now support authenticated invocation with publishable
or secret API keys.
* Function handlers can access authenticated and administrative Supabase
clients through the request context.
* Added automatic environment configuration and JWT verification
support.

* **Documentation**
* Updated the self-hosting guide with the new function setup and
authentication workflow.
* Improved local function examples for supported access patterns and
privileged operations.

* **Tests**
* Updated self-hosted smoke tests to validate publishable-key function
access.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Kalleby Santos <kalleby_santos@hotmail.com>
Co-authored-by: Kalleby Santos <105971119+kallebysantos@users.noreply.github.com>
2026-08-14 12:00:11 +03:00
Andrey A. 241bb11c06 chore(self-hosted): update 2026-08-11 - 0.8.0 (#48899) 2026-08-11 11:55:43 +02:00
Andrey A. 5a8eecf509 feat(self-hosted): envoy is the default api gateway (#48153) 2026-08-11 11:55:26 +02:00
Andrey A. 549db119c4 chore(self-hosted): update 2026-08-04 - 0.7.2 (#48707) 2026-08-04 22:06:15 +02:00
Andrey A. a8a0a66853 fix(self-hosted): avoid overwriting update.sh (#48690) 2026-08-04 21:56:44 +02:00
Andrey A. 9e225a279b chore(self-hosted): update 2026-08-03 (#48649) 2026-08-03 18:21:35 +02:00
Andrey A. 9e73d556d0 feat(self-hosted): add update script (#47851) 2026-08-03 17:05:11 +02:00
Andrey A. be136df69e feat(self-hosted): use latest tag in setup.sh plus additional checks (#47848) 2026-07-31 13:43:35 +02:00
Andrey A. 4466cc4e45 fix(self-hosted): override dns ttl in kong config to avoid wrong routing (#47846) 2026-07-30 17:29:12 +00:00
Andrey A. 18bad2e61c chore(self-hosted): remove em-dashes (#48498) 2026-07-30 17:20:22 +00:00
Andrey A. 3e02ce74b8 fix(self-hosted): pin rustfs to beta.11 and fix s3 tests (#48500) 2026-07-30 19:09:02 +02:00
Kalleby Santos 9cf6ae1f67 feat(self-host): functions expose jwks (#45635) 2026-07-08 15:32:12 +02:00
Andrey A. 244301c09d chore(self-hosted): update 2026-07-07 (#47696) 2026-07-07 17:29:49 +02:00
Luiz Felipe Machado 9777f051d6 feat(self-hosted): restrict rest root anon (#45462) 2026-07-07 13:16:23 +02:00
Andrey A. e7abda8dce fix(self-hosted): change default api external url to contain /auth/v1 (#47640) 2026-07-07 12:28:47 +02:00
Andrey A. 46de6d4485 chore(self-hosted): add tests for supabase vault when upgrading to pg17 (#47237) 2026-07-01 15:29:40 +02:00
Mandar Joshi 02ada3efe3 fix(docker): move hardcoded Realtime DB_ENC_KEY to .env variable (#46021) 2026-07-01 14:51:02 +02:00
Lakshya Sharma d60d562570 docs(self-hosting): podman-compose >= 1.6.0 supports nested interpolation (#47162) 2026-07-01 13:33:46 +02:00
Andrey A. dfcacc8aac chore(self-hosted): add upcoming breaking changes to changelog (#47095) 2026-06-19 10:35:46 -02:30
Andrey A. c79f8fc2b0 chore(self-hosted): update 2026-06-17 (#47038) 2026-06-17 15:28:41 +02:00
Andrey A. 6cf174b925 feat(self-hosted): change the default db version to postgres 17 (#46981) 2026-06-17 15:28:20 +02:00
Andrey A. d002ebe7e5 fix(self-hosted): use postgres user instead of supabase_admin for studio (#47022) 2026-06-17 14:43:24 +02:00
Inder Singh 5d8d1f359f chore(self-hosted): use /bin/sh shebang in kong-entrypoint.sh (#46897) 2026-06-13 10:30:39 +00:00
Andrey A. 098157eb90 fix(self-hosted): block access to tenants and openapi realtime api (#46856) 2026-06-12 11:48:58 +02:00
Carlos Vera 712387bbac fix(self-hosted): add healthcheck to rest (PostgREST) service (#46658) 2026-06-12 11:09:55 +02:00
Andrey A. aeca45d4de fix(self-hosted): use explicit /bin/sh for kong entrypoint (#46873) 2026-06-12 10:58:06 +02:00
Andrey A. 2d422e4d9d fix(self-hosted): use subshell for terminal checks in setup.sh (#46779) 2026-06-09 14:43:55 +00:00
Andrey A. 30d32dd22c chore(self-hosted): add test for tus (#46731) 2026-06-08 14:49:16 +02:00
Luiz Felipe Machado 9db45c7fd9 fix(docker): add healthcheck to edge functions container (#46655) 2026-06-08 12:38:03 +02:00
Andrey A. f5c49e89c5 chore(self-hosted): expand smoke tests (#46722) 2026-06-08 12:23:36 +02:00
Matt Rossman 69333b9bb5 docs: update URLs after supabase/mcp repo transfer (#46675)
The Supabase MCP repo transferred from `supabase-community/supabase-mcp`
-> `supabase/mcp`. This updates links on docs and www to point to the
new location: https://github.com/supabase/mcp

The main one needing this change is the MCP docs page at `mcp.mdx`:
https://supabase.com/mcp

I also updated links in the changelog / blog for good measure, though I
can remove those changes if desired since the old URL redirects to the
new location.

Related: https://github.com/supabase/mcp/pull/295
Ref: AI-792

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
* Updated Supabase MCP server repository references across all
documentation guides, blog articles, changelog entries, and supporting
materials to direct users to the current official location.
* Refreshed documentation links including feature groups, setup
instructions, abilities documentation, and GitHub issue tracking URLs
for consistency.
  * Updated MCP server release links in changelog.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-05 10:09:49 -04:00
Andrey A. 9a78130e42 chore(self-hosted): update 2026-06-03 (#46610) 2026-06-03 13:25:48 +02:00
Luiz Felipe Machado 881149c4f9 feat(self-hosted): make analytics optional in compose (#45327) 2026-06-03 11:07:31 +02:00
Andrey A. a18539886c fix(self-hosted): add docker setup for amzn linux and fix comments (#46504) 2026-05-29 17:46:13 +02:00
Luiz Felipe Machado 94ac6f3fa3 fix(self-hosted): reject access via internal jwt api keys when translation is enabled (#46023) 2026-05-26 17:03:13 +02:00
Luiz Felipe Machado aa691c1ee2 fix(self-hsoted): handle optional services and overrides in test-container-logs (#46099) 2026-05-26 16:41:07 +02:00
Andrey A. 84d7da45e7 chore(self-hosted): add STORAGE_S3_UPLOAD_PART_SIZE to env vars list (#46297) 2026-05-25 17:07:14 +02:00
Andrey A. fcb8ee0412 feat(self-hosted): add setup.sh and run.sh scripts for self-hosted supabase (#45603) 2026-05-22 17:06:58 +02:00
Andrey A. c1276c8e9a feat(self-hosted): add new API keys to self-hosted Studio and MCP server (#46173) 2026-05-22 12:11:00 +02:00
Andrey A. 82a3f2cb24 chore(self-hosted): add a reference docs for configurable env vars (#46124) 2026-05-20 11:48:11 +02:00