Documentation

Create a bucket

This page documents an earlier version of InfluxDB OSS. InfluxDB 3 Core is the latest stable version.

Use the InfluxDB user interface (UI), the influx command line interface (CLI), or the InfluxDB API to create a bucket.

Bucket limits

A single InfluxDB 2.7 OSS instance supports approximately 20 buckets actively being written to or queried across all organizations depending on the use case. Any more than that can adversely affect performance.

Use the influx bucket create command to create a new bucket.

Include the following flags with the command:

  • -n, --name: Bucket name (see Bucket naming restrictions)
  • -o, --org or --org-id: Organization name or ID
  • -r, --retention: Bucket retention period (duration to keep data) in one of the following units:
    • nanoseconds (ns)
    • microseconds (us or µs)
    • milliseconds (ms)
    • seconds (s)
    • minutes (m)
    • hours (h)
    • days (d)
    • weeks (w)

The minimum retention period is one hour.

# Syntax
influx bucket create \
  --name <bucket-name> \
  --org <org-name> \
  --retention <retention-period-duration>

# Example
influx bucket create \
  --name my-bucket \
  --org my-org \
  --retention 72h
  • Copy
  • Fill window

Bucket naming restrictions

Bucket names must adhere to the following naming restrictions:

  • Must contain two or more characters
  • Cannot start with an underscore (_)
  • Cannot contain a double quote (")

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

Now Generally Available

InfluxDB 3 Core and Enterprise

Start fast. Scale faster.

Get the Updates

InfluxDB 3 Core is an open source, high-speed, recent-data engine that collects and processes data in real-time and persists it to local disk or object storage. InfluxDB 3 Enterprise builds on Core’s foundation, adding high availability, read replicas, enhanced security, and data compaction for faster queries and optimized storage. A free tier of InfluxDB 3 Enterprise is available for non-commercial at-home or hobbyist use.

For more information, check out: