An explicit --use-keyring flag or CODER_USE_KEYRING value now selects the
keyring backend even when --global-config points at a custom directory.
When --use-keyring is left at its default, a custom --global-config still
selects file storage so existing callers keep finding <dir>/session.
Removes the test-only RootCmd.UseKeyringWithGlobalConfig override and the
duplicate clitest.NewWithDefaultKeyringCommand helper.
Closes CLI-1, #29105
Reference for the Coder command-line interface, with usage and flags for every command.
./images/icons/terminal.svg
Usage
coder [global-flags] <subcommand>
Description
Coder — A tool for provisioning self-hosted development environments with Terraform.
- Start a Coder server:
$ coder server
- Get started by creating a template from an example:
$ coder templates init
Specify an authentication token. For security reasons setting CODER_SESSION_TOKEN is preferred.
--no-version-warning
Property
Value
Type
bool
Environment
$CODER_NO_VERSION_WARNING
Suppress warning when client and server versions do not match.
--no-feature-warning
Property
Value
Type
bool
Environment
$CODER_NO_FEATURE_WARNING
Suppress warnings about unlicensed features.
--allow-redirects
Property
Value
Type
bool
Environment
$CODER_ALLOW_REDIRECTS
Follow HTTP redirects from the server instead of returning an error. Following redirects may alter the request method and/or drop its body.
--header
Property
Value
Type
string-array
Environment
$CODER_HEADER
Additional HTTP headers added to all requests. Provide as key=value. Can be specified multiple times.
--header-command
Property
Value
Type
string
Environment
$CODER_HEADER_COMMAND
An external command that outputs additional HTTP headers added to all requests. The command must output each header as key=value on its own line. If a header value is a JWT, it will be refreshed based on the value in its exp field.
--force-tty
Property
Value
Type
bool
Environment
$CODER_FORCE_TTY
Force the use of a TTY.
-v, --verbose
Property
Value
Type
bool
Environment
$CODER_VERBOSE
Enable verbose output.
--flight-recorder-size
Property
Value
Type
int
Environment
$CODER_FLIGHT_RECORDER_SIZE
Default
10
Number of log entries below the current log level to keep in memory and emit on errors. Set to 0 to disable the flight recorder.
--disable-direct-connections
Property
Value
Type
bool
Environment
$CODER_DISABLE_DIRECT_CONNECTIONS
Disable direct (P2P) connections to workspaces.
--disable-network-telemetry
Property
Value
Type
bool
Environment
$CODER_DISABLE_NETWORK_TELEMETRY
Disable network telemetry. Network telemetry is collected when connecting to workspaces using the CLI, and is forwarded to the server. If telemetry is also enabled on the server, it may be sent to Coder. Network telemetry is used to measure network quality and detect regressions.
--client-tls-ca-file
Property
Value
Type
string
Environment
$CODER_CLIENT_TLS_CA_FILE
Path to a CA certificate file to trust for API and DERP connections.
--client-tls-cert-file
Property
Value
Type
string
Environment
$CODER_CLIENT_TLS_CERT_FILE
Path to a client certificate file for mTLS authentication with API and DERP. Requires --client-tls-key-file.
--client-tls-key-file
Property
Value
Type
string
Environment
$CODER_CLIENT_TLS_KEY_FILE
Path to a client private key file for mTLS authentication with API and DERP. Requires --client-tls-cert-file.
--use-keyring
Property
Value
Type
bool
Environment
$CODER_USE_KEYRING
Default
true
Store and retrieve session tokens using the operating system keyring. File-based storage is used when keyring usage is not supported on the current platform, or when --global-config is set and this option is not. Set to false to force file-based storage on supported platforms.