Skip to main content
Internet access is enabled in every sandbox by default, and can be disabled for isolated workloads. Services running inside a sandbox can also be exposed through a public URL. Inbound access to services running in the sandbox is controlled separately, through public sandbox URLs or URLs that require a traffic access token. This page covers both directions: outbound rules and inbound access.
Install the SDK, or the CLI for ppio commands, and set the PPIO_API_KEY and PPIO_DOMAIN environment variables before running these examples. See Quickstart and Install and authenticate.

Toggle internet access

When creating a sandbox, use the allowInternetAccess or allow_internet_access parameter to configure internet connectivity. Internet access is turned on by default, and can be disabled for workloads with stricter security requirements.

Fine-grained network control

Network configuration gives finer-grained control over outbound traffic through allowlists and denylists. Set these options when creating the sandbox.

Expose a service through the sandbox URL

Services in a sandbox can be reached through the sandbox URL for a port.
A sandbox URL with public traffic enabled is reachable without a traffic access token. Set network.allow_public_traffic to false when a service should require the traffic access token; see Secured access.

Connect to a server inside the sandbox

Start a server in the background, read its sandbox URL, then request the URL from outside the sandbox.
1

Start a server in the background

2

Read its sandbox URL

3

Request the URL from outside the sandbox

Full example

Mask request Host headers

Use the maskRequestHost or mask_request_host option to customize the Host header sent to services running inside the sandbox.
Last modified on November 19, 2026