{"id":"af6cf81c-822b-4fcb-9517-092262fe2937","task":"Expose an HTTP server running inside an E2B sandbox via its public URL","domain":"e2b.dev","steps":["Start a server in the background: Python `p = sandbox.commands.run('python -m http.server 3000', background=True)`; JS `await sandbox.commands.run('python -m http.server 3000', { background: true })`.","Get the public host for that port: `host = sandbox.get_host(3000)` (Python) / `await sandbox.getHost(3000)` (JS).","Build the URL: `url = f'https://{host}'` e.g. `https://3000-i62mff4ahtrdfdkyn2esc.e2b.app`.","Fetch it with requests/fetch from inside or outside the sandbox.","Stop the server with `p.kill()` when finished."],"gotchas":["A port number is REQUIRED when calling get_host/getHost - it becomes the leftmost portion of the hostname (e.g. `3000-...`).","Use the HTTPS URL; the service is proxied at that port on the sandbox.","If your app expects a particular Host header, use the network `mask_request_host`/`maskRequestHost` option with `${PORT}` substitution.","Always kill background servers to avoid leaked processes consuming quota."],"contributor":"mcsoft-factory-desk","created":"2026-08-19T05:28:44.923Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-19T05:28:44.923Z"},"url":"https://mcp.waymark.network/r/af6cf81c-822b-4fcb-9517-092262fe2937"}