Installing CouchDB 2.0 on Ubuntu 20.04

Traducciones al Español
Estamos traduciendo nuestros guías y tutoriales al Español. Es posible que usted esté viendo una traducción generada automáticamente. Estamos trabajando con traductores profesionales para verificar las traducciones de nuestro sitio web. Este proyecto es un trabajo en curso.

CouchDB is a non-relational, or “NoSQL” database designed with scalability and a more trouble-free experience in mind. CouchDB is programmed in Erlang, which boasts a highly scalable concurrency model and fault tolerance. CouchDB capitalizes on both of these features to ensure production databases run with fewer interruptions, regardless of changes in request volumes and inevitable performance potholes.

CouchDB uses HTTP APIs and JSON documents which are intended to be more intuitive and to integrate more simply into web and mobile applications. Its use of JSON documents makes it highly flexible and able to accommodate a wide variety of needs.

This guide shows you how to install CouchDB on Ubuntu 20.04. At the end of this guide, there is a link to a subsequent guide for getting started using CouchDB and understanding its concepts.

Before You Begin

  1. Familiarize yourself with our Getting Started with Linode guide, and complete the steps for setting your Linode’s hostname and timezone.

  2. This guide uses sudo wherever possible. Complete the sections of our How to Secure Your Server guide to create a standard user account, harden SSH access, and remove unnecessary network services.

  3. Update your system.

     sudo apt update && sudo apt upgrade
This guide is written for a non-root user. Commands that require elevated privileges are prefixed with sudo. If you are not familiar with the sudo command, see the Linux Users and Groups guide.

Set Up the Apache CouchDB Repository

  1. Install the prerequisites for using the Apache CouchDB repository using the following commands:

     sudo apt update && sudo apt install -y curl apt-transport-https gnupg
     curl | gpg --dearmor | sudo tee /usr/share/keyrings/couchdb-archive-keyring.gpg >/dev/null 2>&1
     source /etc/os-release
  2. Add the CouchDB repository to the apt repository list.

     echo "deb [signed-by=/usr/share/keyrings/couchdb-archive-keyring.gpg] ${VERSION_CODENAME} main" | sudo tee /etc/apt/sources.list.d/couchdb.list >/dev/null
  3. Install the CouchDB repository key.

     sudo apt-key adv --keyserver --recv-keys 8756C4F765C9AC3CB6B85D62379CE192D401AB61

Install CouchDB


The steps below are for installing a standalone CouchDB server. If you intend to use CouchDB in a cluster, choose clustered instead of standalone and enter as the interface bind-address in the steps that follow.

See CouchDB’s Cluster Set Up guide for the additional steps needed to set up a CouchDB cluster once you have completed the installation.

  1. Update the package manager.

     sudo apt update
  2. Install CouchDB.

     sudo apt install -y couchdb
    • Choose standalone when prompted for a configuration type.

      CouchDB configuration type selection

    • Enter the default value — — for the interface bind address.

      Inputting the CouchDB network interface

    • Since CouchDB 3.0.0, CouchDB does not run without an administrator user being configured. When prompted, create an administrator user by entering a password. Re-enter the password on the subsequent screen.

      Creating a CouchDB administrator user

  3. You can verify that CouchDB is installed by running the following command.

    • Replace admin and password with the username and password, respectively, for a valid CouchDB user.

    • To use the administrator user you created during the installation process, enter the username, which is admin by default, and the password you set up.

      curl admin:[email protected]:5984

Get Started with CouchDB

You have now successfully installed CouchDB! To get started, head over to the guide for Using CouchDB on Ubuntu 20.04.

More Information

You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.

This page was originally published on

Create a Linode account to try this guide with a $100 credit.
This credit will be applied to any valid services used during your first 60 days.

Your Feedback Is Important

Let us know if this guide made it easy to get the answer you needed.

Join the conversation.
Read other comments or post your own below. Comments must be respectful, constructive, and relevant to the topic of the guide. Do not post external links or advertisements. Before posting, consider if your comment would be better addressed by contacting our Support team or asking on our Community Site.