Create a Preview URL
oc preview create <sandbox-id>
Provisions a public HTTPS URL that proxies traffic to the specified port inside the sandbox.
| Flag | Type | Default | Description |
|---|---|---|---|
--port | int | — | Sandbox port to expose (required) |
--domain | string | — | Custom hostname to use instead of the generated one |
List Preview URLs
oc preview list <sandbox-id>
Shows all active preview URLs for a sandbox.
Output:
Delete a Preview URL
oc preview delete <sandbox-id> <port>
Removes the preview URL for the given port. The sandbox keeps running; only the public URL is torn down.
Examples
Share a Dev Server
Expose Multiple Ports
Use a Custom Domain
Custom domains require DNS to point to the OpenComputer ingress and may take a few minutes for SSL to become active.