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

# Instances

> Manage compute instances.

**Aliases:** `instances`, `inst`

## Subcommands

* [list](#list) — List instances
* [get](#get) — Get instance details
* [create](#create) — Create a new instance
* [update](#update) — Update an existing instance
* [delete](#delete) — Delete an instance
* [start](#start) — Start an instance
* [stop](#stop) — Stop an instance
* [reboot](#reboot) — Reboot an instance
* [snapshot](#snapshot) — Create a snapshot from an instance
* [ssh](#ssh) — Open an SSH session to an instance
* [sshkey](#sshkey) — Get an instance's SSH key
* [consoleoutput](#consoleoutput) — Get instance console output
* [consolesession](#consolesession) — Get a VNC console session URL

***

## list

List compute instances, optionally filtered by organization, project, network, or region.

```bash theme={null}
nscale instances list [flags]
```

### Flags

<table>
  <thead><tr><th>Flag</th><th>Description</th></tr></thead>

  <tbody>
    <tr><td><code>--org string</code></td><td>Organization ID</td></tr>
    <tr><td><code>--project string</code></td><td>Project ID</td></tr>
    <tr><td><code>--network string</code></td><td>Network ID</td></tr>
    <tr><td><code>--region string</code></td><td>Region ID</td></tr>

    <tr>
      <td><code>--json</code></td>
      <td>Emit the full JSON payload (mutually exclusive with <code>-q</code>)</td>
    </tr>

    <tr>
      <td><code>-q, --query stringArray</code></td>
      <td>jq filter for value extraction (see <a href="/docs/cli/query-output">Query output with <code>-q</code></a>)</td>
    </tr>
  </tbody>
</table>

### Example

```bash theme={null}
nscale instances list --org <org-id> --region <region-id>
```

***

## get

Get details for a specific instance.

```bash theme={null}
nscale instances get --id <instance-id> --org <org-id>
```

### Flags

<table>
  <thead><tr><th>Flag</th><th>Description</th></tr></thead>

  <tbody>
    <tr><td><code>--id string</code></td><td>Instance ID</td></tr>
    <tr><td><code>--org string</code></td><td>Organization ID</td></tr>

    <tr>
      <td><code>--json</code></td>
      <td>Emit the full JSON payload (mutually exclusive with <code>-q</code>)</td>
    </tr>

    <tr>
      <td><code>-q, --query stringArray</code></td>
      <td>jq filter for value extraction (see <a href="/docs/cli/query-output">Query output with <code>-q</code></a>)</td>
    </tr>
  </tbody>
</table>

***

## create

Create a new compute instance. Accepts input from a JSON file or stdin. Optionally supply a cloud-init configuration or bind an SSH certificate authority.

```bash theme={null}
nscale instances create [flags]
```

### Flags

<table>
  <thead><tr><th>Flag</th><th>Description</th></tr></thead>

  <tbody>
    <tr><td><code>-f, --file string</code></td><td>Path to a JSON file</td></tr>
    <tr><td><code>--stdin</code></td><td>Read JSON from standard input</td></tr>
    <tr><td><code>--cloud-init-path string</code></td><td>Path to a cloud-init YAML file</td></tr>
    <tr><td><code>--ssh-ca-id string</code></td><td>SSH certificate authority ID to bind (pass empty string to clear)</td></tr>
    <tr><td><code>--dry-run</code></td><td>Preview the request payload without persisting</td></tr>
    <tr><td><code>-y, --yes</code></td><td>Automatically confirm creation</td></tr>

    <tr>
      <td><code>--json</code></td>
      <td>Emit the full JSON payload (mutually exclusive with <code>-q</code>)</td>
    </tr>

    <tr>
      <td><code>-q, --query stringArray</code></td>
      <td>jq filter for value extraction (see <a href="/docs/cli/query-output">Query output with <code>-q</code></a>)</td>
    </tr>
  </tbody>
</table>

### Examples

```bash theme={null}
nscale instances create --file instance.json
nscale instances create --stdin < instance.json
cat instance.json | nscale instances create --stdin
```

***

## update

Update an existing instance.

```bash theme={null}
nscale instances update --id <instance-id> [flags]
```

### Flags

<table>
  <thead><tr><th>Flag</th><th>Description</th></tr></thead>

  <tbody>
    <tr><td><code>--id string</code></td><td>Instance ID</td></tr>
    <tr><td><code>--org string</code></td><td>Organization ID</td></tr>
    <tr><td><code>-f, --file string</code></td><td>Path to a JSON file</td></tr>
    <tr><td><code>--stdin</code></td><td>Read JSON from standard input</td></tr>
    <tr><td><code>--ssh-ca-id string</code></td><td>SSH certificate authority ID to bind to the instance (pass an empty string to clear)</td></tr>
    <tr><td><code>--dry-run</code></td><td>Preview the request payload without persisting</td></tr>
    <tr><td><code>-y, --yes</code></td><td>Automatically confirm update</td></tr>

    <tr>
      <td><code>--json</code></td>
      <td>Emit the full JSON payload (mutually exclusive with <code>-q</code>)</td>
    </tr>

    <tr>
      <td><code>-q, --query stringArray</code></td>
      <td>jq filter for value extraction (see <a href="/docs/cli/query-output">Query output with <code>-q</code></a>)</td>
    </tr>
  </tbody>
</table>

### Examples

```bash theme={null}
nscale instances update --id <instance-id> --file instance.json
nscale instances update --id <instance-id> --stdin < instance.json
cat instance.json | nscale instances update --id <instance-id> --stdin
```

***

## delete

Delete an existing instance.

```bash theme={null}
nscale instances delete --id <instance-id> --org <org-id> [flags]
```

### Flags

| Flag           | Description                                    |
| -------------- | ---------------------------------------------- |
| `--id string`  | Instance ID                                    |
| `--org string` | Organization ID                                |
| `--dry-run`    | Preview the request payload without persisting |
| `-y, --yes`    | Automatically confirm deletion                 |

***

## start

Start a stopped instance.

```bash theme={null}
nscale instances start --id <instance-id> --org <org-id> [flags]
```

### Flags

| Flag           | Description                                    |
| -------------- | ---------------------------------------------- |
| `--id string`  | Instance ID                                    |
| `--org string` | Organization ID                                |
| `--dry-run`    | Preview the request payload without persisting |
| `-y, --yes`    | Automatically confirm start                    |

***

## stop

Stop a running instance.

```bash theme={null}
nscale instances stop --id <instance-id> --org <org-id> [flags]
```

### Flags

| Flag           | Description                                    |
| -------------- | ---------------------------------------------- |
| `--id string`  | Instance ID                                    |
| `--org string` | Organization ID                                |
| `--dry-run`    | Preview the request payload without persisting |
| `-y, --yes`    | Automatically confirm stop                     |

***

## reboot

Reboot an instance. Use `--hard` for a hard reboot.

```bash theme={null}
nscale instances reboot --id <instance-id> --org <org-id> [flags]
```

### Flags

| Flag           | Description                                    |
| -------------- | ---------------------------------------------- |
| `--id string`  | Instance ID                                    |
| `--org string` | Organization ID                                |
| `--hard`       | Use hard reboot                                |
| `--dry-run`    | Preview the request payload without persisting |
| `-y, --yes`    | Automatically confirm reboot                   |

***

## snapshot

Create an image snapshot from an instance. Accepts input from a JSON file or stdin.

```bash theme={null}
nscale instances snapshot --id <instance-id> [flags]
```

### Flags

<table>
  <thead><tr><th>Flag</th><th>Description</th></tr></thead>

  <tbody>
    <tr><td><code>--id string</code></td><td>Instance ID</td></tr>
    <tr><td><code>--org string</code></td><td>Organization ID</td></tr>
    <tr><td><code>-f, --file string</code></td><td>Path to a JSON file</td></tr>
    <tr><td><code>--stdin</code></td><td>Read JSON from standard input</td></tr>
    <tr><td><code>--dry-run</code></td><td>Preview the request payload without persisting</td></tr>
    <tr><td><code>-y, --yes</code></td><td>Automatically confirm snapshot</td></tr>

    <tr>
      <td><code>--json</code></td>
      <td>Emit the full JSON payload (mutually exclusive with <code>-q</code>)</td>
    </tr>

    <tr>
      <td><code>-q, --query stringArray</code></td>
      <td>jq filter for value extraction (see <a href="/docs/cli/query-output">Query output with <code>-q</code></a>)</td>
    </tr>
  </tbody>
</table>

### Examples

```bash theme={null}
nscale instances snapshot --id <instance-id> --file snapshot.json
nscale instances snapshot --id <instance-id> --stdin < snapshot.json
cat snapshot.json | nscale instances snapshot --id <instance-id> --stdin
```

***

## ssh

Open an interactive SSH session to an instance using the system SSH client.

```bash theme={null}
nscale instances ssh --id <instance-id> [flags]
```

### Flags

| Flag                    | Description                        |
| ----------------------- | ---------------------------------- |
| `--id string`           | Instance ID                        |
| `--org string`          | Organization ID                    |
| `-l, --ssh-user string` | SSH login user (default: `"root"`) |

### Examples

```bash theme={null}
nscale instances ssh --id <instance-id>
nscale instances ssh --org <org-id>
nscale instances ssh --id <instance-id> --ssh-user ubuntu
nscale instances ssh --id <instance-id> -l ubuntu
nscale instances ssh -l ubuntu
nscale instances ssh --id <instance-id> -- -L 8443:127.0.0.1:443
```

***

## sshkey

Get the SSH key for an instance.

```bash theme={null}
nscale instances sshkey --id <instance-id> --org <org-id>
```

### Flags

<table>
  <thead><tr><th>Flag</th><th>Description</th></tr></thead>

  <tbody>
    <tr><td><code>--id string</code></td><td>Instance ID</td></tr>
    <tr><td><code>--org string</code></td><td>Organization ID</td></tr>

    <tr>
      <td><code>--json</code></td>
      <td>Emit the full JSON payload (mutually exclusive with <code>-q</code>)</td>
    </tr>

    <tr>
      <td><code>-q, --query stringArray</code></td>
      <td>jq filter for value extraction (see <a href="/docs/cli/query-output">Query output with <code>-q</code></a>)</td>
    </tr>
  </tbody>
</table>

***

## consoleoutput

Retrieve the serial console output of an instance.

```bash theme={null}
nscale instances consoleoutput --id <instance-id> --org <org-id> [flags]
```

### Flags

<table>
  <thead><tr><th>Flag</th><th>Description</th></tr></thead>

  <tbody>
    <tr><td><code>--id string</code></td><td>Instance ID</td></tr>
    <tr><td><code>--org string</code></td><td>Organization ID</td></tr>
    <tr><td><code>--length int</code></td><td>Output length in bytes (0 uses API default)</td></tr>

    <tr>
      <td><code>--json</code></td>
      <td>Emit the full JSON payload (mutually exclusive with <code>-q</code>)</td>
    </tr>

    <tr>
      <td><code>-q, --query stringArray</code></td>
      <td>jq filter for value extraction (see <a href="/docs/cli/query-output">Query output with <code>-q</code></a>)</td>
    </tr>
  </tbody>
</table>

***

## consolesession

Get a VNC console session URL for an instance.

```bash theme={null}
nscale instances consolesession --id <instance-id> --org <org-id>
```

### Flags

| Flag           | Description     |
| -------------- | --------------- |
| `--id string`  | Instance ID     |
| `--org string` | Organization ID |

***

## Related

<CardGroup cols={2}>
  <Card title="Instances (Console)" icon="browser" href="/docs/compute/create-new-instances">
    Create and manage instances via the Console UI.
  </Card>

  <Card title="Custom Images" icon="image" href="/docs/storage/custom-images">
    Upload and use custom OS images for instances.
  </Card>
</CardGroup>
