InfluxDB Docs

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]

Store your InfluxDB authentication token

To avoid having to pass your InfluxDB authentication token with each influx command, use one of the following methods to store your token:

  1. Set the INFLUX_TOKEN environment variable using your token.

    export INFLUX_TOKEN=oOooYourAuthTokenOoooOoOO==
  2. Store your token in ~/.influxdbv2/credentials. The content of the credentials file should be only your token.

If you set up InfluxDB using the CLI, InfluxDB stores your token in the credentials files automatically.

See View tokens for information about retrieving authentication tokens.


authAuthorization management commands
backupBack up data
bucketBucket management commands
completionGenerate completion scripts
configConfiguration management commands
deleteDelete points from InfluxDB
helpHelp about any command
orgOrganization management commands
pingCheck the InfluxDB /health endpoint
pkgManage InfluxDB packages
queryExecute a Flux query
replInteractive REPL (read-eval-print-loop)
secretManage secrets
setupCreate default username, password, org, bucket, etc.
taskTask management commands
transpileManually transpile an InfluxQL query to Flux
userUser management commands
writeWrite points to InfluxDB

Mapped environment variables

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


-h, --helpHelp for the influx command

Global Flags

FlagDescriptionInput typeMaps to ?
--hostHTTP address of InfluxDB (default http://localhost:9999)stringINFLUX_HOST
--localRun commands against the local filesystem
--skip-verifySkip certificate verification (use when connecting over TLS with a self-signed certificate)
-t, --tokenAPI token to use in client callsstringINFLUX_TOKEN