In short.
E2B's Sandbox public URL guide is for developers exposing services inside E2B sandboxes, with the catch that those services are accessible to anyone who knows their URLs by default. It documents hostname retrieval, Host header masking and HTTPS connections from the E2B proxy to sandbox ports. Public HTTPS terminates at the proxy; internal server certificates are not verified, and HTTPS-port configuration is fixed at sandbox creation. Examples were not executed, and pricing, SDK compatibility and authentication setup are not established by this page.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage includes the complete page at [https://docs.e2b.dev/network/public-url.md]: public hostname retrieval, the HTTP server example, Host masking, HTTPS ports and all accompanying warnings and notes. Linked documentation about authentication, outbound internet access, auto-resume, Code Interpreter and the documentation index is excluded. No examples were executed. Operational behavior, SDK compatibility, performance, costs and licensing remain unverified where the page does not establish them.
The overview
Identity
Sandbox public URL is an E2B documentation guide at [https://docs.e2b.dev/network/public-url.md]. It teaches how to reach services running inside a sandbox through E2B's public proxy, with corresponding JavaScript/TypeScript and Python examples.
Assessment
This is a useful reference for connecting a client to an E2B sandbox web service. It provides specific API calls and explains distinctions that affect application compatibility and security: the public connection and internal connection can use different protocols, and applications can receive a customized Host header.
It is insufficient on its own for configuring authenticated access. The page warns about default exposure and links to access-restriction documentation, but does not include that configuration.
Users
The guide suits developers already using E2B who need to reach an HTTP or HTTPS service running inside a sandbox. Its Host masking option is relevant when an application expects a particular hostname, such as localhost followed by its port.
Beginners receive a small directory-server example. Experienced developers receive details about TLS termination, upstream certificate handling and immutable network configuration. Account setup and general SDK onboarding are not explained.
Capabilities
The documented APIs retrieve a hostname for a specified sandbox port, start a background server, fetch its response and stop the server process. Network options customize the Host header received by services and designate ports that serve HTTPS inside the sandbox.
The HTTPS-port configuration is available through the network field returned by getInfo() or get_info(). Public-access restrictions and Host masking also apply to ports configured for HTTPS.
Using it
Requirements
The examples use the e2b SDK from JavaScript/TypeScript or Python and require the ability to create a sandbox. The Python client examples also import requests. The sandbox server examples assume Python is available; the HTTPS example additionally invokes OpenSSL and Python's ssl module.
The page does not specify credentials, account provisioning, minimum SDK versions or supported client runtime versions. These prerequisites remain unknown from this evidence.
Mechanism
getHost(port) in JavaScript/TypeScript and get_host(port) in Python return a hostname, so the examples prepend https:// to construct the public URL. A port argument is always required, and the hostname's leftmost component identifies that port.
The E2B proxy terminates the public HTTPS connection and normally forwards requests to the sandbox service over HTTP. Listing a port in httpsPorts or https_ports makes that internal connection use HTTPS instead. This is not TLS passthrough, and the sandbox server's certificate is not verified.
maskRequestHost or mask_request_host changes the Host header delivered to the application. In a mask such as localhost:${PORT}, E2B replaces ${PORT} with the requested service port.
Setup
Choose any required Host mask and HTTPS ports when creating the sandbox. The HTTPS-port list cannot be changed afterward. Start a service on the intended port, retrieve that port's hostname and construct its public HTTPS URL.
Before exposing sensitive services, consult the linked access-restriction documentation at [https://docs.e2b.dev/network/restrict-public-access.md]. Its authentication instructions are outside this page. Host masking should not be treated as access control.
Example
The basic example creates a sandbox and starts python -m http.server 3000 as a background process. It retrieves the hostname for port 3000, requests the resulting HTTPS URL with fetch or requests.get, reads the response and kills the server process.
That server exposes the directory from which it starts. The page illustrates an HTML directory listing; this is publisher-supplied sample output, not an independently observed result. A separate example creates a self-signed certificate and serves HTTPS on port 8443.
Assessment & evidence
Limitations
Anyone who obtains a public URL can reach the associated services by default. The warning explicitly includes the Code Interpreter server, which runs code it receives. URLs disclosed through shared links, logs or web archives can expose services while the sandbox is running or when it auto-resumes on a request.
Public HTTPS does not imply HTTPS between the proxy and sandbox. Even when that internal connection uses HTTPS, the sandbox certificate is not verified. Applications requiring TLS to terminate directly inside the sandbox would need a different connection design.
Authentication configuration, outbound internet controls and auto-resume configuration are covered only through links. Performance, reliability, service readiness and SDK compatibility were not assessed.
Reasoning
The main fit decision is whether the application's service can be exposed through E2B's proxy with appropriate access restrictions. The guide gives a concrete connection pattern, but retrieving a hostname does not establish that a service is running or protected.
The protocol choice follows the server: use the documented default for an HTTP service and configure an HTTPS port for a service that speaks TLS itself. Neither choice changes the fact that public TLS terminates at E2B's proxy.
Alternatives
The page documents JavaScript/TypeScript and Python client approaches, plus HTTP or HTTPS connections between the proxy and sandbox. Both internal protocol choices retain an HTTPS public URL.
No competing providers or alternative networking architectures are described. Product comparisons, private-network options and alternatives supporting TLS passthrough are not assessed.
Evidence
The evidence is the complete E2B Sandbox public URL documentation page at [https://docs.e2b.dev/network/public-url.md], including its code examples, illustrated output and security notices.
The examples establish what the documentation instructs developers to do. Nothing was executed, so successful connections, displayed output and security behavior were not independently verified.
Access & freshness
Costs
The page provides no prices, quotas, trial terms or billing requirements. Whether sandbox runtime, public traffic or these network options incur particular charges is unknown. No cost estimate can be supported by this evidence.
Rights
The supplied page contains no license statement or explicit redistribution grant for its text or code examples. Their reuse and redistribution rights, the SDK's license and the service's contractual terms are unknown from this evidence.
Freshness
The documentation was captured at 2026-11-23T23:25:40.843Z. The supplied page states no publication date, last-updated date, SDK version or compatibility range. The capture timestamp does not establish when these APIs changed or whether behavior has changed since.
Actions
Before using this pattern, confirm your SDK supports the documented network options, establish public-access restrictions and check current service pricing. Decide whether proxy TLS termination and unverified internal certificates meet your application's requirements.
For an initial exercise, use a directory containing only files intended to be shared. Treat the generated URL as a credential, keep it out of shared logs and stop the example server when finished. These are recommended next steps; they were not performed.
