influx - InfluxDB command line interface

The influx command line interface (CLI) includes commands to manage many aspects of InfluxDB, including buckets, organizations, users, tasks, etc.


influx [flags]
influx [command]

Provide required authentication credentials

To avoid having to pass your InfluxDB host, authentication token, and organization with each command, store them in an influx CLI configuration (config). influx commands that require these credentials automatically retrieve these credentials from the active config.

Use the influx config create command to create an influx CLI config and set it as active:

influx config create --config-name <config-name> \
  --host-url http://localhost:8086 \
  --org <your-org> \
  --token <your-auth-token \

For more information about managing CLI configurations, see the influx config documentation.


applyApply an InfluxDB template
authAuthentication token management commands
backupBack up data
bucketBucket management commands
completionGenerate completion scripts
configConfiguration management commands
dashboardsList dashboards
deleteDelete points from InfluxDB
exportExport resources as a template
helpHelp about any command
orgOrganization management commands
pingCheck the InfluxDB /health endpoint
queryExecute a Flux query
secretManage secrets
setupCreate default username, password, org, bucket, etc.
stacksManage InfluxDB stacks
taskTask management commands
telegrafsTelegraf configuration management commands
templateSummarize and validate an InfluxDB template
transpileManually transpile an InfluxQL query to Flux
userUser management commands
v1Work with the v1 compatibility API
versionPrint the influx CLI version
writeWrite points to InfluxDB


-h--helpHelp for the influx command

Flag patterns and conventions

The influx CLI uses the following patterns and conventions:

Mapped environment variables

influx CLI flags mapped to environment variables are listed in the Mapped to column. Mapped flags inherit the value of the environment variable. To override environment variables, set the flag explicitly in your command.

Shorthand and longhand flags

Many influx CLI flags support both shorthand and longhand forms.

  • shorthand: a shorthand flag begins with a single hyphen followed by a single letter (for example: -c).
  • longhand: a longhand flag starts with two hyphens followed by a multi-letter, hyphen-spaced flag name (for example: --active-config).

Commands can use both shorthand and longhand flags in a single execution.

Flag input types

influx CLI flag input types are listed in each the table of flags for each command. Flags support the following input types:


Text string, but the flag can be used only once per command execution.


Single text string, but the flag can be used multiple times per command execution.


Sequence of digits representing an integer value.


Length of time represented by an integer and a duration unit (1ns, 1us, 1µs, 1ms, 1s, 1m, 1h, 1d, 1w).

Cloud or OSS?

InfluxDB OSS 2.0 now generally available!

InfluxDB OSS 2.0 is now generally available and ready for production use. See the InfluxDB OSS 2.0 release notes.

For information about upgrading to InfluxDB OSS 2.0, see: