> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anonalabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# anona-compute preview

> Share a sandbox port with a signed preview link

```text theme={null}
Print a shareable link to one port of a sandbox, for example a dev server on 3000.

Anyone with the link can open that port in a browser until it expires (--ttl,
default 1h, at most 24h): the sandbox edge exchanges it for a cookie scoped to
that port's host. Other ports and envd stay private.

  anona-compute preview <id> 3000
  anona-compute preview <id> 3000 --ttl 15m
  anona-compute preview <id> --revoke          end every link (and live-view token) of the sandbox
  anona-compute preview <id> 3000 --public     serve the port to anyone, no link needed
  anona-compute preview <id> 3000 --private    back to links only
```

## Usage

```text theme={null}
anona-compute preview SANDBOX_ID [PORT] [flags]
```

## Flags

| Flag | Type | Description |
| - | - | - |
| `--help`, `-h` | | help for preview |
| `--private` | | make the port private again |
| `--public` | | make the port public instead of printing a link |
| `--revoke` | | revoke every preview link and live-view token of the sandbox |
| `--ttl` | duration | link lifetime, 1m to 24h (default 1h) |

Global flags (`--api-key`, `--api-url`, `--json`, `--output`, `--profile`, `--request-timeout`, `--verbose`) work on every command; see [anona-compute](https://docs.anonalabs.com/compute/cli/reference/anona-compute.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.