---
title: "Getting started with OVHcloud Public Cloud Gateway"
description: "Create and manage Public Cloud Gateways using the OVHcloud Control Panel, API, ovhcloud-cli, or Terraform."
url: https://docs.ovhcloud.com/en/guides/public-cloud/network-services/getting-started-gateway
lang: en
lastUpdated: 2026-06-11
---
# Getting started with OVHcloud Public Cloud Gateway

## Objective

An OVHcloud [Gateway](https://www.ovhcloud.com/en-gb/public-cloud/gateway/) provides secure outbound connectivity (SNAT) for instances on a private network subnet and is required on that subnet to use [Floating IPs](https://www.ovhcloud.com/en-gb/public-cloud/floating-ip/) for public exposure of those private resources.

**This guide explains how to create, list, update, and delete a Public Cloud Gateway using the OVHcloud Control Panel, the OVHcloud API, ovhcloud-cli, or Terraform.**

## Requirements

- A [Public Cloud project](https://www.ovhcloud.com/en-gb/public-cloud/) in your OVHcloud account
- A private network with at least one subnet in the target region (see [Configuring vRack for Public Cloud](/en/guides/public-cloud/network-services/vrack.md))
- **For OVHcloud API:** OVHcloud API credentials ([First steps with the OVHcloud API](/en/guides/manage-and-operate/api/first-steps.md))
- **For ovhcloud-cli:** [ovhcloud-cli](https://github.com/ovh/ovhcloud-cli) installed and configured with your credentials
- **For Terraform:** Terraform installed and OVH provider configured ([How to use Terraform with OVHcloud](/en/guides/public-cloud/cross-functional/how-to-use-terraform.md))


***

### OVHcloud Control Panel Access

- **Direct link:** <ManagerLink to="/#/pci/projects">Public Cloud Projects</ManagerLink>
- **Navigation path:** <code className="action">Public Cloud</code> > Select your project

***


## Instructions

### Gateway models

Before creating a Gateway, choose the model that matches your bandwidth requirements:

| Model | Bandwidth      |
| ----- | -------------- |
| S     | up to 200 Mbps |
| M     | up to 500 Mbps |
| L     | up to 2 Gbps   |
| XL    | up to 4 Gbps   |
| 2XL   | up to 8 Gbps   |
| 3XL   | up to 16 Gbps  |

### Create a Gateway


**OVHcloud Control Panel**

From your Public Cloud project, click <code className="action">Gateway</code> in the left-hand menu under **Network**, then click <code className="action">Create a Gateway</code>.
1. **Select a region.** Choose the region where your private instances are deployed.
2. **Select a size.** Pick the gateway model based on your bandwidth needs (see the table above).
3. **Name and attach a network.** Enter a name for your gateway and select an existing private network from the drop-down list, or click <code className="action">Add a private network</code> to create one inline.
4. Click <code className="action">Create a gateway</code> to confirm. Gateway provisioning takes a few minutes.
Once created, the gateway appears in the <code className="action">Gateway</code> section, and its attached private network is visible under <code className="action">Private Networks</code>.
:::info
Only single-region private networks are supported by Gateway.
:::


**OVHcloud API**

Log in to the [OVHcloud API](https://api.ovh.com/console/) and use the following call to create a gateway together with a new private network and subnet in a single operation:

🇪🇺EU▾

[POST/cloud/project/{serviceName}/region/{regionName}/gateway](https://eu.api.ovh.com/console/?section=/cloud&branch=v1#post-/cloud/project/-serviceName-/region/-regionName-/gateway)

| Field                | Description                                                       |
| -------------------- | ----------------------------------------------------------------- |
| `serviceName`        | Your Public Cloud project ID                                      |
| `regionName`         | Target region (e.g. `GRA9`)                                       |
| `model`              | Gateway size: `s`, `m`, `l`, `xl`, `2xl`, `3xl`                   |
| `name`               | Name for your gateway                                             |
| `network.name`       | Name for the new private network                                  |
| `network.cidr`       | Subnet CIDR (e.g. `192.168.1.0/24`)                               |
| `network.enableDhcp` | `true` to enable DHCP on the subnet                               |
| `network.ipVersion`  | `4` (IPv6 not yet supported)                                      |
| `network.vlanId`     | VLAN identifier (2–4000), or leave empty for automatic assignment |
The call returns a `cloud.Operation` object. To attach a gateway to an **existing** subnet instead, use:

🇪🇺EU▾

[POST/cloud/project/{serviceName}/region/{regionName}/network/{networkId}/subnet/{subnetId}/gateway](https://eu.api.ovh.com/console/?section=/cloud&branch=v1#post-/cloud/project/-serviceName-/region/-regionName-/network/-networkId-/subnet/-subnetId-/gateway)

To retrieve your project ID:

🇪🇺EU▾

[GET/cloud/project](https://eu.api.ovh.com/console/?section=/cloud&branch=v1#get-/cloud/project)


**ovhcloud-cli**

Use `ovhcloud cloud network gateway create` with the target region and the `--wait` flag to block until provisioning completes.
**Create a gateway in an existing private network:**
```bash
ovhcloud cloud network gateway create <region> \
  --cloud-project <project_id> \
  --name my-gateway \
  --model s \
  --network-id <network_id> \
  --subnet-id <subnet_id> \
  --wait
```
**Create a gateway with a new private network:**
```bash
ovhcloud cloud network gateway create <region> \
  --cloud-project <project_id> \
  --name my-gateway \
  --model s \
  --network-name my-network \
  --subnet-cidr 192.168.1.0/24 \
  --subnet-enable-dhcp \
  --wait
```
Available models: `s`, `m`, `l`, `xl`, `2xl`, `3xl`.


**Terraform**

Create a Terraform configuration file (e.g. `gateway.tf`) with the following resources:
```hcl
resource "ovh_cloud_project_network_private" "mypriv" {
  service_name = "<project_id>"
  vlan_id      = "0"
  name         = "my-network"
  regions      = ["GRA9"]
}

resource "ovh_cloud_project_network_private_subnet" "myprivsub" {
  service_name = ovh_cloud_project_network_private.mypriv.service_name
  network_id   = ovh_cloud_project_network_private.mypriv.id
  region       = "GRA9"
  start        = "10.0.0.2"
  end          = "10.0.255.254"
  network      = "10.0.0.0/16"
  dhcp         = true
}

resource "ovh_cloud_project_gateway" "gateway" {
  service_name = ovh_cloud_project_network_private.mypriv.service_name
  name         = "my-gateway"
  model        = "s"
  region       = ovh_cloud_project_network_private_subnet.myprivsub.region
  network_id   = tolist(ovh_cloud_project_network_private.mypriv.regions_attributes[*].openstackid)[0]
  subnet_id    = ovh_cloud_project_network_private_subnet.myprivsub.id
}
```
Apply the configuration:
```bash
terraform init
terraform apply
```
:::info
Replace `GRA9` with your target region and `<project_id>` with your Public Cloud project ID.
:::


### List your Gateways


**OVHcloud Control Panel**

From your Public Cloud project, click <code className="action">Gateway</code> in the left-hand menu under **Network**.
The page lists all gateways in your project with their region, model, status, and attached network.


**OVHcloud API**

🇪🇺EU▾

[GET/cloud/project/{serviceName}/region/{regionName}/gateway](https://eu.api.ovh.com/console/?section=/cloud&branch=v1#get-/cloud/project/-serviceName-/region/-regionName-/gateway)

| Field         | Description                                       |
| ------------- | ------------------------------------------------- |
| `serviceName` | Your Public Cloud project ID                      |
| `regionName`  | Target region                                     |
| `subnetId`    | (Optional) Filter by attached subnet ID           |
| `withSubnets` | (Optional) Include subnet details in the response |


**ovhcloud-cli**

```bash
ovhcloud cloud network gateway list --cloud-project <project_id>
```
Filter by name pattern:
```bash
ovhcloud cloud network gateway list \
  --cloud-project <project_id> \
  --filter 'name=~"^my-.*"'
```


### Update a Gateway

You can update the name or model (size) of an existing gateway.


**OVHcloud Control Panel**

From the <code className="action">Gateway</code> list, click the <code className="action">...</code> menu next to your gateway, then select <code className="action">Edit</code>.
Update the name or select a new model, then confirm.


**OVHcloud API**

🇪🇺EU▾

[PUT/cloud/project/{serviceName}/region/{regionName}/gateway/{id}](https://eu.api.ovh.com/console/?section=/cloud&branch=v1#put-/cloud/project/-serviceName-/region/-regionName-/gateway/-id-)

Pass the fields you want to change in the request body (`name`, `model`, or both).


**ovhcloud-cli**

```bash
ovhcloud cloud network gateway edit <gateway_id> \
  --cloud-project <project_id> \
  --name new-name \
  --model m
```
You can pass `--name`, `--model`, or both.


**Terraform**

Edit the `name` or `model` field in your `ovh_cloud_project_gateway` resource block, then apply:
```bash
terraform apply
```


### Delete a Gateway

:::warning
Deleting a gateway is irreversible. Instances relying on it for outbound connectivity will lose internet access.

:::


**OVHcloud Control Panel**

From the <code className="action">Gateway</code> list, click the <code className="action">...</code> menu next to your gateway, then select <code className="action">Delete</code> and confirm.


**OVHcloud API**

🇪🇺EU▾

[DELETE/cloud/project/{serviceName}/region/{regionName}/gateway/{id}](https://eu.api.ovh.com/console/?section=/cloud&branch=v1#delete-/cloud/project/-serviceName-/region/-regionName-/gateway/-id-)

The call returns a `cloud.Operation`. Deletion is asynchronous — check the operation status if needed:

🇪🇺EU▾

[GET/cloud/project/{serviceName}/operation/{operationId}](https://eu.api.ovh.com/console/?section=/cloud&branch=v1#get-/cloud/project/-serviceName-/operation/-operationId-)


**ovhcloud-cli**

```bash
ovhcloud cloud network gateway delete <gateway_id> \
  --cloud-project <project_id>
```


**Terraform**

Remove the `ovh_cloud_project_gateway` resource block from your configuration file, then apply:
```bash
terraform apply
```
To destroy all resources in the configuration:
```bash
terraform destroy
```


## Go further

- [Creating a private network with Gateway](/en/guides/public-cloud/network-services/create-private-network-gateway.md)
- [Attaching a Floating IP to a Public Cloud instance](/en/guides/public-cloud/network-services/attach-floating-ip-to-instance.md)
- [Public Cloud Networking concepts](/en/guides/public-cloud/network-services/concepts.md)
- [How to use Terraform with OVHcloud](/en/guides/public-cloud/cross-functional/how-to-use-terraform.md)

If you need training or technical assistance to implement our solutions, contact your sales representative or go to the [Professional Services](https://www.ovhcloud.com/en-gb/professional-services/) page to get a quote and ask our Professional Services experts to assist you with your project.

Join our [community of users](https://community.ovhcloud.com/).
