influxdb3 CLI
The influxdb3 CLI writes and queries data and administers your
InfluxDB 3 Cloud instance from the command line.
Because InfluxDB 3 Cloud is fully managed, the CLI connects to your hosted
instance instead of running a local server.
Connect and authenticate
The CLI connects to http://127.0.0.1:8181 by default. Before you run commands,
set your instance host and authenticate:
- Host: Set the
INFLUXDB3_HOST_URLenvironment variable, or pass--host, to your instance host URL. - Authentication:
- For interactive use, log in with the OAuth device-code flow:
influxdb3 auth login --oauth. Don’t setINFLUXDB3_AUTH_TOKENfor interactive use. - For applications and automated clients, use a database token: set the
INFLUXDB3_AUTH_TOKENenvironment variable, or pass--token.
- For interactive use, log in with the OAuth device-code flow:
For setup steps, see Set up InfluxDB 3 Cloud.
Commonly used commands
influxdb3 create database: Create a databaseinfluxdb3 create token --admin: Create a named admin tokeninfluxdb3 create token --permission: Create a scoped database tokeninfluxdb3 show tokens: List tokensinfluxdb3 delete token: Delete a tokeninfluxdb3 write: Write data to a databaseinfluxdb3 query: Query data in a database
InfluxDB 3 Cloud runs the same InfluxDB 3 engine as InfluxDB 3 Enterprise,
so the influxdb3 CLI works the same way. Server-management commands like
serve don’t apply, because InfluxData runs the server for you.
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 3 Cloud and this documentation. To find support, use the following resources:
Customers with an annual or support contract can contact InfluxData Support.