2023-03-23 17:42:20 -05:00
<!-- DO NOT EDIT | GENERATED CONTENT -->
# login
Authenticate with Coder deployment
## Usage
```console
2024-03-11 10:14:19 -04:00
coder login [flags] [<url>]
2023-03-23 17:42:20 -05:00
```
2025-10-30 23:41:08 +00:00
## Description
```console
2025-11-25 18:13:00 -07:00
By default, the session token is stored in the operating system keyring on macOS and Windows and a plain text file on Linux. Use the --use-keyring flag or CODER_USE_KEYRING environment variable to change the storage mechanism.
2025-10-30 23:41:08 +00:00
```
2026-01-29 16:06:17 +01:00
## Subcommands
| Name | Purpose |
|----------------------------------------|---------------------------------|
| [<code>token</code> ](./login_token.md ) | Print the current session token |
2023-03-23 17:42:20 -05:00
## Options
### --first-user-email
| | |
2025-01-03 18:12:59 +05:00
|-------------|--------------------------------------|
2023-03-23 17:42:20 -05:00
| Type | <code>string</code> |
| Environment | <code>$CODER_FIRST_USER_EMAIL</code> |
Specifies an email address to use if creating the first user for the deployment.
2024-03-15 11:24:38 -05:00
### --first-user-username
| | |
2025-01-03 18:12:59 +05:00
|-------------|-----------------------------------------|
2024-03-15 11:24:38 -05:00
| Type | <code>string</code> |
| Environment | <code>$CODER_FIRST_USER_USERNAME</code> |
Specifies a username to use if creating the first user for the deployment.
2024-06-26 09:00:42 +01:00
### --first-user-full-name
| | |
2025-01-03 18:12:59 +05:00
|-------------|------------------------------------------|
2024-06-26 09:00:42 +01:00
| Type | <code>string</code> |
| Environment | <code>$CODER_FIRST_USER_FULL_NAME</code> |
Specifies a human-readable name for the first user of the deployment.
2023-03-23 17:42:20 -05:00
### --first-user-password
| | |
2025-01-03 18:12:59 +05:00
|-------------|-----------------------------------------|
2023-03-23 17:42:20 -05:00
| Type | <code>string</code> |
| Environment | <code>$CODER_FIRST_USER_PASSWORD</code> |
Specifies a password to use if creating the first user for the deployment.
### --first-user-trial
| | |
2025-01-03 18:12:59 +05:00
|-------------|--------------------------------------|
2023-03-23 17:42:20 -05:00
| Type | <code>bool</code> |
| Environment | <code>$CODER_FIRST_USER_TRIAL</code> |
Specifies whether a trial license should be provisioned for the Coder deployment or not.
2023-07-05 08:59:38 -04:00
### --use-token-as-session
| | |
2025-01-03 18:12:59 +05:00
|------|-------------------|
2023-07-05 08:59:38 -04:00
| Type | <code>bool</code> |
By default, the CLI will generate a new session token when logging in. This flag will instead use the provided token as the session token.