Reserved ports
The following ports are reserved by Blaxel’s system:- 443: This port hosts the main sandbox API and is exposed via HTTPS
- 80: Reserved for system operations
- 8080: Reserved for sandbox API functionality
Expose a port
You can expose specific non-reserved ports when creating a new sandbox by using theports
parameter. This allows you to access these ports from outside the sandbox, typically to create a preview URL on them.
Access the sandbox on a specific port
Via the sandbox API
This option requires your request to be authenticated. You can access your sandbox on a specific port through the sandbox API using the following URL format:https://run.blaxel.ai/my-workspace/sandboxes/my-sandbox/port/3000
Via a preview URL
Preview URLs provide a simple URL that maps to an internal port of your sandbox. You can either make this URL fully public or secure it with token-based authentication. Generally speaking:- for file and process management in your sandbox, use the sandbox API or SDK.
- to access running applications within the sandbox (such as a NextJS preview server on port 3000), use a preview URL instead.
Create preview URLs
Expose applications running within the sandbox via a direct preview URL.