Installing Couchbase Server on Ubuntu and Debian

Install Couchbase Server on Ubuntu and Debian Linux. Root and non-root installations are supported.

Use the instructions on this page to install Couchbase Server on Ubuntu and Debian platforms using the officially-supported .deb packages provided by Couchbase. The instructions support both Enterprise and Community editions.

The installation procedures assume that you’re working from a clean system and that you’ve uninstalled any previous installations of Couchbase Server.

If you’re upgrading an existing installation of Couchbase Server, refer to Upgrading Couchbase Server.

Before You Install

Couchbase Server works out-of-the-box on most Ubuntu and Debian configurations. However, you should review the following material before installing, especially if you’re deploying Couchbase into production:

Basic Installation

You must be logged in as root (superuser) or use sudo to run the installation commands.

Install Using apt

The Advanced Package Tool (apt) provides the simplest and most comprehensive way to install Couchbase on Ubuntu and Debian platforms. This method involves downloading and installing a small meta package from Couchbase, which apt can then use to automatically download and install Couchbase Server and all of its dependencies.

  1. Download and install the .deb meta package.

    curl -O https://packages.couchbase.com/releases/couchbase-release/couchbase-release-1.0-6-amd64.deb
    sudo dpkg -i ./couchbase-release-1.0-6-amd64.deb

    The meta package installs the necessary information for apt to retrieve all of the necessary packages, and also imports the necessary Couchbase public signing keys.

  2. Reload the local package database.

    sudo apt-get update
  3. Install Couchbase Server.

    • Enterprise

    • Community

    Install the latest release of Couchbase Server Enterprise
    sudo apt-get install couchbase-server
    Install a specific release of Couchbase Server Enterprise
    1. List the available releases.

      apt list -a couchbase-server

      An example listing might be: couchbase-server/xenial 6.0.0-1693-1 amd64.

    2. Specify a release to install it.

      sudo apt-get install couchbase-server=<version-string>

      …​where <version-string> is the full version string of the release.

      Using the example listing from the previous step, the version string would be 6.0.0-1693-1, and thus the installation command would be: sudo apt-get install couchbase-server=6.0.0-1693-1

    Install the latest release of Couchbase Server Community
    sudo apt-get install couchbase-server-community
    Install a specific release of Couchbase Server Community
    1. List the available releases.

      apt list -a couchbase-server-community

      An example listing might be: couchbase-server-community/xenial 6.0.0-1693-1 amd64.

    2. Specify a release to install it.

      sudo apt-get install couchbase-server-community=<version-string>

      …​where <version-string> is the full version string of the release.

      Using the example listing from the previous step, the version string would be 6.0.0-1693-1, and thus the installation command would be: sudo apt-get install couchbase-server-community=6.0.0-1693-1

    The apt-get command automatically downloads and installs the latest version of Couchbase Server, along with all of its dependencies.

    Once installation is complete, Couchbase Server will start automatically (and will continue to start automatically at run levels 2, 3, 4, and 5, and explicitly shut down at run levels 0, 1, and 6). You can use the systemctl command (service on older operating systems) to start and stop the Couchbase Server service, as well as check the current status. Refer to Couchbase Server Startup and Shutdown for more information.

    Microsoft Azure Ubuntu 14.04 images from Canonical may throw the following warning messages during installation:

    sent invalidate(group) request, exiting
    sent invalidate(passwd) request, exiting

    The installation completes without a problem and it is safe to ignore these messages.

  4. Open a web browser and access the Couchbase Server Web Console to verify that the installation was successful and the node is available.

Install Using .deb Package

Install Couchbase Server on Ubuntu and Debian using the dpkg command-line tool with the full .deb package that you downloaded from Couchbase.

  1. Download the appropriate package for your operating system from the Couchbase downloads page.

  2. Reload the local package database.

    sudo apt-get update
  3. Install Couchbase Server.

    sudo dpkg -i ./couchbase-server-*.deb

    …​where * is the edition and version of the downloaded package.

    If dpkg reports any errors about missing dependencies, issue the following command to download and install those dependencies from the internet:

    sudo apt-get -f install

    Once installation is complete, Couchbase Server will start automatically (and will continue to start automatically at run levels 2, 3, 4, and 5, and explicitly shut down at run levels 0, 1, and 6). You can use the systemctl command (service on older operating systems) to start and stop the Couchbase Server service, as well as check the current status. Refer to Couchbase Server Startup and Shutdown for more information.

    Microsoft Azure Ubuntu 14.04 images from Canonical may throw the following warning messages during installation:

    sent invalidate(group) request, exiting
    sent invalidate(passwd) request, exiting

    The installation completes without a problem and it is safe to ignore these messages.

  4. Open a web browser and access the Couchbase Server Web Console to verify that the installation was successful and the node is available.

Installing as non-root, non-sudo

A non-root, non-sudo installation will run Couchbase Server and all Couchbase Server command-line tools.

Only 64 bit systems are supported.
  1. After downloading the Couchbase Server DEB package, go to the directory where it is located and extract it:

    dpkg-deb -x couchbase-server-version.deb $HOME

    In the directory where you extracted the files, you will see /opt and /etc subdirectories.

  2. After you extract the Couchbase Server installation files, go to the subdirectory:

    cd opt/couchbase
  3. Run the following script to relocate the Couchbase Server installation to the present working directory (PWD):

    ./bin/install/reloc.sh `pwd`

    This allows you to continue the installation as a non-root, non-sudo user.

  4. To run the server use

    ./bin/couchbase-server -- -noinput -detached
  5. To stop the server use

    ./bin/couchbase-server -k