Realtime Self-hosting Config
See this guide if you want to configure your database to work with Realtime.
General Settings#
General server settings.
Parameters
- PORTREQUIREDno type
Port which you can connect your client/listeners
- REPLICATION_MODEREQUIREDno type
Connect to database via either IPv4 or IPv6. Disregarded if database host is an IP address (e.g. '127.0.0.1') and recommended if database host is a name (e.g. 'db.abcd.supabase.co') to prevent potential non-existent domain (NXDOMAIN) errors.
- SLOT_NAMEREQUIREDno type
A unique name for Postgres to track the Write-Ahead Logging (WAL). If the Realtime server dies then this slot can keep the changes since the last committed position.
- TEMPORARY_SLOTREQUIREDno type
Start logical replication slot as either temporary or permanent
- REALTIME_IP_VERSIONREQUIREDno type
Bind realtime via either IPv4 or IPv6
- PUBLICATIONSREQUIREDno type
JSON encoded array of publication names. Realtime RLS currently accepts one publication.
- SECURE_CHANNELSREQUIREDno type
Enable/Disable channels authorization via JWT verification
- JWT_SECRETREQUIREDno type
HS algorithm octet key (e.g. "95x0oR8jq9unl9pOIx")
- JWT_CLAIM_VALIDATORSREQUIREDno type
Expected claim key/value pairs compared to JWT claims via equality checks in order to validate JWT. e.g. '{"iss": "Issuer", "nbf": 1610078130}'.
- EXPOSE_METRICSREQUIREDno type
Expose Prometheus metrics at '/metrics' endpoint.
- DB_RECONNECT_BACKOFF_MINREQUIREDno type
Specify the minimum amount of time to wait before reconnecting to database
- DB_RECONNECT_BACKOFF_MAXREQUIREDno type
Specify the maximum amount of time to wait before reconnecting to database
- REPLICATION_POLL_INTERVALREQUIREDno type
Specify how often Realtime RLS should poll the replication slot for changes
- SUBSCRIPTION_SYNC_INTERVALREQUIREDno type
Specify how often Realtime RLS should confirm connected subscribers and the tables they're listening to
- MAX_CHANGESREQUIREDno type
Soft limit for the number of database changes to fetch per replication poll
- MAX_RECORD_BYTESREQUIREDno type
Controls the maximum size of a WAL record
Database Settings#
Connecting to your database.
Parameters
- DB_HOSTREQUIREDno type
Database host URL
- DB_NAMEREQUIREDno type
Database name
- DB_USERREQUIREDno type
Database user
- DB_PASSWORDREQUIREDno type
Database password
- DB_PORTREQUIREDno type
Database port
- DB_SSLREQUIREDno type
Database SSL connection
- DB_IP_VERSIONREQUIREDno type
Connect to database via either IPv4 or IPv6. Disregarded if database host is an IP address (e.g. '127.0.0.1') and recommended if database host is a name (e.g. 'db.abcd.supabase.co') to prevent potential non-existent domain (NXDOMAIN) errors.