influx config create
influx config create command creates a InfluxDB connection configuration
and stores it in a local file:
|OS/Platform||CLI config file path|
|Linux (installed as binary)|
|Linux (installed as service)|
To view CLI connection configurations after creating them, use influx config list.
Note: If you create multiple connection configurations (for example, separate admin and user configurations), use
influx config <config-name> to switch to the configuration you want to use.
influx config create [flags]
|Flag||Description||Input type||Maps to ?|
|Set the specified connection to be the active configuration.|
|(Required) Name of the new configuration.||string|
|Help for the |
|Hide table headers (default |
|(Required) Connection URL for the new configuration.||string|
|Output data as JSON (default |
|(OSS only) Username (and optionally password) to use for authentication.|
- Create a connection configuration and set it active
- Create a connection configuration without setting it active
- Create a connection configuration that uses a username and password
Create a connection configuration and set it active
influx config create --active \ -n config-name \ -u http://localhost:8086 \ -t mySuP3rS3cr3tT0keN \ -o example-org
Create a connection configuration without setting it active
influx config create \ -n config-name \ -u http://localhost:8086 \ -t mySuP3rS3cr3tT0keN \ -o example-org
Create a connection configuration that uses a username and password
influx CLI 2.4.0+ lets you create connection configurations
that authenticate with InfluxDB OSS 2.4+ using the username and
password combination that you would use to log into the InfluxDB user interface (UI).
The CLI retrieves a session cookie and stores it, unencrypted, in your
-p option to provide your username and password
If no password is provided, the CLI will prompt for a password after each
command that requires authentication.
influx config create \ -n config-name \ -u http://localhost:8086 \ -p example-user:example-password \ -o example-org
Was this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for InfluxDB and this documentation. To find support, use the following resources:
Customers with an annual or support contract can contact InfluxData Support.