---
title: "Outbound network"
description: "A revision's code reaches the internet, a subnet of a VPC in the project, or nothing."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Outbound network

Each revision has an `egress` mode. Requests reach your service whichever mode it has.

| Mode | Its code reaches |
| --- | --- |
| `internet` (default) | The internet, from shared addresses, as a [sandbox](/sandboxes/networking) does |
| `vpc` | A subnet of a VPC in the service's project |
| `none` | Nothing, EZGH APIs included |

## A VPC

```json
{ "egress": { "mode": "vpc", "vpc": { "subnet": "sbn_7hq2m0x9ka3c" } } }
```

- The subnet must be in the service's project, and the caller needs `network.subnets.get` on it.
- Instances get addresses in the subnet and reach the internet only through a
  [NAT gateway](/private-networks) in the VPC, IPv4 only, as a
  [sandbox in a VPC](/sandboxes/networking) does.

```sh
ezgh run deploy api --image <id>.registry.ezghcloud.com/acme/api:2 --egress vpc --subnet sbn_7hq2m0x9ka3c
```

## None

An instance has no network at all: it can't make a connection, to the internet or to EZGH. It still
serves requests.

Source: https://docs.ezghcloud.com/run/egress/index.mdx
