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

# devbox url

> Expose Devbox ports through devbox.so URLs and manage their access.

Use `devbox url` to expose HTTP ports through `devbox.so`, retrieve or remove exposed URLs, and inspect or change access for all exposed URLs on a Devbox.

## Usage

```bash theme={null}
devbox url [command]
```

## Options

**--show\_all** `boolean` (default: false)

Include Devboxes owned by other workspace members when selecting a Devbox. This option is inherited by each `devbox url` subcommand.

## `devbox url expose`

Expose one or more ports. Repeating an existing matching exposure returns it instead of creating a duplicate. A name can only be used when exposing one port.

> [!NOTE]
>
> `devbox url create` is an alias for `devbox url expose`.

### Usage

```bash Canonical theme={null}
devbox url expose [devbox-name] --port <port> [--port <port>...] [flags]
```

```bash Alias theme={null}
devbox url create [devbox-name] --port <port> [--port <port>...] [flags]
```

### Expose an HTTP port

```bash Canonical theme={null}
devbox url expose main --port 3000
```

```bash Alias theme={null}
devbox url create main --port 3000
```

### Options

**--port** `uints` *required* (default: \[])

Specify a port to expose. Repeat the option or use a comma-separated value to expose multiple ports. Ports must be between `1` and `65535` without duplicates.

**--access** `string`

Set access for all exposed URLs to `private` or `workspace` after exposing the requested ports.

**--name** `string`

Assign a name to a single exposed port.

**-o, --output** `string`

Set the output format to `json` or `table`. Leave empty for the default table.

***

## `devbox url unexpose`

Remove exposed URLs by port or by name. Specify exactly one selector form. Ports or names that are not currently exposed are ignored.

> [!NOTE]
>
> `devbox url delete` is an alias for `devbox url unexpose`.

### Usage

```bash Canonical theme={null}
devbox url unexpose [devbox-name] (--port <port> [--port <port>...] | --name <name>) [flags]
```

```bash Alias theme={null}
devbox url delete [devbox-name] (--port <port> [--port <port>...] | --name <name>) [flags]
```

### Remove an exposed URL

```bash Canonical theme={null}
devbox url unexpose main --port 3000
```

```bash Alias theme={null}
devbox url delete main --port 3000
```

### Options

**--name** `string`

Remove the URL with this name. Specify exactly one of `--name` or `--port`.

**-o, --output** `string`

Accept an output format of `json` or `table`. This version produces no output when URLs are removed.

**--port** `uints` (default: \[])

Remove URLs for these ports. Repeat the option or use a comma-separated value. Specify exactly one of `--port` or `--name`.

***

## `devbox url get`

Return exposed URLs selected by port or by name. Specify exactly one selector form. Every requested port, or the requested name, must have an exposed URL.

### Usage

```bash theme={null}
devbox url get [devbox-name] (--port <port> [--port <port>...] | --name <name>) [flags]
```

### Get a URL by name

```bash theme={null}
devbox url get main --name web
```

### Options

**--name** `string`

Return the exposed URL with this name. Specify exactly one of `--name` or `--port`.

**-o, --output** `string`

Set the output format to `json` or `table`. Leave empty for the default table.

**--port** `uints` (default: \[])

Return URLs for these ports. Repeat the option or use a comma-separated value. Specify exactly one of `--port` or `--name`.

***

## `devbox url list`

List all exposed HTTP URLs for a Devbox, sorted by port number.

### Usage

```bash theme={null}
devbox url list [devbox-name] [flags]
```

### List exposed URLs as JSON

```bash theme={null}
devbox url list main --output json
```

### Options

**-o, --output** `string`

Set the output format to `json` or `table`. Leave empty for the default table.

***

## `devbox url access`

Print the current access mode for a Devbox's exposed URLs. Pass `--mode` to change the mode to owner-only `private` access or workspace-wide `workspace` access.

### Usage

```bash theme={null}
devbox url access [devbox-name] [flags]
```

### Set workspace access

```bash theme={null}
devbox url access main --mode workspace
```

### Options

**--mode** `string`

Set the access mode to `private` or `workspace`. Leave empty to inspect the current mode without changing it.

**-o, --output** `string`

Set the output format to `json` or `text`. Leave empty for the default text output.

## Related topics

> [card] [Shareable URLs](https://namespace.so/docs/devbox/url.md)
>
> Expose an HTTP service running on a Devbox.

> [card] [SSH & Sessions](https://namespace.so/docs/devbox/connecting.md#ssh)
>
> SSH access and SSH config for a Devbox.


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