Documentation

Install and use the influx CLI

Use the influx CLI to interact with and manage your InfluxDB Cloud instance. Write and query data, generate InfluxDB templates, export data, and more.

Install the influx CLI

  1. Download the influx CLI package from your browser or from the command line.

    Download from your browser

    influx CLI v2.7.5 (amd64) influx CLI v2.7.5 (arm)

    Download from the command line

    # amd64
    wget https://dl.influxdata.com/influxdb/releases/influxdb2-client-2.7.5-linux-amd64.tar.gz
    
    • Copy
    • Fill window
    # arm
    wget https://dl.influxdata.com/influxdb/releases/influxdb2-client-2.7.5-linux-arm64.tar.gz
    
    • Copy
    • Fill window
  2. Unpackage the downloaded binary.

    Note: The following commands are examples. Adjust the filenames, paths, and utilities if necessary.

    # amd64
    tar xvzf ./influxdb2-client-2.7.5-linux-amd64.tar.gz
    
    • Copy
    • Fill window
    # arm
    tar xvzf ./influxdb2-client-2.7.5-linux-arm64.tar.gz
    
    • Copy
    • Fill window
  3. Optional: Place the unpackaged influx executable in your system $PATH.

    # amd64
    sudo cp ./influx /usr/local/bin/
    
    • Copy
    • Fill window
    # arm
    sudo cp ./influx /usr/local/bin/
    
    • Copy
    • Fill window

    If you do not move the influxd binary into your $PATH, enter the path to the binary to start the server–for example:

    ./influx
    
    • Copy
    • Fill window

Set up the influx CLI

Provide required authentication credentials

To avoid having to pass your InfluxDB host, API 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
ORG
\
--token
API_TOKEN
\
--active
  • Copy
  • Fill window

Replace the following:

  • CONFIG_NAME: Connection configuration name.
  • ORG_NAME: your InfluxDB organization.
  • API_TOKEN: your API token.

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

For instructions on how to create API tokens, see Create a token.

Enable shell completion (Optional)

To install influx shell completion scripts, see influx completion.

Use influx CLI commands

For information about influx CLI commands, see the influx CLI reference documentation.


Was this page helpful?

Thank you for your feedback!


The future of Flux

Flux is going into maintenance mode. You can continue using it as you currently are without any changes to your code.

Read more

InfluxDB 3 Core and Enterprise are now in Beta

InfluxDB 3 Core and Enterprise are now available for beta testing, available under MIT or Apache 2 license.

InfluxDB 3 Core is a high-speed, recent-data engine that collects and processes data in real-time, while persisting it to local disk or object storage. InfluxDB 3 Enterprise is a commercial product that builds on Core’s foundation, adding high availability, read replicas, enhanced security, and data compaction for faster queries. A free tier of InfluxDB 3 Enterprise will also be available for at-home, non-commercial use for hobbyists to get the full historical time series database set of capabilities.

For more information, check out:

InfluxDB Cloud powered by TSM