Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix: cleanup privatelink documentation (#48466)

Stephen Morganb17a33fb2696
diff --git a/apps/docs/content/guides/platform/privatelink.mdx b/apps/docs/content/guides/platform/privatelink.mdx
index 2ccb08fc65f..a934dc535bd 100644
--- a/apps/docs/content/guides/platform/privatelink.mdx
+++ b/apps/docs/content/guides/platform/privatelink.mdx
@@ -6,7 +6,7 @@ description: 'Secure private network connectivity to your Supabase database usin
<Admonition type="note">
-PrivateLink is currently in beta and available only to Team and Enterprise customers.
+PrivateLink is available only to Team and Enterprise customers.
Contact support if you would like to create a PrivateLink connection for a read-only replica.
</Admonition>
@@ -20,13 +20,12 @@ By enabling PrivateLink, database connections never traverse the public internet
Supabase PrivateLink is an organisation level configuration. It works by sharing a [VPC Lattice Resource Configuration](https://docs.aws.amazon.com/vpc-lattice/latest/ug/resource-configuration.html) to any number of AWS Accounts for each of your Supabase projects. Connectivity can be achieved by either associating the Resource Configuration to a PrivateLink endpoint, or a [VPC Lattice Service Network](https://docs.aws.amazon.com/vpc-lattice/latest/ug/service-networks.html). This means:
- Database traffic flows through private AWS infrastructure only
-- Connection latency is typically reduced compared to public internet routing
- Network isolation provides enhanced security posture
- Attack surface is minimized by eliminating public exposure
The connection architecture changes from public internet routing to a dedicated private path through AWS's secure network backbone.
-Supabase PrivateLink currently supports direct database and PgBouncer connections only. It does not support other Supabase services like API, Storage, Auth, or Realtime. These services will continue to operate over public internet connections.
+Supabase PrivateLink supports direct database connections on port `5432` and PgBouncer connections on port `6543`. It does not support other Supabase services like API, Storage, Auth, or Realtime. These services will continue to operate over public internet connections.
## Requirements
@@ -76,9 +75,11 @@ Ensure your security groups allow traffic on the appropriate ports:
1. Navigate to the [VPC console > Security Groups](https://console.aws.amazon.com/vpcconsole/home#SecurityGroups:)
2. Create a new security group for the endpoint or service network by clicking [Create security group](https://console.aws.amazon.com/vpcconsole/home#CreateSecurityGroup:)
3. Give your security group a descriptive name and select the appropriate VPC
-4. Add an inbound rule for:
- - Type: Postgres (TCP, port 5432)
- - Destination that is appropriate for your network. i.e. the subnet of your VPC or security group of your application instances
+4. Add inbound rule(s) for the connection mode you use:
+ - Direct connection: Postgres (TCP, port `5432`)
+ - PgBouncer connection: Custom TCP (port `6543`)
+ - If you use both direct and PgBouncer connections, add both rules
+ - Set the destination appropriate for your network (for example, your VPC subnet or your application instances' security group)
5. Finish creating the security group by clicking **Create security group**
### Step 4: Create connection
@@ -127,7 +128,11 @@ Verify the private connection is working correctly from your VPC:
3. Test the connection using the private endpoint:
```bash
+# Direct connection (Postgres)
psql "postgresql://[username]:[password]@[private-endpoint]:5432/postgres"
+
+# PgBouncer connection
+psql "postgresql://[username]:[password]@[private-endpoint]:6543/postgres"
```
You should see a successful connection without any public internet traffic.
@@ -141,27 +146,33 @@ Configure your applications to use the private connection details:
3. Update any database connection pooling configurations
4. Test application connectivity thoroughly
-Example connection string update:
+Example connection string updates:
```
+# Direct connection (Postgres)
# Before (public)
postgresql://user:pass@db.[project-ref].supabase.co:5432/postgres
# After (private)
postgresql://user:[email protected]:5432/postgres
-```
-### Step 7: Disable public connectivity (optional)
+# PgBouncer connection
+# Before (public)
+postgresql://user:pass@db.[project-ref].supabase.co:6543/postgres
+
+# After (private)
+postgresql://user:[email protected]:6543/postgres
+```
-For maximum security, you can disable public internet access for your database:
+### Step 7: Restrict public database access (optional)
-1. Contact Supabase support to disable public connectivity
-2. Ensure all applications are successfully using the private connection
-3. Update any monitoring or backup tools to use the private endpoint
+For maximum security, you can restrict public database access in your project settings:
-## Beta limitations
+1. Go to [**Database** > **Settings**](/dashboard/project/_/database/settings)
+2. In **Network Restrictions**, enable **Restrict all access**
+3. Ensure all applications, monitoring, and backup tools are using the private endpoint before enabling this setting
-During the beta phase:
+## Limitations
- **Read Replicas**: To establish PrivateLink with a Read Replica, reach out to your account rep.
- **Feature Evolution**: The setup process and capabilities may evolve as we refine the offering
diff --git a/apps/docs/content/guides/security/platform-security.mdx b/apps/docs/content/guides/security/platform-security.mdx
index 43003089c3b..e6ed64b34c0 100644
--- a/apps/docs/content/guides/security/platform-security.mdx
+++ b/apps/docs/content/guides/security/platform-security.mdx
@@ -61,6 +61,6 @@ For configuration information, see [PrivateLink](/docs/guides/platform/privateli
<Admonition type="note">
-PrivateLink is currently in beta. To establish PrivateLink with a Read Replica, reach out to your account rep.
+To establish PrivateLink with a Read Replica, reach out to your account rep.
</Admonition>