---
title: "Internet access from your app: the while.sh docs"
url: https://while.sh/en/docs/building-blocks/outbound-traffic/
updated: 2026-11-21
---

# Outbound traffic

The internet is closed to your app by default. It calls an external API through a connection, and the internet opens after approval.

> You, to your AI: Let the app call the weather API.

## What your agent writes

Your agent writes it in while.yaml, at the root of your app:

```yaml titre="while.yaml"
apiVersion: while/v1
project: my-app
services:
  - name: web
    port: 3000
network:
  egress: all
```

## When to use it

Use it when the app must reach the Internet outside a declared connection. Opening it requires approval, because `egress` is closed by default.

## How it works

The Internet is closed to an app by default: to call an external API, it goes through a connection. `network: { egress: all }` opens the Internet to it, according to the organization's rules.

## What to know

Without `egress: all` (with none, an allow list or nothing declared), `egress` is closed. An allow list opens nothing directly, and its calls go through a connection. `egress: all` opens the Internet, over IPv6 as over IPv4 (TCP and UDP), except the networks of Nextmap, while's hosting provider (85.208.144.0/22, 2a09:8740::`/29`), and port 25 (SMTP). To reach a service hosted at Nextmap, ask for an exception through `send_feedback` (the host, the port, the need). A version already online keeps its previous `egress` until its next deployment. Over IPv4, the app goes out through 85.208.145.210, 85.208.145.211: declare these addresses to any third party that filters by IP address. An app reaches neither while's API nor its MCP (`app.while.sh`, `mcp.while.sh`).

Without `egress: all`, an external API is reached through a connection (`declare_connection`, even with a project token): a person approves it, and while calls it for the app, over IPv6 as over IPv4.

## Guides

- [Connect Stripe, Brevo or any API to your app with no credential in the code (2026)](/en/guides/api-keys-out-of-code/)
