How it works
When you open a port, Ona creates a URL with automatic TLS termination. All shared URLs use HTTPS. You can configure whether Ona connects to your service via HTTP (default) or HTTPS.| Deployment | Access |
|---|---|
| Ona Cloud | Internal network - anyone with the URL can access |
| Enterprise Runners | Through your runner’s Network Load Balancer, controlled by your network configuration |
Prerequisites
Services must:- Listen on
0.0.0.0(notlocalhostor127.0.0.1) - Use the host network stack if running inside a container
Host network stack
By default, the Dev Container network is isolated from the VM. For port sharing to work, services must be accessible on the host network. There are several scenarios to consider:Dev Container network mode
To make your Dev Container itself use the host network stack, configure yourdevcontainer.json:
Single container setup:
network_mode: host on all services:
Containers inside Dev Container (Docker-in-Docker)
When running containers inside your Dev Container using Docker-in-Docker, those containers must also share the host network namespace. Otherwise, ports are only accessible within Docker’s bridge network and Ona cannot forward them. Docker run:Ona Tasks and Services
When using Tasks and Services withrunsOn.docker, the host network is used automatically - no additional configuration needed.
Open ports
UI
In the environment sidebar, find “Public Ports” and click “Open Port”. Enter the port number, optional name, and protocol.CLI
Limitations
- Ports 1024–65535 can be exposed. System ports (1–1023) are not supported.
- Not available on local environments
- Subject to fair use policies and bandwidth limits
- Organization administrators can disable port sharing via organization policies. VS Code Browser and agents are exempt from this restriction.
Network flags like
--network=host in build.options are stripped during Dev Container builds. Host network mode is only applied at runtime when the container starts.