Configuration
You can use Environment Variables to configure your Realtime Server.
General Settings #
PORT
#
Port which you can connect your client/listeners
- Required:
true
- Default:
4000
REPLICATION_MODE
#
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.
- Required:
true
- Default:
RLS
SLOT_NAME
#
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.
- Required:
true
- Default:
realtime_rls
TEMPORARY_SLOT
#
Start logical replication slot as either temporary or permanent
- Required:
true
- Default:
false
REALTIME_IP_VERSION
#
Bind realtime via either IPv4 or IPv6
- Required:
true
- Default:
IPV6
PUBLICATIONS
#
JSON encoded array of publication names. Realtime RLS currently accepts one publication.
- Required:
true
- Default:
[\"supabase_realtime\"]
SECURE_CHANNELS
#
Enable/Disable channels authorization via JWT verification
- Required:
true
- Default:
true
JWT_SECRET
#
HS algorithm octet key (e.g. "95x0oR8jq9unl9pOIx")
- Required:
true
- Default:
""
JWT_CLAIM_VALIDATORS
#
Expected claim key/value pairs compared to JWT claims via equality checks in order to validate JWT. e.g. '{"iss": "Issuer", "nbf": 1610078130}'.
- Required:
true
- Default:
EXPOSE_METRICS
#
Expose Prometheus metrics at '/metrics' endpoint.
- Required:
true
- Default:
false
DB_RECONNECT_BACKOFF_MIN
#
Specify the minimum amount of time to wait before reconnecting to database
- Required:
true
- Default:
100
DB_RECONNECT_BACKOFF_MAX
#
Specify the maximum amount of time to wait before reconnecting to database
- Required:
true
- Default:
120000
REPLICATION_POLL_INTERVAL
#
Specify how often Realtime RLS should poll the replication slot for changes
- Required:
true
- Default:
300
SUBSCRIPTION_SYNC_INTERVAL
#
Specify how often Realtime RLS should confirm connected subscribers and the tables they're listening to
- Required:
true
- Default:
60000
MAX_CHANGES
#
Soft limit for the number of database changes to fetch per replication poll
- Required:
true
- Default:
100
MAX_RECORD_BYTES
#
Controls the maximum size of a WAL record
- Required:
true
- Default:
1048576
Database Settings #
DB_HOST
#
Database host URL
- Required:
true
- Default:
localhost
DB_NAME
#
Database name
- Required:
true
- Default:
postgres
DB_USER
#
Database user
- Required:
true
- Default:
postgres
DB_PASSWORD
#
Database password
- Required:
true
- Default:
postgres
DB_PORT
#
Database port
- Required:
true
- Default:
5432
DB_SSL
#
Database SSL connection
- Required:
true
- Default:
true
DB_IP_VERSION
#
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.
- Required:
true
- Default:
IPv4