HTTPS Access

This FAQ explains how to make your web applications (e.g. Gradio, FastAPI, Streamlit, Flask) publicly accessible on Trooper.AI GPU servers via HTTP(S). This is especially useful for dashboards, APIs, and user interfaces running inside your Blib or template.

🌐🔢 How many public ports do I get?

Every server on Trooper.AI comes with at least 10 public ports per GPU.
That means:

Most users only need 2–4 ports (e.g. one for their app, one for monitoring, one for WebSocket/API access).

You can check your available ports in the dashboard or request a full list from support.

Public Ports on Tempalte Installs
Public Ports on Tempalte Installs

In this screenshot: From top to button and left to right you see:


🚀 How do I expose my app to the internet?

  1. Start your app listening on 0.0.0.0, not 127.0.0.1 and one of your assigned public ports like 11307

Example (Python/Flask):

bash
flask run --host=0.0.0.0 --port=11307

Example (Gradio):

python
app.launch(server_name="0.0.0.0", server_port=11307)

Example (start a Gradio app from the shell):

bash
python your_app.py --server-name 0.0.0.0 --server-port 11307

Example (Docker):

bash
docker run -p 11307:8080 your-ai-webapp-image
  1. Use one of your assigned public ports, such as 11307

Your app will be accessible at:

Code
http://connectXX.trooper.ai:11307

⚠️ Can I use port 80 or 443?

No. Direct access to port 80 (HTTP) and 443 (HTTPS) is not available for security reasons.

If you need a secure HTTPS endpoint (e.g. for frontend embedding or OAuth redirect):

👉 You get automatically SSL to any template or contact support to ask for help This will map your public port (e.g. 11307) to a secure HTTPS endpoint like:

Code
https://ssl-access-id.app.trooper.ai/

This SSL proxy is included with all GPU plans and activated automatically on every template install. Data is securely routed on our internal network, providing enhanced security and ensuring certificates are specific to your GPU Server Blib’s network environment.


🔒 How can I secure my HTTP app?

You have four main options:

  1. Use our managed HTTPS proxy (recommended) Automatically deployed on template install. Traffic fully routed in internal network directly to your GPU Server Blib!

  2. Run your own reverse proxy (e.g. nginx with Let’s Encrypt) on your public frontend (web)server Note: You’ll still use a non-standard port like 11306 on the GPU server. Make sure to support WebSockets if needed.

  3. Use a tunneling service like SSH tunnel, ngrok or Cloudflare Tunnel This gives you a public HTTPS domain quickly, but makes it difficult to maintain. Use only during rapid development.

  4. Communicate via API (industry standard) Communicate only via API from your public server with your GPU server. This can be combined with (1) the HTTPS proxy or (3) the SSH tunnel. This is the industry standard and used by productive services.


🧪 How can I test if the port is reachable?

From inside your server:

bash
ss -tlnp | grep :11307

You should see:

Code
LISTEN 0 128 0.0.0.0:11307 ...

From your local machine:

bash
curl http://connectXX.trooper.ai:11307

If the port hangs or times out:


🧰 Example: Port forwarding with socat

If your app only runs on localhost:8000, you can forward it:

bash
sudo socat TCP-LISTEN:11307,fork TCP:localhost:8000

This exposes localhost:8000 externally as connectXX.trooper.ai:11307.


🔁 Port Remapping and Additional Ports

Public port ranges are automatically assigned and cannot be modified.

If your application requires more ports than the standard allocation (such as for parallel applications or multi-tenant deployments), please contact our support team after reviewing our documentation thoroughly. It is important to understand that GPU servers are not intended to function as public-facing web servers, and we do not offer the ability to open additional public ports.


🧯 Troubleshooting


🧑‍💻 Example: FastAPI on a public port

python
import uvicorn
uvicorn.run("main:app", host="0.0.0.0", port=11308)

Access it at:

Code
http://connectXX.trooper.ai:11308

Need HTTPS? You should automatically see the lock icon on your template installs pointing to:

Code
https://ssl-token.apps.trooper.ai/

📎 Useful Links


💬 Still stuck?

We’re here to help. Please prepare these information before contacting us: