How to install Apache CouchDB 3.2 on Ubuntu 20.04

In this guide, we are going to explore how to install CouchDB on Ubuntu 20.04.

Apache CouchDB is a free and open-source NoSQL database that focuses on data storage in JSON format.

CouchDB comes with a suite of features, such as on-the-fly document transformation and real-time change notifications that make web development a breeze. It comes with an easy-to-use web administration console, served directly out of CouchDB. CouchDB is highly available and partition tolerant but is also eventually consistent. CouchDB has a fault-tolerant storage engine that puts the safety of your data first.

The first thing we do is to make sure that Ubuntu operating system packages are up to date. Issue the following command to update your system.

$ sudo apt update && sudo apt upgrade -y

Next, we can install the required dependencies with the following command:

$ sudo apt install curl software-properties-common apt-transport-https gnupg2 -y

After you have installed all the required dependencies, the next thing is now to install CouchDB:

Install CouchDB on Ubuntu 20.04

CouchDB by default is not available in the Ubuntu repository, so what we have to do is to add CouchDB into our system with the following command:

We will first add the GPG key to our system with the following command:

$ curl -L | sudo apt-key add -

The output will be as follows:

 % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3100  100  3100    0     0  43055      0 --:--:-- --:--:-- --:--:-- 43055

The next thing is to add the CouchDB repository to the APT

$ echo "deb focal main" |
sudo tee -a /etc/apt/sources.list

Next, is to update our repository again for changes to take effect and install CouchDB with the following command:

$ sudo apt update -y
$ sudo apt install couchdb -y
CouchDB Standalone
CouchDB Standalone

You will be prompted to configure either standalone or clustered mode. Since we are installing on a single server, we will opt for the single-server standalone option.

In the next prompt, you are supposed to configure the network interface to which the CouchDB will bind to. In standalone server mode, the default is

Set the admin password next.

Confirm the password and finalize your installation.

Verify CouchDB Installation

In order to check if your installation went on smoothly use the following command to confirm

$ ss -antpl | grep 5984$ 

The CouchDB server listens on port 5984 by default.

You can now verify that the installation was successful by running the curl command. If you get a JSON command you are sure it is working.

$ curl

Access CouchDB Web Interface

The web user interface can be accessed from our browser by typing the following command on your browser,

Type admin and input your password to login

CouchDB Dashboard
CouchDB Dashboard


Congratulation you are now able to install CouchDB on Ubuntu 20.04. Hopefully, you have found this tutorial helpful. Check Apache Documentation in case you have difficulty.

You may find the following article useful:

About Kipkoech Sang

I am a technology enthusiast who loves to share gained knowledge through offering daily tips as a way of empowering others. I am fan of Linux and all other things open source.
View all posts by Kipkoech Sang →

Leave a Reply

Your email address will not be published.