Through RunPod’s Proxy
In this case, you would want to make sure that the port you want to expose (4000 in this case) is set on the Template or Pod configuration page. You can see here that I have added 4000 to the HTTP port list in my pod config. You can also do this on your template definition.
Important Proxy Behavior Notes
When users access their pods via the RunPod proxy, the connection follows this chain:- Cloudflare has a 100-second limit for a connection to remain open.
- If your service does not respond within 100 seconds of a request, the connection will be closed.
- In such cases, the user will receive a
524
error code.
Through TCP Public IP
If your pod supports a public IP address, you can also expose your API over public TCP. In this case, you would add the port to the TCP side of the configuration.

Requesting a Symmetrical Port Mapping
For some applications, asymmetrical port mappings are not ideal. In the above case, we have external port 10027 mapping to internal port 4000. If you need to have a symmetrical port mapping, you can request them by putting in ports above 70000 in your TCP port field.
