Files
supabase/apps/docs/content/guides/platform/ipv4-address.mdx
a0eff938ff New connection management docs (#29166)
* recreated connecting-to-postgres

* adding GUI quickstart section with DBeaver

* moved psql and pgadmin docs to GUI quickstart

* added Prisma installation docs. Moved postgres.js and Drizzle into own section

* added connection management docs

* moved supavisor troubleshooting guide into troubleshooting section. Probably should not merge without adding more guides

* updated IPv4 Add ons docs

* removed typo

* Update apps/docs/content/guides/platform/ipv4-address.mdx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* Update apps/docs/content/guides/platform/ipv4-address.mdx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* Update apps/docs/content/guides/database/supavisor.mdx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* Update apps/docs/content/guides/database/prisma.mdx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* Update apps/docs/content/guides/database/connection-management.mdx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* Update apps/docs/content/guides/database/connection-management.mdx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* Update apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* removed repetition in connection-management | added photos

* Update apps/docs/content/guides/database/connecting-to-postgres.mdx

Co-authored-by: Stas <sts@abc3.dev>

* Update apps/docs/content/guides/platform/ipv4-address.mdx

Co-authored-by: Stas <sts@abc3.dev>

* Update apps/docs/content/guides/database/connection-management.mdx

Co-authored-by: Stas <sts@abc3.dev>

* Update apps/docs/content/guides/database/connecting-to-postgres.mdx

Co-authored-by: Stas <sts@abc3.dev>

* Update apps/docs/content/guides/platform/ipv4-address.mdx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* Update apps/docs/content/guides/database/connecting-to-postgres.mdx

Co-authored-by: Stas <sts@abc3.dev>

* updated proxy suggestions

* added redirects

* added images to connection-management guide

* added unique ids to titles in prisma-troubleshooting section

* added images to connection guide

* added new images to prisma guide

* reformatted admonition

---------

Co-authored-by: Brian Brennglass <brian@Brians-MacBook-Pro.local>
Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
Co-authored-by: Stas <sts@abc3.dev>
2024-10-03 19:42:49 +00:00

98 lines
3.5 KiB
Plaintext

---
title: 'Dedicated IPv4 Address'
description: 'Attach an IPv4 address to your database'
subtitle: 'Attach an IPv4 address to your database'
---
The Supabase IPv4 add-on provides a dedicated IPv4 address for your Postgres database connection. It can be configured in the [Add-Ons Settings](/dashboard/project/_/settings/addons).
## Understanding IP addresses
The Internet Protocol (IP) addresses devices on the internet. There are two main versions:
- **IPv4**: The older version, with a limited address space.
- **IPv6**: The newer version, offering a much larger address space and the future-proof option.
## When you need the IPv4 add-on:
- When using the direct connection string in an IPv6-incompatible network instead of Supavisor or client libraries.
- When you need a dedicated IP address for your direct connection string
## Enabling the IPv4 add-on
You can enable the IPv4 add-on in your project's [add-ons settings](/dashboard/project/_/settings/addons). Enabling the add-on may briefly disable your database during reconfiguration.
## Read replicas and IPv4 add-on
When using the add-on, each database (including read replicas) receives an IPv4 address. Each replica adds to the total IPv4 cost.
## Changes and updates
- While the IPv4 address generally remains the same, actions like pausing/unpausing the project or enabling/disabling the add-on can lead to a new IPv4 address.
## Supabase and IPv6 compatibility
By default, Supabase Postgres use IPv6 addresses. If your system doesn't support IPv6, you have the following options:
1. **Supavisor Connection Strings**: The Supavisor connection strings are IPv4-compatible alternatives to direct connections
2. **Supabase Client Libraries**: These libraries are compatible with IPv4
3. **Dedicated IPv4 Add-On (Pro Plans+)**: For a guaranteed IPv4 and static database address for the direct connection, enable this paid add-on.
### Checking your network IPv6 support
Most services are IPv6 compatible, but some exceptions exist (listed below). To verify your personal network supports it, run this command on your server:
```sh
curl -6 https://ifconfig.co/ip
```
If it returns an IPv6 address then your system is compatible. An example IPv6 address might look like: `2a05:d014:1c06:5f0c:d7a9:8616:bee2:30df`.
### Checking platforms for IPv6 support:
The majority of services are IPv6 compatible. However, there are a few prominent ones that only accept IPv4 connections:
- [Retool](https://retool.com/)
- [Vercel](https://vercel.com/)
- [GitHub Actions](https://docs.github.com/en/actions)
- [Render](https://render.com/)
## Finding your database's IP address
Use an IP lookup website or this command (replace `<PROJECT_REF>`):
```sh
nslookup db.<PROJECT_REF>.supabase.co
```
## Identifying your connections
The pooler and direct connection strings can be found in the [database settings](https://supabase.com/dashboard/project/_/settings/database):
#### Direct connection
IPv6 unless IPv4 Add-On is enabled
```sh
# Example direct connection string
postgresql://postgres:[YOUR-PASSWORD]@db.ajrbwkcuthywfihaarmflo.supabase.co:5432/postgres
```
#### Supavisor in transaction mode (port 6543)
Always uses an IPv4 address
```sh
# Example transaction string
postgresql://postgres.ajrbwkcuthywddfihrmflo:[YOUR-PASSWORD]@aws-0-us-east-1.pooler.supabase.com:6543/postgres
```
#### Supavisor in session mode (port 5432)
Always uses an IPv4 address
```sh
# Example session string
postgresql://postgres.ajrbwkcuthywfddihrmflo:[YOUR-PASSWORD]@aws-0-us-east-1.pooler.supabase.com:5432/postgres
```