apps/docs/src/content/docs/en/network-limits.mdx
import { TabItem, Tabs } from '@astrojs/starlight/components'
Daytona provides network egress limiting for sandboxes to control internet access. This feature can be automatically applied based on your organization's limits or manually configured for specific sandboxes.
Network limits are automatically applied to sandboxes based on your organization's billing tier. This provides secure and controlled internet access for development environments:
networkAllowList specified when creating a sandbox, the organization's network restrictions still applyTo learn more about organization tiers and limits, see limits.
Essential services are available on all tiers and include services essential for development: package registries, container registries, Git repositories, CDN services, platform services, and system package managers.
Daytona provides methods to control network access when creating sandboxes by using the networkAllowList and networkBlockAll parameters:
from daytona import CreateSandboxFromSnapshotParams, Daytona
daytona = Daytona()
# Allow access to specific IP addresses (Wikipedia, X/Twitter, private network)
sandbox = daytona.create(CreateSandboxFromSnapshotParams(
network_allow_list='208.80.154.232/32,199.16.156.103/32,192.168.1.0/24'
))
# Or block all network access
sandbox = daytona.create(CreateSandboxFromSnapshotParams(
network_block_all=True
))
import { Daytona } from '@daytona/sdk'
const daytona = new Daytona()
// Allow access to specific IP addresses (Wikipedia, X/Twitter, private network)
const sandbox = await daytona.create({
networkAllowList: '208.80.154.232/32,199.16.156.103/32,192.168.1.0/24'
})
// Or block all network access
const sandbox = await daytona.create({
networkBlockAll: true
})
require 'daytona'
daytona = Daytona::Daytona.new
# Allow access to specific IP addresses (Wikipedia, X/Twitter, private network)
sandbox = daytona.create(
Daytona::CreateSandboxFromSnapshotParams.new(
network_allow_list: '208.80.154.232/32,199.16.156.103/32,192.168.1.0/24'
)
)
# Or block all network access
sandbox = daytona.create(
Daytona::CreateSandboxFromSnapshotParams.new(
network_block_all: true
)
)
package main
import (
"context"
"log"
"github.com/daytonaio/daytona/libs/sdk-go/pkg/daytona"
"github.com/daytonaio/daytona/libs/sdk-go/pkg/types"
)
func main() {
client, err := daytona.NewClient()
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
// Allow access to specific IP addresses (Wikipedia, X/Twitter, private network)
allowList := "208.80.154.232/32,199.16.156.103/32,192.168.1.0/24"
sandbox, err := client.Create(ctx, types.SnapshotParams{
SandboxBaseParams: types.SandboxBaseParams{
NetworkAllowList: &allowList,
},
})
// Or block all network access
sandbox, err = client.Create(ctx, types.SnapshotParams{
SandboxBaseParams: types.SandboxBaseParams{
NetworkBlockAll: true,
},
})
}
import io.daytona.sdk.Daytona;
import io.daytona.sdk.Sandbox;
import io.daytona.sdk.model.CreateSandboxFromSnapshotParams;
public class App {
public static void main(String[] args) {
try (Daytona daytona = new Daytona()) {
// Or block all network access
CreateSandboxFromSnapshotParams params = new CreateSandboxFromSnapshotParams();
params.setNetworkBlockAll(true);
Sandbox sandbox = daytona.create(params);
}
}
}
# Allow access to specific IP addresses (Wikipedia, X/Twitter, private network)
curl 'https://app.daytona.io/api/sandbox' \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
"networkAllowList": "208.80.154.232/32,199.16.156.103/32,192.168.1.0/24"
}'
# Or block all network access
curl 'https://app.daytona.io/api/sandbox' \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
"networkBlockAll": true
}'
# Allow access to specific IP addresses (Wikipedia, X/Twitter, private network)
daytona create --network-allow-list '208.80.154.232/32,199.16.156.103/32,192.168.1.0/24'
# Or block all network access
daytona create --network-block-all
:::note
If both networkBlockAll and networkAllowList are specified, networkBlockAll takes precedence and all network access will be blocked, ignoring the allow list.
:::
Daytona provides methods to update network settings for running sandboxes. Organizations on Tier 3 and Tier 4 can change outbound firewall policy after the sandbox is created. The API applies the new rules on the runner and persists them on the sandbox record. The sandbox keeps running; stop or start are not required.
The request must include at least one of networkBlockAll or networkAllowList. Rules match create-time behavior and use the same allow list format.
networkAllowList as an empty string clears a stored allow listnetworkBlockAll: true blocks all outbound traffic and clears the allow listnetworkBlockAll: false restores general outbound access (for your tier) and clears a stored allow listThis operation requires the WRITE_SANDBOXES permission. Organizations on Tier 1 or Tier 2 cannot override network policy at the sandbox level, and the API returns an error in that case.
# Block all outbound traffic (clears any allow list)
sandbox.update_network_settings(network_block_all=True)
# Restore general outbound access and clear the allow list
sandbox.update_network_settings(network_block_all=False)
# Apply or replace a CIDR allow list (implies not blocking all)
sandbox.update_network_settings(
network_allow_list='208.80.154.232/32,192.168.1.0/24'
)
# Clear a stored allow list (empty string). Outbound traffic still follows `network_block_all`.
sandbox.update_network_settings(network_allow_list='')
// Block all outbound traffic (clears any allow list)
await sandbox.updateNetworkSettings({ networkBlockAll: true })
// Restore general outbound access and clear the allow list
await sandbox.updateNetworkSettings({ networkBlockAll: false })
// Apply or replace a CIDR allow list (implies not blocking all)
await sandbox.updateNetworkSettings({
networkAllowList: '208.80.154.232/32,192.168.1.0/24',
})
// Clear a stored allow list (empty string). Outbound traffic still follows `networkBlockAll`.
await sandbox.updateNetworkSettings({ networkAllowList: '' })
# Block all outbound traffic (clears any allow list)
sandbox.update_network_settings(network_block_all: true)
# Restore general outbound access and clear the allow list
sandbox.update_network_settings(network_block_all: false)
# Apply or replace a CIDR allow list (implies not blocking all)
sandbox.update_network_settings(
network_allow_list: '208.80.154.232/32,192.168.1.0/24'
)
# Clear the allow list (empty string)
sandbox.update_network_settings(network_allow_list: '')
import apiclient "github.com/daytonaio/daytona/libs/api-client-go"
settings := apiclient.NewUpdateSandboxNetworkSettings()
settings.SetNetworkBlockAll(true)
if err := sandbox.UpdateNetworkSettings(ctx, *settings); err != nil {
log.Fatal(err)
}
restore := apiclient.NewUpdateSandboxNetworkSettings()
restore.SetNetworkBlockAll(false)
if err := sandbox.UpdateNetworkSettings(ctx, *restore); err != nil {
log.Fatal(err)
}
allow := apiclient.NewUpdateSandboxNetworkSettings()
allow.SetNetworkAllowList("208.80.154.232/32,192.168.1.0/24")
if err := sandbox.UpdateNetworkSettings(ctx, *allow); err != nil {
log.Fatal(err)
}
import io.daytona.api.client.model.UpdateSandboxNetworkSettings;
// Block all outbound traffic (clears any allow list)
sandbox.updateNetworkSettings(new UpdateSandboxNetworkSettings().networkBlockAll(true));
// Restore general outbound access and clear the allow list
sandbox.updateNetworkSettings(new UpdateSandboxNetworkSettings().networkBlockAll(false));
// Apply or replace a CIDR allow list
sandbox.updateNetworkSettings(
new UpdateSandboxNetworkSettings().networkAllowList("208.80.154.232/32,192.168.1.0/24"));
curl 'https://app.daytona.io/api/sandbox/SANDBOX_ID_OR_NAME/network-settings' \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{"networkBlockAll": true}'
# Restore access and clear allow list
curl 'https://app.daytona.io/api/sandbox/SANDBOX_ID_OR_NAME/network-settings' \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{"networkBlockAll": false}'
The network allow list is a comma-separated list of IPv4 CIDR blocks. Set your allowed networks using the networkAllowList parameter when creating a sandbox or when updating settings on a running sandbox.
/ prefix length integer in the range 0 to 32 (inclusive), for example: /32A.B.C.D/N). Do not include extra / segmentsThe following examples are valid:
208.80.154.232/32 (Wikipedia)192.168.1.0/24 (Private network)208.80.154.232/32,199.16.156.103/32,10.0.0.0/8The network access policies for your organization are set automatically depending on your organization's limits tier and cannot be modified by organization administrators. These policies determine the default network behavior for all sandboxes in your organization.
To test network connectivity from your sandbox:
# Test HTTP connectivity to allowed addresses
curl -I https://208.80.154.232
# Test package manager access (allowed on all tiers)
apt update # For Ubuntu/Debian
npm ping # For Node.js
pip install --dry-run requests # For Python
Network limits provide several security advantages:
:::caution
Enabling unrestricted network access may pose security risks when executing untrusted code. It is recommended to whitelist specific network addresses using networkAllowList or block all network access using networkBlockAll instead.
Test network connectivity before starting critical development work and consider upgrading your tier if you need access to many external services. :::
Daytona provides a list of essential services that are available on all tiers and can be used for development.
:::note This list is continuously updated. If you require access to additional essential development services, submit a request in the sandbox network whitelist repository or contact [email protected]. :::
registry.npmjs.org, registry.npmjs.com, nodejs.org, nodesource.com, npm.pkg.github.comyarnpkg.com, *.yarnpkg.com, yarn.npmjs.org, yarnpkg.netlify.combun.sh, *.bun.shgithub.com, *.github.com, *.githubusercontent.com, ghcr.iogitlab.com, *.gitlab.combitbucket.orgdev.azure.com, *.dev.azure.com, login.microsoftonline.com, visualstudio.com, *.visualstudio.com, ssh.dev.azure.com, vs-ssh.visualstudio.compypi.org, pypi.python.org, files.pythonhosted.org, bootstrap.pypa.io, astral.sh*.packagist.org, packagist.com*.ubuntu.com*.debian.org, cdn-fastly.deb.debian.orgfastly.com, cloudflare.com, r2.cloudflarestorage.com, *.r2.cloudflarestorage.comunpkg.com, jsdelivr.net*.anthropic.com, claude.ai, platform.claude.comopenai.com, *.openai.com, chatgpt.comgenerativelanguage.googleapis.com, gemini.google.com, aistudio.google.com, ai.google.dev, models.devapi.perplexity.aiapi.deepseek.comapi.groq.comapi.expo.devopenrouter.aichat.qwen.ai, dashscope.aliyuncs.com, dashscope-intl.aliyuncs.com*.cursor.comopencode.ai, *.opencode.aiapi.letta.com, api.fireworks.ai, open.bigmodel.cn, *.z.ai, *.moonshot.ai, ai-gateway.vercel.sh, api.featherless.aidocker.io, *.docker.io, *.docker.commcr.microsoft.comregistry.k8s.iogcr.io, *.gcr.io, registry.cloud.google.comquay.io, quay-registry.s3.amazonaws.comrepo1.maven.org, repo.maven.apache.orgfonts.googleapis.com, fonts.gstatic.coms3.us-east-1.amazonaws.com, s3.us-east-2.amazonaws.coms3.us-west-1.amazonaws.com, s3.us-west-2.amazonaws.coms3.eu-central-1.amazonaws.com, s3.eu-west-1.amazonaws.com, s3.eu-west-2.amazonaws.comstorage.googleapis.comapp.daytona.ioconvex.dev, *.convex.dev, *.convex.cloud, *.convex.siteherokuapp.com, *.herokuapp.comvercel.com, *.vercel.com, *.vercel.appsupabase.com, *.supabase.com, supabase.co, *.supabase.coclerk.com, *.clerk.com, clerk.dev, *.clerk.dev, accounts.dev, *.accounts.dev, clerk.accounts.dev, *.clerk.accounts.devworkos.com, *.workos.com, authkit.app, *.authkit.appinngest.com, *.inngest.composthog.com, *.posthog.comsentry.io, *.sentry.io, sentry-cdn.com, *.sentry-cdn.comlinear.app, *.linear.appfigma.com, *.figma.com, *.figmafiles.comclickup.com, *.clickup.complaywright.dev, cdn.playwright.devapi.telegram.orgweb.whatsapp.com, *.whatsapp.net*.langfuse.com, *.cloud.langfuse.comIf you encounter network access issues or need unrestricted network access: