Change Intelligence is coming.

Couchbase createBucket

Last updated: July 13, 2026

Creates a new Couchbase bucket. A bucket is the top-level data container in Couchbase, automatically provisioned with a _default scope and _default collection.

Known limitations:

  • Bucket names cannot be modified after creation. To rename a bucket, you must drop and recreate it.

  • Couchbase clusters support a maximum of 30 buckets.

  • conflictResolutionType cannot be changed after a bucket is created.

Available attributes

Attribute

Type

Description

Required

bucketName

String

The name that identifies the bucket across the cluster.

Yes

ramQuotaMB

Long

The amount of RAM allocated to this bucket across all cluster nodes, in megabytes.

Yes

bucketType

String

Determines the storage and replication behavior of the bucket. COUCHBASE creates a persistent bucket with replication. MEMCACHED is a cache-only bucket with no persistence. EPHEMERAL is an in-memory bucket with no disk persistence.

Yes

flushEnabled

Boolean

When true, allows the flush operation to delete all documents in the bucket.

Yes

numReplicas

Integer

The number of replica copies of each document kept across the cluster (0–3).

Yes

replicaIndexes

Boolean

When true, indexes are also replicated to replica nodes.

Yes

evictionPolicy

String

Determines what is removed from memory when the bucket RAM quota is exceeded. FULL evicts both keys and values. VALUE_ONLY evicts values only, keeping keys in memory. NOT_RECENTLY_USED evicts the least-recently-used items (EPHEMERAL only). NO_EVICTION prevents eviction and returns errors when the bucket is full (EPHEMERAL only).

Yes

minimumDurabilityLevel

String

The minimum durability guarantee enforced for all writes to this bucket. NONE provides no guarantee. MAJORITY requires replication to a majority of nodes. MAJORITY_AND_PERSIST_TO_ACTIVE requires replication to a majority of nodes and persistence on the active node. PERSIST_TO_MAJORITY requires persistence on a majority of nodes.

Yes

storageBackend

String

The storage engine used by the bucket. couchstore uses the traditional B+tree engine. magma uses the high-density RocksDB-based engine optimized for large datasets.

Yes

timeoutInSeconds

Long

Controls how long the Liquibase operation waits for the bucket creation to complete before timing out.

Yes

compressionMode

String

Controls whether Couchbase compresses stored documents. OFF disables compression. PASSIVE compresses documents only when the client requests it. ACTIVE enables server-side proactive compression.

No

conflictResolutionType

String

Defines how write conflicts are resolved during Cross-Datacenter Replication (XDCR). TIMESTAMP uses last-write-wins by wall-clock time. SEQUENCE_NUMBER uses last-write-wins by mutation sequence number. CUSTOM enables application-defined resolution. Cannot be changed after bucket creation.

No

maxExpiryInHours

Long

Sets the maximum TTL for all documents in the bucket, in hours. Documents expire after this duration unless a shorter TTL is set at the document level.

No

loading

loading

loading