How to Create a VPC Peering
Validated on 11 Dec 2024 • Last edited on 9 Jun 2026
A Virtual Private Cloud (VPC) is a private network interface for collections of DigitalOcean resources. VPC networks are inaccessible from the public internet and other VPC networks, and traffic on them doesn’t count against bandwidth usage. You can link VPC networks to each other using VPC peering connections.
VPC peering joins two VPC networks with a secure, private connection. This allows resources in those networks to connect to each other’s private IP addresses as if they were in the same network.
VPC peering is available across all regions and enables routing between any two VPC networks. The one exception is that peering between datacenters is not available in BLR1.
Peering works with the following resources:
- Droplets
- Private Droplets support VPC peering automatically without additional configuration or route updates.
- Droplets created after 2 October 2024 on a peered VPC network are configured for peering automatically. If you add a peering to an existing Droplet’s VPC network, restart the Droplet’s networking stack to add the necessary peering route information. See How to Update Droplet Routes to Enable VPC Peering for instructions.
- Droplets created before 2 October 2024 must be updated manually to enable peering traffic. See How to Update Droplet Routes to Enable VPC Peering for instructions.
- Managed Databases
- All managed databases are compatible with VPC peering.
- Managed Kubernetes (DOKS)
- Worker nodes created after 2 October 2024 on a peered VPC network are configured for peering automatically. If you created the nodes before this date, or added your first peering connection after the nodes were created, recycle your worker nodes to add the new peering routes.
Create a VPC Peering Using the CLI
The VPC peering creation command requires you to provide two VPC network IDs for the --vpc-ids flag. Use doctl vpcs list command to retrieve a list of your VPC networks and their IDs.
Create a VPC Peering Using the API
The VPC peering creation call requires you to provide two VPC network IDs for the vpc_ids field. Use the /v2/vpcs endpoint to retrieve a list of your VPC networks and their IDs.
Create a VPC Peering Using the Control Panel
To create a VPC peering, click Networking in the main menu, then click VPC. On the VPC Networks page, click Actions, then Create a Peering Connection to open the Create VPC Peering window. You can also open a VPC’s detail page, click the Peering Connections tab, then click Create a Peering Connection.
In the Create VPC Peering window, select a network from the VPC Network drop-down and a second network from the Peer to VPC Network drop-down. The drop-downs filter to matching VPCs as you type.
Under Choose a name, accept the default generated name (such as vpc-peering-1234567890) or enter a name. Names can only contain alphanumeric characters, dashes, and periods. Click Create peering connection.
View a VPC’s Peering Connections
To view a VPC network’s peering connections, click Networking in the main menu, then click VPC. Peering connections are listed in the Connections column on the VPC Networks page.
You can also click a VPC network’s name to go to its detail page, then click the Peering Connections tab. All active connections are listed. To peer another network to this VPC, click Create a Peering Connection.