---
layout: docs
page_title: hosts update - Command
description: >-
  The "hosts update" command updates an existing host resource.
---

# hosts update

Command: `hosts update`

The `hosts update` command lets you update an existing host.

## Example

This example updates a host with the ID `hst_1234567890` to add the name `devops` and the description `For DevOps usage`:

```shell-session
$ boundary hosts update -id hst_1234567890 -name devops -description "For DevOps usage"
```

## Usage

<CodeBlockConfig hideClipboard>

```shell-session
$ boundary hosts update [type] <subcommand> [options] [args]

Please see the typed subcommand help for detailed usage information.

Subcommands:
    static    Update a static type host.
```

</CodeBlockConfig>

### Usages by type

The `boundary hosts update static` command lets you update a static type host.

#### Example

This example updates a static type host with the ID `hst_1234567890` to add the name `devops`, the description `Static host for DevOps`, and the address `10.20.30.40`.

```shell-session
$ boundary hosts update static -id hst_1234567890 -name "devops" -description "Static host for DevOps" -address "10.20.30.40"
```

#### Usage

<CodeBlockConfig hideClipboard>

```shell-session
$ boundary hosts update static [options] [args]
```

</CodeBlockConfig>

#### Command options

- `-description=<string>` - The description to set on the host.
- `-id=<string>` - The ID of the host you want to update.
- `-name=<string>` - The name to set on the host.
- `-version=<int>` - The version of the host to update.
If you do not specify a version, the command performs a check-and-set automatically.

#### Static host options

- `-address=<string>` - The address of the static host.

@include 'cmd-option-note.mdx'