---
title: How to attach resources to a Private Network
description: This page explains how to attach resources to a Private Network in a Scaleway VPC
tags: regional-private-network private-network vpc virtual-private-cloud attach detach resources regional
dates:
  validation: 2025-08-26
  posted: 2023-03-21
---
import Requirements from '@macros/iam/requirements.mdx'

import PNAttachedResources from './assets/scaleway-pn-attached-resources.webp'
import AttachResource from './assets/scaleway-attach-resource.webp'
import AttachCustomResource from './assets/scaleway-attach-custom.webp'


VPC allows you to build your own **V**irtual **P**rivate **C**loud on top of Scaleway's shared public cloud. Within each VPC, you can create multiple **Private Networks** and attach Scaleway resources to them, as long as the resources are in an AZ within the network's region. Attached resources can then communicate between themselves in an isolated and secure layer 2 network, away from the public internet.

Private Networks also have built-in **D**ynamic **H**ost **C**onfiguration **P**rotocol (DHCP), making it easy to manage the private IP addresses of your resources on the network.

For most resource types, up to 512 resources can be attached to each Private Network, and each resource can be attached to up to eight Private Networks. However exceptions exist - check out our documentation on [quotas](/organizations-and-projects/additional-content/organization-quotas/#vpc-and-private-networks) and [getting the most from Private Networks](/vpc/reference-content/getting-most-private-networks/#resource-specific-information) for full information. You should also refer to the documentation of the product in question in relation to using it with Private Networks.

The following resource types can be attached to a Private Network:

**Scaleway-managed resources**:
    - Instances
    - Elastic Metal servers
    - Apple silicon (Mac mini)
    - Load Balancers
    - Public Gateways
    - Managed Databases for PostgreSQL and MySQL
    - Serverless Functions and Containers

    <Message type="note">
    Kubernetes Kapsule clusters and Managed Databases for Redis™ are also compatible with Private Networks, but they can only be attached to a Private Network at the time of creating the resource. It is not possible to attach a cluster or Redis™ database to a Private Network after its creation, or change the attached Private Network.
    </Message>

**Custom resources**
    - Custom resources with a MAC address, e.g. a VM hosted on an Elastic Metal server

<Requirements />

- A Scaleway account logged into the [console](https://console.scaleway.com)
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
- [Created a Private Network](/vpc/how-to/create-private-network/)
- Created at least one Scaleway resource in the same region as your Private Network

## How to attach a resource to a Private Network

1. Click **VPC** in the **Network** section of the [Scaleway console](https://console.scaleway.com/organization) side menu. A listing of your VPCs displays.

2. Use the **region selector** at the top of the page to filter for the region of the VPC containing the Private Network you want to configure, then click the VPC in the listing. A listing of Private Networks in the VPC displays.

3. Click the Private Network to which you want to attach a resource.

    The Private Network's **Attached Resources** tab displays.

    <Lightbox image={PNAttachedResources} alt="" />

    <Message type="tip">
    You can use the toggle to view the different types of resources already attached to this Private Network:

    - **Managed** resources are created and managed via Scaleway, e.g. Instances, Elastic Metal servers, Load Balancers, Managed Databases, Kubernetes Kapsules, Public Gateways, Apple silicon etc.
    - **Custom** resources are created and managed by yourself, e.g. virtual machines you are hosting on a Proxmox cluster on an Elastic Metal server.
    </Message>

4. Click **+ Attach resource**. A pop-up displays.

5. Complete the required information about the resource to attach. This depends on whether you are attaching a managed or custom resource.

    <Tabs>

        <TabsTab label="Managed resource">

        <Lightbox image={AttachResource} alt="" />

        - From the first drop-down, select the **type** of managed resource (Instance, Elastic Metal server etc.) to attach.
        - From the second drop-down, select the **specific resource** of this type to attach. Only resources within the same region as the Private Network will be displayed.
        - Select whether to **auto-allocate an available IP** from the pool of addresses for the Private Network or **specify an IP** that you have already [reserved via IPAM](/ipam/how-to/reserve-ip/).

        <Message type="note">
        Only Instances, Load Balancers, Public Gateways, and Elastic Metal servers are compatible with reserved IPs. Support for Managed Databases, Apple silicon and Serverless will be coming soon. In the meantime, you must auto-allocate IPs for these products.
        </Message>
        </TabsTab>

        <TabsTab label="Custom resource">

        <Lightbox image={AttachCustomResource} alt="" />

        <Message type="important">
        This method is intended for custom resources such as VMs hosted on Elastic Metal. Do **not** attempt to attach a managed resource, such as an Instance, via this method - use the **Managed resource** attachment instead.
        </Message>

        - Select **Custom resource** from the **Type of resource** dropdown.
        - Enter the MAC address of the custom resource you want to attach, e.g. `00:1B:44:11:3A:B7`.
        - Enter the name of the resource. This will be used for DNS resolution on the Private Network.
        </TabsTab>
    </Tabs>

6. Click **Attach to Private Network** to finish.

    You are returned to the list of attached resources, where the newly-attached resource now displays.

<Message type="tip">

You can also attach a managed resource to a Private Network from the resource's own section of the console. Follow the relevant steps below:
- [Instance](/instances/how-to/use-private-networks/#how-to-attach-instances-to-an-existing-private-network)
- [Elastic Metal server](/elastic-metal/how-to/use-private-networks/#from-the-elastic-metal-section-of-the-console)
- [Apple silicon](/apple-silicon/how-to/use-private-networks/)
- [Managed Database for PostgreSQL and MySQL](/managed-databases-for-postgresql-and-mysql/how-to/connect-database-instance/#how-to-connect-to-a-database-instance-through-a-private-network)
- [Load Balancer](/load-balancer/how-to/use-with-private-network/)
- [Public Gateway](/public-gateways/how-to/configure-a-public-gateway/#how-to-attach-a-public-gateway-to-a-private-network)
- [Serverless Functions](/serverless-functions/how-to/use-private-networks/)
- [Serverless Containers](/serverless-containers/how-to/use-private-networks/)

Note that for Kubernetes Kapsules and Managed Databases for Redis™, you can only attach the resource to a Private Network at the time of creating the resource itself.
</Message>

For Elastic Metal servers and Apple silicon Mac minis, manual configuration of the network interface is required. This is not required for Instances or other types of managed resource. See the relevant documentation for [Elastic Metal](/elastic-metal/how-to/use-private-networks/#how-to-configure-the-network-interface-on-your-elastic-metal-server-for-private-networks) or [Apple silicon](/apple-silicon/how-to/use-private-networks/) for full instructions.

## How to view the resource's IP address

When you attach a resource to a Private Network, it gets a private IPv4 address on that network (and also an IPv6 address, if supported by the resource). Private IPs are assigned from the CIDR block defined at the time of the Private Network's creation, either via auto-assignment or specification of a particular [reserved IP](/ipam/how-to/reserve-ip/).

No matter whether it is auto-allocated or pre-reserved, the IP remains stable for as long as the resource is attached to the Private Network, and does not risk changing even across reboots and long poweroffs. An auto-allocated IP is lost only when you delete the resource or detach it from the Private Network. Reserved IPs remain reserved even after you delete the resource or detach it from the Private Network, until you [release the address](/ipam/how-to/reserve-ip/#how-to-release-a-reserved-private-ip-address).

You can view a resource's IPv4 or v6 address in the **Attached Resources** tab of the Private Network itself (follow steps 1 - 3 above).

    <Lightbox image={PNAttachedResources} alt="" />

It can also be viewed via the **Private Networks** tab of the resource's own dashboard.

<Message type="tip">
Refer to our documentation on [IPv4](/vpc/how-to/create-private-network/#how-to-configure-cidr), [IPv6](/vpc/how-to/create-private-network/#ipv6-cidr-block) and [CIDR](/vpc/how-to/create-private-network/#ipv4-cidr-block) blocks for further information about these concepts.
</Message>

<Message type="important">

When you attach a resource to a legacy Private Network on which you [have not activated DHCP](/vpc/reference-content/vpc-migration/#dhcp-activation-on-pre-existing-private-networks), no IP address is configured or shown on the screen shown above.<br /><br />

You will need to carry out manual configuration to set the IP address on the resource, or activate DHCP.<br /><br />

We strongly recommend that you [activate DHCP on the Private Network](/vpc/how-to/activate-dhcp/) to let us automatically handle IP address management. <br /> <br />

If you do not see an IP address in the screens above for your resource, and you think you should, check out our [troubleshooting](/vpc/troubleshooting/resource-attached-no-ip/) guide. <br /> <br />

</Message>

## How to access a resource on a Private Network via its hostname (DNS)

In addition to using its IP address, you can also access a resource on a Private Network via its hostname, thanks to VPC's inbuilt [private DNS](/vpc/concepts/#dns).

A resource's hostname is equivalent to the name you gave the resource when creating it. For example, if you have an Instance with the name `instance123` attached to a Private Network named `prodpn`, its address on that network is `instance123.prodpn.internal`. The `.internal` is important to allow Scaleway DNS to distinguish public and private hostnames.

For full information on Scaleway internal DNS and hostname formats, including troubleshooting advice, see our [dedicated documentation](/vpc/reference-content/dns/).

## How to detach a resource from a Private Network

1. Click **VPC** in the **Network** section of the [Scaleway console](https://console.scaleway.com/organization) side menu. A listing of your VPCs displays.

2. Use the **region selector** at the top of the page to filter for the region of the VPC containing the Private Network you want to configure, then click the VPC in the listing. A listing of Private Networks in the VPC displays.

3. Click the Private Network from which you want to detach a resource.

    The Private Network's **Attached Resources** tab displays.

4. Use the toggle to select the type of resource you want to detach:

    - **Managed** resources are created and managed via Scaleway, e.g. Instances, Elastic Metal servers, Load Balancers, Managed Databases, Kubernetes Kapsules, Public Gateways, Apple silicon etc.
    - **Custom** resources are created and managed by yourself, e.g. virtual machines you are hosting on a Proxmox cluster on an Elastic Metal server.

5. Click the <Icon name="unlink" /> icon next to the resource you want to detach.

6. Click **Detach resource** when prompted to confirm.

<Message type="tip">
You can also detach a managed resource to a Private Network from the resource's own section of the console.
</Message>