Instances

Expose ports

Reach a web app, notebook or API on your instance at its own HTTPS address, without SSH.

This page shows how to expose a port, find its address, make your service reachable and protect it.

Expose a port

  1. Open the instance and select the Connect tab.
  2. Under Exposed ports, click Expose ports (or Edit ports).
  3. Enter the ports and click Save ports.

Changes apply right away, without restarting the instance. You can also set ports when you deploy, under Public ports or with --port.

Find the address

Each port's address is listed under Exposed ports on the instance's Connect tab, and featherless-cloud instance get my-instance prints it. The address is made from the instance ID and the port, so it stays the same when the instance stops and starts again. It responds only while the instance is running.

Make your service reachable

  • Listen on 0.0.0.0, not 127.0.0.1. A service that listens only on localhost can't be reached.
  • Keep it running after you disconnect. Start the service from the browser terminal or in tmux, or make it the instance's start command. A program started by a one-off SSH command stops when that SSH session ends.

To check a port end to end, serve a test page and open the address:

mkdir -p /tmp/site && cd /tmp/site && echo "hello" > index.html
python -m http.server 8000

Protect your service

Anyone with the address can reach the port. Protect the service with its own authentication.
  • JupyterLab: set JUPYTER_TOKEN. See Develop in JupyterLab.
  • vLLM: set VLLM_API_KEY, and clients send it as a bearer token. See Serve an LLM with vLLM.
  • Your own app: require a token or a password before serving anything.

What public ports carry

Public ports carry HTTP, including WebSocket and server-sent events. Raw TCP and UDP aren't supported. A connection with no traffic for 300 seconds is closed.

Next steps

Serve an LLM with vLLM

Serve an OpenAI-compatible API on a public port.

Develop in JupyterLab

Open JupyterLab through a public port.