# coder server create-admin-user

Create a new admin user with the given username, email and password and adds it to every organization.

## Usage [#usage]

```console
coder server create-admin-user [flags]
```

## Options [#options]

### --postgres-url [#--postgres-url]

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

URL of a PostgreSQL database. If empty, the built-in PostgreSQL deployment will be used (Coder must not be already running in this case).

### --postgres-connection-auth [#--postgres-connection-auth]

|             |                                           |
| ----------- | ----------------------------------------- |
| 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.

### --ssh-keygen-algorithm [#--ssh-keygen-algorithm]

|             |                                             |
| ----------- | ------------------------------------------- |
| Type        | <code>string</code>                         |
| Environment | <code>$CODER\_SSH\_KEYGEN\_ALGORITHM</code> |
| Default     | <code>ed25519</code>                        |

The algorithm to use for generating ssh keys. Accepted values are "ed25519", "ecdsa", or "rsa4096".

### --username [#--username]

|             |                               |
| ----------- | ----------------------------- |
| Type        | <code>string</code>           |
| Environment | <code>$CODER\_USERNAME</code> |

The username of the new user. If not specified, you will be prompted via stdin.

### --email [#--email]

|             |                            |
| ----------- | -------------------------- |
| Type        | <code>string</code>        |
| Environment | <code>$CODER\_EMAIL</code> |

The email of the new user. If not specified, you will be prompted via stdin.

### --password [#--password]

|             |                               |
| ----------- | ----------------------------- |
| Type        | <code>string</code>           |
| Environment | <code>$CODER\_PASSWORD</code> |

The password of the new user. If not specified, you will be prompted via stdin.

### -o, --output [#-o---output]

|         |                         |
| ------- | ----------------------- |
| Type    | <code>text\|json</code> |
| Default | <code>text</code>       |

Output format.

### --raw-url [#--raw-url]

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

Output the raw connection URL instead of a psql command.
