> For the complete documentation index, see [llms.txt](https://docs.rumi.systems/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rumi.systems/rumi-cli/commands/cloud/civo/run-command.md).

# run-command

Run a shell command on a service instance, over SSH through the bastion.

## Syntax

```bash
rumi cloud civo run-command \
  --api-key <token> \
  --region <region> \
  --network <network> \
  --keyPair <keypair> \
  --service <service> \
  --command <command> \
  [options]
```

## Options

| Option      | Short | Description                                         | Default  |
| ----------- | ----- | --------------------------------------------------- | -------- |
| `--api-key` | `-k`  | The Civo API token to use (or set `CIVO_API_TOKEN`) | Required |
| `--region`  | `-r`  | The Civo region the network is in (e.g. `FRA1`)     | Required |
| `--network` | `-n`  | Name of the network                                 | Required |
| `--keyPair` | `-K`  | The network SSH key pair                            | Required |
| `--service` | `-s`  | The service instance to run the command on          | Required |
| `--command` | `-c`  | The shell command to run                            | Required |

## Example

```bash
rumi cloud civo run-command \
  --api-key $CIVO_API_TOKEN \
  --region FRA1 \
  --network my-cloud \
  --keyPair rumi \
  --service myapp \
  --command "ls -la /home/rumi"
```

## See Also

* [run-admin-script](/rumi-cli/commands/cloud/civo/run-admin-script.md)
* [list-instances](/rumi-cli/commands/cloud/civo/list-instances.md)
* [launch-instance](/rumi-cli/commands/cloud/civo/launch-instance.md)
