Set up InfluxDB 3 Cloud
InfluxDB 3 Cloud is the fully managed, cloud-hosted version of
InfluxDB 3 Enterprise.
InfluxData provisions and operates the InfluxDB 3 servers for you, so you don’t
install, run, or scale servers yourself.
To get started, get your instance host from InfluxData, configure the
influxdb3 CLI, log in, and then create a database.
Get your instance
During early access, InfluxData provisions InfluxDB 3 Cloud instances for you. You can’t sign up for the service yourself. To request early access, see the InfluxDB 3 Cloud product page.
After your instance is provisioned, InfluxData provides your instance host URL, which is the endpoint you connect to. You authenticate with your InfluxData account in the following steps. You don’t copy or store a token for interactive use.
Configure the influxdb3 CLI
The influxdb3 CLI lets you
administer your instance and write and query data from the command line.
Because InfluxDB 3 Cloud is fully managed, you don’t install or run
anything for the service itself. You point the influxdb3 CLI at your hosted
instance and log in with your InfluxData account.
Connect to your instance
Set the INFLUXDB3_HOST_URL environment variable for the influxdb3 CLI to connect to your instance host URL:
export INFLUXDB3_HOST_URL=https://instance-id.enterprise.influxdb.io$env:INFLUXDB3_HOST_URL = "https://instance-id.enterprise.influxdb.io"set INFLUXDB3_HOST_URL=https://instance-id.enterprise.influxdb.io
# Make sure to include a space character at the end of this command.Log in to your instance
Log in to your instance with the OAuth device-code flow. InfluxDB 3 Cloud authenticates you with your InfluxData account, so you don’t need a token to use the CLI interactively.
Run the following command and follow the printed instructions:
influxdb3 auth login --oauthThe output is a URL and a one-time user code.
Open the URL in a browser, enter the code, and approve the request.
After you approve, the CLI saves your credentials to
~/.influxdb3/credentials.json and uses them automatically for later
commands, so you don’t need to pass a token.
Don’t set the INFLUXDB3_AUTH_TOKEN environment variable for interactive use.
If it’s set, the influxdb3 CLI uses that token instead of your logged-in
session. Run influxdb3 auth login --oauth again when your session expires.
List your databases to verify that you’re authenticated:
influxdb3 show databasesA successful response confirms that your host URL and login are configured correctly.
Create a database
Use the
influxdb3 create database command
to create a database.
You can use an existing database or create a new one specifically for this
getting started tutorial.
Examples in this tutorial assume a database named get-started.
Provide the following:
- The database name
- Optional: a database retention period as a duration value. If no retention period is specified, the default is infinite.
influxdb3 create database \
--retention-period 1y \
get-startedReplace the following:
get-started: the name of the database to create1y: the database retention period as a duration
A newly created database can take a few seconds to appear in
influxdb3 show databases.
Create a token for applications
Logging in authenticates you for interactive use with the influxdb3 CLI.
For applications and automated clients, create a database token scoped to
only the databases and permissions it needs.
Creating tokens requires admin privileges. If your user doesn’t have admin
access, ask an administrator to create a token for you.
Use the
influxdb3 create token command
with the --permission option to create a token with read and write access to
your database.
Provide the following:
--permission: A resource permission string in the formatdb:DATABASE_NAME:read,write--name: A unique name for the token
influxdb3 create token \
--permission "db:get-started:read,write" \
--name "Read/write token for get-started database"Replace get-started
with the name of the database to grant the token access to.
The command returns the token string.
Store your token securely
InfluxDB displays the token string only when you create it. Store your token securely—you cannot retrieve it from the database later.
Applications can authenticate with the token by setting the
INFLUXDB3_AUTH_TOKEN environment variable or passing the --token option.
Authentication in InfluxDB 3 Cloud
For interactive use, you authenticate as a user with
influxdb3 auth login --oauth — no token required.
For applications, create and manage tokens with the influxdb3 CLI:
- Database tokens: Grant scoped read and/or write access to specific databases.
- Admin tokens: Grant full administrative access. Create named admin
tokens with
influxdb3 create token --admin --name "NAME".
For more information, see Manage tokens.
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.