Default behavior: private ports
Until you callports.expose(), no port inside the sandbox is reachable from outside the node. When you expose a port as "private", FissionPlane allocates a stable HTTPS URL for that port and requires a valid capability token on every request. The SDK handles token negotiation for you automatically when you access a private port from application code.
When your code accesses a private port URL through the SDK, the capability token is attached automatically. You do not need to manage tokens manually for private port access — the SDK handles minting and refreshing them on your behalf.
Expose a port as private
Callports.expose(port, 'private') to make a port reachable over HTTPS with token-gated access. The returned exposure object includes the URL.
- TypeScript
- Python
- Rust
Expose a port as public
Pass'public' to make the port anonymously accessible. Use this only when you need a browser preview or a third-party service to reach the sandbox without a token.
- TypeScript
- Python
- Rust
URL format
Exposed port URLs follow this pattern:3000 on sandbox sbx-abc123 at sandbox.example.com becomes:
List exposed ports
ports.list() returns all active exposure records for the sandbox, including their port numbers, visibility settings, and URLs.
- TypeScript
- Python
- Rust
Unexpose a port
ports.unexpose(port) removes the exposure record for the given port. After this call, the port returns to private access and the URL becomes unreachable.
- TypeScript
- Python
- Rust