# coder server dbcrypt rotate

Rotate database encryption keys.

## Usage

```console
coder server dbcrypt rotate [flags]
```

## Options

### --postgres-url

| Property    | Value                                    |
| ----------- | ---------------------------------------- |
| Type        | <code>string</code>                      |
| Environment | <code>$CODER\_PG\_CONNECTION\_URL</code> |

The connection URL for the Postgres database.

### --postgres-connection-auth

| Property    | Value                                     |
| ----------- | ----------------------------------------- |
| Type        | <code>password\|awsiamrds</code>          |
| Environment | <code>$CODER\_PG\_CONNECTION\_AUTH</code> |
| Default     | <code>password</code>                     |

Type of auth to use when connecting to postgres.

### --new-key

| Property    | Value                                                               |
| ----------- | ------------------------------------------------------------------- |
| Type        | <code>string</code>                                                 |
| Environment | <code>$CODER\_EXTERNAL\_TOKEN\_ENCRYPTION\_ENCRYPT\_NEW\_KEY</code> |

The new external token encryption key. Must be base64-encoded.

### --old-keys

| Property    | Value                                                                |
| ----------- | -------------------------------------------------------------------- |
| Type        | <code>string-array</code>                                            |
| Environment | <code>$CODER\_EXTERNAL\_TOKEN\_ENCRYPTION\_ENCRYPT\_OLD\_KEYS</code> |

The old external token encryption keys. Must be a comma-separated list of base64-encoded keys.

### -y, --yes

| Property | Value             |
| -------- | ----------------- |
| Type     | <code>bool</code> |

Bypass confirmation prompts.
