SupabaseMeta

SupabaseMeta

Docker app from Raccommode's Repository

Overview

Postgres Meta is the Supabase REST API for managing Postgres metadata. Supabase Studio uses it to list schemas, tables, roles, extensions, policies, SQL results, and database settings.

postgres-meta

A RESTful API for managing your Postgres. Fetch tables, add roles, and run queries (and more).

Documentation

https://supabase.github.io/postgres-meta/

Progress

Schema:

  • POST /query (Execute SQL query)
    • POST /format (Format SQL query)
    • POST /parse (Parse SQL query into AST)
    • POST /explain (Explain SQL query)
  • /columns
    • GET (List)
    • POST (alter table add column)
    • PATCH (alter table alter/rename column)
    • DELETE (alter table drop column)
  • /extensions
    • GET (List)
    • POST (create extension)
    • PATCH (alter extension)
    • DELETE (drop extension)
  • /functions
    • GET (List)
    • POST (create function)
    • PATCH (alter function)
    • DELETE (drop function)
  • /publications
    • GET (List)
    • POST (create publication)
    • PATCH (alter publication)
    • DELETE (drop publication)
  • /roles
    • GET (List)
    • POST (create role)
    • PATCH (alter role)
    • DELETE (drop role)
  • /schemas
    • GET (List)
    • POST (create schema)
    • PATCH (alter schema)
    • DELETE (drop schema)
  • /tables
    • GET (List)
    • POST (create table)
    • PATCH (alter table)
    • DELETE (drop table)
  • /triggers
    • GET (List)
    • POST (create trigger)
    • PATCH (alter trigger)
    • DELETE (drop trigger)
  • /types
    • GET (List)
    • POST (create type)
    • PATCH (alter type)
    • DELETE (drop type)

Helpers:

  • /config
    • GET /version: Postgres version
  • /generators
    • GET /openapi: Generate Open API
    • GET /typescript: Generate Typescript types
    • GET /swift: Generate Swift types (beta)
    • GET /python: Generate Python types (beta)

Quickstart

Set the following ENV VARS:

PG_META_HOST="0.0.0.0"
PG_META_PORT=8080
PG_META_DB_HOST="postgres"
PG_META_DB_NAME="postgres"
PG_META_DB_USER="postgres"
PG_META_DB_PORT=5432
PG_META_DB_PASSWORD="postgres"

Then run any of the binaries in the releases.

FAQs

Why?

This serves as a light-weight connection pooler. It also normalises the Postgres system catalog into a more readable format. While there is a lot of re-inventing right now, this server will eventually provide helpers (such as type generators). The server is multi-tenant, so it can support multiple Postgres databases from a single server.

What security does this use?

None. Please don't use this as a standalone server. This should be used behind a proxy in a trusted environment, on your local machine, or using this internally with no access to the outside world.

Developers

To start developing, run npm run dev. It will set up the database with Docker for you. The server will restart on file change.

If you are fixing a bug, you should create a new test case. To test your changes, add the -u flag to vitest on the test:run script, run npm run test, and then review the git diff of the snapshots. Depending on your change, you may see id fields being changed - this is expected and you are free to commit it, as long as it passes the CI. Don't forget to remove the -u flag when committing.

To make changes to the type generation, run npm run gen:types:<lang> while you have npm run dev running, where <lang> is one of:

  • typescript
  • go
  • swift (beta)
  • python (beta)

To use your own database connection string instead of the provided test database, run: PG_META_DB_URL=postgresql://postgres:postgres@localhost:5432/postgres npm run gen:types:<lang>

Licence

Apache 2.0

Install SupabaseMeta on Unraid in a few clicks.

Find SupabaseMeta in Community Apps on your Unraid server, review the template, and click Install. Unraid handles the Docker app or plugin setup from the published template.

Open the Apps tab on your Unraid server Search Community Apps for SupabaseMeta Review the template variables and paths Click Install

Requirements

This template runs only the Postgres Meta service from the official Supabase Docker Compose stack. It requires a Supabase Postgres database that has been initialized with the official Supabase roles and schemas. Put Studio, Kong, Postgres Meta, and Postgres on the same custom Docker network, and make Studio's STUDIO_PG_META_URL point to this container, for example http://SupabaseMeta:8080 or a matching network alias. The current Supabase Docker release uses PG_META_DB_USER=supabase_admin; upcoming releases may switch fresh installs to postgres.

Download Statistics

5,495,418
Total Downloads

Related apps

Details

Repository
supabase/postgres-meta:latest
Last Updated2026-05-13
First Seen2026-06-05

Runtime arguments

Network
bridge
Shell
sh
Privileged
false

Template configuration

API PortPorttcp

Optional Postgres Meta REST API port. Container port: 8080. Studio normally reaches this over the internal Docker network.

Target
8080
Default
8080
Value
8080
Meta PortVariable

Port Postgres Meta listens on inside the container.

Target
PG_META_PORT
Default
8080
Value
8080
Postgres HostVariable

Hostname for the Supabase Postgres service as seen from Postgres Meta.

Target
PG_META_DB_HOST
Default
db
Value
db
Postgres PortVariable

Supabase Postgres or Supavisor session port.

Target
PG_META_DB_PORT
Default
5432
Value
5432
Postgres DatabaseVariable

Supabase Postgres database name.

Target
PG_META_DB_NAME
Default
postgres
Value
postgres
Postgres UserVariable

Database role used by Postgres Meta. Current self-hosted releases use supabase_admin; newer releases may use postgres after the ownership migration.

Target
PG_META_DB_USER
Default
supabase_admin
Value
supabase_admin
Postgres PasswordVariable

Database password generated for the Supabase stack.

Target
PG_META_DB_PASSWORD
Crypto KeyVariable

Postgres Meta encryption key. Use the same value as PG_META_CRYPTO_KEY from the Supabase .env file.

Target
CRYPTO_KEY