content/influxdb3/cloud-dedicated/reference/cli/influxctl/_index.md
The influxctl command line interface (CLI) writes to, queries, and performs
administrative tasks in an {{< product-name omit=" Clustered" >}} cluster and
provides a scriptable way to manage your {{% product-name %}} resources.
influxctl [global-flags] [command]
| Command | Description |
|---|---|
| auth | Log in to or log out of InfluxDB 3 |
| cluster | List InfluxDB 3 cluster information |
| database | Manage InfluxDB 3 databases |
| help | Output influxctl help information |
| management | Manage InfluxDB 3 management tokens |
| query | Query data from InfluxDB 3 |
| token | Manage InfluxDB 3 database tokens |
| user | Manage InfluxDB 3 cluster users |
| version | Output the current influxctl version |
| write | Write line protocol to InfluxDB 3 |
| Flag | Description | |
|---|---|---|
--debug | Enable debug logging | |
--account | Override account ID value in configuration file | |
--cluster | Override cluster ID value in configuration file | |
--config | Path to configuration file to use | |
--profile | Specify a connection profile to use (default is default) | |
--timeout | Specify a timeout duration for API calls (default is 1m0s) | |
--trace | Enable more verbose debug logging | |
-h | --help | Show help |
{{< tabs-wrapper >}} {{% tabs %}} macOS Linux Windows {{% /tabs %}}
<!---------------------------- BEGIN MACOS CONTENT ---------------------------->{{% tab-content %}}
Use one of the following options to download and install influxctl on macOS:
Use brew tap to add the influxdata/tap repository to the list of
formulae that Homebrew tracks, updates, and installs from:
brew tap influxdata/tap
Install the influxctl package:
brew install influxctl
Download the influxctl CLI package appropriate for your CPU type.
Download the package from your browser or command line.
<a class="btn download" href="https://dl.influxdata.com/influxctl/releases/influxctl-v{{< latest-influxctl >}}-darwin-x86_64.zip" download>influxctl CLI v{{< latest-influxctl >}} (x86_64)</a> <a class="btn download" href="https://dl.influxdata.com/influxctl/releases/influxctl-v{{< latest-influxctl >}}-darwin-arm64.zip" download>influxctl CLI v{{< latest-influxctl >}} (arm64)</a>
# x86_64
curl -Oo ~/Downloads/ https://dl.influxdata.com/influxctl/releases/influxctl-v{{< latest-influxctl >}}-darwin-x86_64.zip
# arm64
curl -Oo ~/Downloads/ https://dl.influxdata.com/influxctl/releases/influxctl-v{{< latest-influxctl >}}-darwin-arm64.zip
Unpackage the downloaded package.
Do one of the following:
# x86_64
unzip ~/Downloads/influxctl-v{{< latest-influxctl >}}-darwin-x86_64.zip
# arm64
unzip ~/Downloads/influxctl-v{{< latest-influxctl >}}-darwin-arm64.zip
(Optional) Place the binary in your $PATH.
# x86_64
sudo cp ~/Downloads/influxctl-v{{< latest-influxctl >}}-darwin-x86_64/influxctl /usr/local/bin/
# arm64
sudo cp ~/Downloads/influxctl-v{{< latest-influxctl >}}-darwin-arm64/influxctl /usr/local/bin/
Create a connection profile that stores connection credentials for your cluster.
{{% /tab-content %}}
<!----------------------------- END MACOS CONTENT -----------------------------> <!---------------------------- BEGIN LINUX CONTENT ---------------------------->{{% tab-content %}}
To download the Linux influxctl package, do one of the following:
{{< code-tabs-wrapper >}} {{% code-tabs %}} Ubuntu & Debian (.deb) Red Hat & CentOS (.rpm) {{% /code-tabs %}} {{% code-tab-content %}}
# influxdata-archive.key GPG fingerprint:
# Primary key fingerprint: 24C9 75CB A61A 024E E1B6 3178 7C3D 5715 9FC2 F927
# Subkey fingerprint: 9D53 9D90 D332 8DC7 D6C8 D3B9 D8FF 8E1F 7DF8 B07E
wget -q https://repos.influxdata.com/influxdata-archive.key
gpg --show-keys --with-fingerprint --with-colons ./influxdata-archive.key 2>&1 | grep -q '^fpr:\+24C975CBA61A024EE1B631787C3D57159FC2F927:$' && cat influxdata-archive.key | gpg --dearmor | sudo tee /etc/apt/keyrings/influxdata-archive.gpg > /dev/null
echo 'deb [signed-by=/etc/apt/keyrings/influxdata-archive.gpg] https://repos.influxdata.com/debian stable main' | sudo tee /etc/apt/sources.list.d/influxdata.list
sudo apt-get update && sudo apt-get install influxctl
{{% /code-tab-content %}} {{% code-tab-content %}}
# influxdata-archive.key GPG fingerprint:
# Primary key fingerprint: 24C9 75CB A61A 024E E1B6 3178 7C3D 5715 9FC2 F927
# Subkey fingerprint: 9D53 9D90 D332 8DC7 D6C8 D3B9 D8FF 8E1F 7DF8 B07E
cat <<EOF | sudo tee /etc/yum.repos.d/influxdata.repo
[influxdata]
name = InfluxData Repository - Stable
baseurl = https://repos.influxdata.com/stable/\$basearch/main
enabled = 1
gpgcheck = 1
gpgkey = https://repos.influxdata.com/influxdata-archive.key
EOF
sudo yum install influxctl
{{% /code-tab-content %}} {{< /code-tabs-wrapper >}}
Download the influxctl CLI package appropriate for your CPU type.
Download the package from your browser or command line.
<a class="btn download" href="https://dl.influxdata.com/influxctl/releases/influxctl-v{{< latest-influxctl >}}-linux-x86_64.tar.gz" download>influxctl CLI v{{< latest-influxctl >}} (x86_64)</a> <a class="btn download" href="https://dl.influxdata.com/influxctl/releases/influxctl-v{{< latest-influxctl >}}-linux-arm64.tar.gz" download>influxctl CLI v{{< latest-influxctl >}} (arm64)</a>
# amd64
curl -O https://dl.influxdata.com/influxctl/releases/influxctl-v{{< latest-influxctl >}}-linux-x86_64.tar.gz
# arm64
curl -O https://dl.influxdata.com/influxctl/releases/influxctl-v{{< latest-influxctl >}}-linux-arm64.tar.gz
Unpackage the downloaded package.
# amd64
tar zxvf influxctl-v{{< latest-influxctl >}}-linux-x86_64.tar.gz
# arm64
tar zxvf influxctl-v{{< latest-influxctl >}}-linux-arm64.tar.gz
(Optional) Place the binary in your $PATH.
# amd64
sudo cp influxctl-v{{< latest-influxctl >}}-darwin-x86_64/influxctl /usr/local/bin/
# arm64
sudo cp influxctl-v{{< latest-influxctl >}}-darwin-arm64/influxctl /usr/local/bin/
Create a connection profile that stores connection credentials for your cluster.
{{% /tab-content %}}
<!----------------------------- END LINUX CONTENT -----------------------------> <!--------------------------- BEGIN WINDOWS CONTENT --------------------------->{{% tab-content %}}
Download the influxctl CLI package.
<a class="btn download" href="https://dl.influxdata.com/influxctl/releases/influxctl-v{{< latest-influxctl >}}-windows-x86_64.zip" download>influxctl CLI v{{< latest-influxctl >}} (x86_64)</a>
Expand the downloaded archive.
Expand the downloaded archive into C:\Program Files\InfluxData\ and rename it if desired.
Expand-Archive .\influxctl-v{{< latest-influxctl >}}-windows-x86_64.zip `
-DestinationPath 'C:\Program Files\InfluxData\'
mv 'C:\Program Files\InfluxData\influxctl-v{{< latest-influxctl >}}-windows-x86_64' `
'C:\Program Files\InfluxData\influxctl'
Grant network access to the influxctl CLI.
When using the influxctl CLI for the first time, Windows Defender displays
the following message:
Windows Defender Firewall has blocked some features of this app.
To grant the influxctl CLI the required access, do the following:
Select Private networks, such as my home or work network. Click Allow access.
Create a connection profile that stores connection credentials for your cluster.
{{% /tab-content %}}
<!---------------------------- END WINDOWS CONTENT ---------------------------->{{< /tabs-wrapper >}}
To connect with your InfluxDB Cloud Dedicated cluster, influxctl needs the
following credentials:
Create a config.toml that includes the necessary credentials.
If stored at the default location
for your operating system, influxctl automatically detects and uses the connection
profile configurations.
If stored at a non-default location, include the --config flag with each
influxctl command and provide the path to your profile configuration file.
{{< expand-wrapper >}}
{{% expand "View sample config.toml" %}}
{{% code-placeholders "(PROFILE|ACCOUNT|CLUSTER)_(NAME|ID)" %}}
## influxctl - example configuration
[[profile]]
## Profile name
## Users can define multiple profile sections and reference them via the
## `--profile {name}` global option. By default, the profile named
## "default" is loaded and used.
name = "PROFILE_NAME"
## Product type
## Choose from "clustered" or "dedicated"
product = "dedicated"
## Host and port
## InfluxDB hostname/IP address and port. Used for query and write subcommands.
## Required for InfluxDB Clustered.
host = "{{< influxdb/host >}}"
# port = "443"
## Database and token
## Used for the query and write subcommands
# database = ""
# token = ""
### Dedicated Specific Options ###
## Account ID and cluster ID
account_id = "ACCOUNT_ID"
cluster_id = "CLUSTER_ID"
## Custom client-side TLS certs
## By default, the system certificates are used. If a custom certificate
## for connecting to InfluxDB is required, define it below.
# [profile.tls]
# insecure = false
# cert = ""
# key = ""
# ca = ""
## OAuth2 client authorization settings
# [profile.auth.oauth2]
# client_id = ""
# scopes = [""]
# parameters = { audience = "" }
# token_url = "https://indentityprovider/oauth2/v2/token"
# device_url = "https://indentityprovider/oauth2/v2/auth/device"
{{% /code-placeholders %}}
Replace the following values in the sample:
PROFILE_NAME{{% /code-placeholder-key %}}:
Use default for your default connection profile or a custom name for a
non-default profileACCOUNT_ID{{% /code-placeholder-key %}}:
InfluxDB Cloud Dedicated account IDCLUSTER_ID{{% /code-placeholder-key %}}:
InfluxDB Cloud Dedicated cluster ID{{% /expand %}} {{< /expand-wrapper >}}
The influxctl CLI checks for connection profiles in a config.toml file at a
default location based on your operating system:
| Operating system | Default profile configuration file path |
|---|---|
| Linux | ~/.config/influxctl/config.toml |
| macOS | ~/Library/Application Support/influxctl/config.toml |
| Windows | %APPDATA%\influxctl\config.toml |
The influxctl CLI uses Auth0 to authenticate access to
your InfluxDB Cloud Dedicated cluster.
When you issue an influxctl command, the CLI checks for an active Auth0 token.
If none exists, you are directed to login to Auth0 via a browser using
credentials you should have created when setting up your InfluxDB Cloud
Dedicated cluster.
Auth0 issues a short-lived (1 hour) token that authenticates access to your
InfluxDB Cloud Dedicated cluster.
Not loading module "atk-bridge": When authenticating, some Linux systems might report the following warning in the terminal (on stderr):
Not loading module "atk-bridge": The functionality is provided by GTK natively. Please try to not load it.
To silence the warning when running influxctl commands, unset the GTK_MODULES environment variable (or remove gail:atk-bridge from its value)--for example:
GTK_MODULES= influxctl ...