# 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

<tabs sync="interface">
<tabs-item label="Console">

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**.

</tabs-item>

<tabs-item label="CLI">

```bash
featherless-cloud instance update my-instance --port 8000
featherless-cloud instance update my-instance --port 8000 --port 8888
featherless-cloud instance update my-instance --port none
```

`--port` replaces the whole list. `none` removes every port.

</tabs-item>
</tabs>

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:

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

## Protect your service

<warning>

Anyone with the address can reach the port. Protect the service with its own authentication.

</warning>

- **JupyterLab:** set `JUPYTER_TOKEN`. See [Develop in JupyterLab](/examples/jupyterlab).
- **vLLM:** set `VLLM_API_KEY`, and clients send it as a bearer token. See [Serve an LLM with vLLM](/examples/vllm-server).
- **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

<card-group>
<card icon="i-lucide-message-square" title="Serve an LLM with vLLM" to="/examples/vllm-server">

Serve an OpenAI-compatible API on a public port.

</card>

<card icon="i-lucide-notebook-pen" title="Develop in JupyterLab" to="/examples/jupyterlab">

Open JupyterLab through a public port.

</card>
</card-group>
