8000.
When to publish a port
Publish a port when you need to:- Preview an app generated by an agent.
- Share a local API running inside a computer.
- Receive webhooks during a test run.
- Inspect a notebook, dashboard, or development server.
Publish a service
The following example starts a simple HTTP server on port8000, publishes the port, prints the public URL, lists published ports, and then removes the published port.
1
Start a service and publish its port
Start a server inside the computer, publish the port, and open the returned HTTPS URL in your browser.
The publish command returns a public HTTPS URL that forwards traffic to the service running inside the computer.
Inspect published ports
Use the list command when you need to confirm which ports are currently exposed for a computer.CLI
Published port fields
integer
Port inside the computer that receives forwarded traffic.
string
Public HTTPS URL for the published service.
string
Current published-port state.
Clean up published ports
Published URLs are intended for short-lived development and testing workflows. Remove a published port when you no longer need external access to the service.CLI
Troubleshooting
If the published URL does not load, check that the service is still running inside the computer and listening on the expected port.CLI
Treat published URLs as public. If the service exposes sensitive data or actions, add authentication to the service before sharing the URL.
