How to Install CouchDB on Ubuntu 20.04

Published on

3 min read

Install CouchDB on Ubuntu 20.04

Apache CouchDB is a free and open-source NoSQL database developed by the Apache Software Foundation. It can be used as a single-node or clustered database.

CouchDB server stores its data in named databases, which contains documents with JSON structure. Each document consists of a number of fields and attachments. Fields can include text, numbers, lists, booleans, more. CouchDB includes a RESTful HTTP API that allows you to read, create, edit, and delete database documents.

This article covers the steps of installing the latest version of CouchDB on Ubuntu 20.04.

Installing CouchDB on Ubuntu is relatively straightforward. We’ll enable the CouchDB APT repository, import the repository GPG key, and install the CouchDB package.

Enabling CouchDB repository

Run the following commands as root or user with sudo privileges to enable the CouchDB repository and import GPG key:

curl -L | sudo apt-key add -echo "deb focal main" | sudo tee -a /etc/apt/sources.list

Installing CouchDB on Ubuntu

Once the repository is enabled, update the packages list and install CouchDB:

sudo apt updatesudo apt install couchdb

The installer will ask you whether you want to install CouchDB in a clustered or standalone mode. A cluster means multiple servers connected together, working as a single, distributed data store.

We will install CouchDB in a single-server standalone mode.

CouchDB Select Mode

Next, you’ll be given an option to set the IP address of the network interface on which the CouchDB will bind to. For a single-server setup, leave the default If you are configuring a cluster, enter the interface IP address or type, which tells CouchDB to binds to all network interfaces.

CouchDB Select Interface

On the next prompt, set the admin password. It is highly recommended to set the password, which will take CouchDB out of the insecure “admin party” mode. If you leave this field blank, an admin user will not be created.

CouchDB Create Admin

Finally, confirm the password, and the CouchDB installation will continue.

CouchDB Confirm Password

Verifying CouchDB Installation

The CouchDB server is running at localhost:5984. To verify whether the installation was successful and the service is running, run the following curl command that will print information about the CouchDB database in JSON format:


The output will look like this:

    "name":"The Apache Software Foundation"

For clarity the output above is formatted.

If you prefer GUI, you can access the CouchDB web-based interface, Fauxton at:
CouchDB Fauxton


We’ve shown you how to install CouchDB on Ubuntu 20.04. You can find more information on this topic in the Apache CouchDB Documentation .

Feel free to leave a comment if you have any questions.