---
title: "pols host"
description: "Publish a sandbox port over HTTPS, or list published ports"
---

<!-- Generated by scripts/reference.mjs from the pols CLI's --help. Do not edit; run `npm run reference:sync`. -->

Publish PORT of a sandbox at https://\<sandbox\>-\<port\>.on.pols.so and print a
link to open it. Ports are private: the link logs your browser in to that
one address for 12 hours, and must be opened within 5 minutes. Run the
command again for a new link. With `--public` anyone can open the URL.

The service must listen on the sandbox's network interface (0.0.0.0), not
only on 127.0.0.1. Without PORT, list the published ports.

## Usage

```text
pols host SANDBOX [PORT] [flags]
```

## Examples

```sh
pols host web 3000            # private; prints a login link
pols host web 8080 --public   # anyone with the URL
pols host web                 # list
pols host web 8080 --remove   # stop publishing
```

## Flags

```text
-h, --help     help for host
    --public   let anyone open the URL, without a login link
    --remove   stop publishing the port
```

The [global flags](/reference/cli/#global-flags) work with this command too.
