apps/docs/content/guides/platform/ipv4-address.mdx
The Supabase IPv4 add-on provides a dedicated IPv4 address for your Postgres database connection. It can be configured in the Add-ons Settings.
The Internet Protocol (IP) addresses devices on the internet. There are two main versions:
IPv4 addresses are guaranteed to be static for ingress traffic. If your database is making outbound connections, the outbound IP address is not static and cannot be guaranteed.
</Admonition>You can enable the IPv4 add-on in your project's add-ons settings.
You can also manage the IPv4 add-on using the Management API:
# Get your access token from https://supabase.com/dashboard/account/tokens
export SUPABASE_ACCESS_TOKEN="your-access-token"
export PROJECT_REF="your-project-ref"
# Get current IPv4 add-on status
curl -X GET "https://api.supabase.com/v1/projects/$PROJECT_REF/billing/addons" \
-H "Authorization: Bearer $SUPABASE_ACCESS_TOKEN"
# Enable IPv4 add-on
curl -X PATCH "https://api.supabase.com/v1/projects/$PROJECT_REF/billing/addons" \
-H "Authorization: Bearer $SUPABASE_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"addon_variant": "ipv4_default",
"addon_type": "ipv4"
}'
# Disable IPv4 add-on
curl -X DELETE "https://api.supabase.com/v1/projects/$PROJECT_REF/billing/addons/ipv4_default" \
-H "Authorization: Bearer $SUPABASE_ACCESS_TOKEN"
Note that direct database connections can experience a short amount of downtime when toggling the add-on due to DNS reconfiguration and propagation. Generally, this should be less than a minute.
</Admonition>When using the add-on, each database (including read replicas) receives an IPv4 address. Each replica adds to the total IPv4 cost.
By default, Supabase Postgres use IPv6 addresses. If your system doesn't support IPv6, you have the following options:
You can check if your personal network is IPv6 compatible at https://test-ipv6.com.
The majority of services are IPv6 compatible. However, there are a few prominent ones that only accept IPv4 connections:
Use an IP lookup website or this command (replace <PROJECT_REF>):
nslookup db.<PROJECT_REF>.supabase.co
The pooler and direct connection strings can be found in the project connect page:
IPv6 unless IPv4 Add-On is enabled
# Example direct connection string
postgresql://postgres:[YOUR-PASSWORD]@db.ajrbwkcuthywfihaarmflo.supabase.co:5432/postgres
Always uses an IPv4 address
# Example transaction string
postgresql://postgres.ajrbwkcuthywddfihrmflo:[YOUR-PASSWORD]@aws-0-us-east-1.pooler.supabase.com:6543/postgres
Always uses an IPv4 address
# Example session string
postgresql://postgres.ajrbwkcuthywfddihrmflo:[YOUR-PASSWORD]@aws-0-us-east-1.pooler.supabase.com:5432/postgres
<$Show if="billing:all"> <$Partial path="billing/pricing/pricing_ipv4.mdx" /> </$Show>