A newer version of this documentation is available.

View Latest

Sample Buckets

      Sample buckets contain data that is ready to be experimented with.

      Installing Sample Buckets

      Sample buckets contain data for experimental use. Sample buckets are referred to in code and command-line examples throughout Couchbase Server documentation.

      Full and Cluster administrators can install sample buckets with Couchbase Web Console, the Couchbase CLI, and the REST API

      Install Sample Buckets with the UI

      From the Settings screen, select the Sample Buckets tab. The Sample Buckets screen now appears, as follows:

      settings samples

      Note that if one or more sample buckets have already been loaded, they are listed under the Installed Samples section of the page.

      For information on assigning roles to users, so as to enable them to access sample buckets following installation, see Manage Users and Roles.

      To install, select one or more sample buckets from the displayed list, using the checkboxes provided. For example, select the travel-sample bucket:

      select travel sample bucket

      If there is insufficient memory available for the specified installation, a notification appears at the lower left of Couchbase Web Console:


      For information on configuring memory quotas, see the information on General settings. For information on managing (including deleting) buckets, see Manage Buckets.

      If and when you have sufficient memory, click Load Sample Data.


      When installed, the sample bucket is listed under the Installed Samples section of the page. It also appears in the Buckets screen, where its definition can be edited. See Manage Buckets, for information.

      Install Sample Buckets with the CLI

      To install sample buckets with the CLI, use the cbdocloader command. To specify a sample bucket, refer to the bucket’s zip file, which is located in the host platform’s Couchbase Server samples directory. For Linux, this location is /opt/couchbase/samples. The zip file contains the JSON data for the bucket. The command creates a bucket, and installs the JSON data within it. For example:

      /opt/couchbase/bin/cbdocloader -c localhost:8091 \
      -u Administrator -p password -b testBucket -m 256 \
      -d /opt/couchbase/samples/travel-sample.zip

      This specifies that the JSON data in the zip file be installed into a new Couchbase bucket named testBucket, whose memory quota is 256 megabytes. Note that cbdocloader thus allows the installed sample bucket to take an original name, chosen by the user.

      Install Sample Buckets with the REST API

      To install sample buckets with the REST API, use the POST /sampleBuckets/install HTTP method and URI, as follows:

      curl -X POST -u Administrator:password \ \
      -d '["travel-sample", "beer-sample"]'

      If successful, the call returns an empty list.

      For further information on using the REST API, including details of how to retrieve a list of currently available sample buckets, see Managing Sample Buckets. For information on deleting buckets (including sample buckets), see Deleting Buckets.