How to Install CouchDB on Ubuntu 20.04

How to install couchdb on ubuntu 20.04
install couchdb on ubuntu 20.04

In this short tutorial, we will explain how to install CouchDB on Ubuntu 20.04. CouchDB is a free and open-source document-oriented NoSQL database written in Erlang. It allows you to run a single logical database server on any number of servers or VPSes. You can use CouchDB as a single node or clustered database. It stores and collects data in JSON-based document formats. If you are looking for high-performance NoSQL database systems then CouchDB is the best choice for you. Installing CouchDB on Ubuntu 20.04 should take less than 10 minutes.


  • An Ubuntu 20.04 VPS (we’ll be using our SSD 2 VPS plan)
  • Access to the root user account (or access to an admin account with root privileges)

Step 1: Log in to the Server & Update the Server OS Packages

First, log in to your Ubuntu 20.04 server via SSH as the root user:

ssh root@IP_Address -p Port_number

You will need to replace ‘IP_Address’ and ‘Port_number’ with your server’s respective IP address and SSH port number. Additionally, replace ‘root’ with the username of the admin account if necessary.

Before starting, you have to make sure that all Ubuntu OS packages installed on the server are up to date. You can do this by running the following commands:

apt-get update -y
apt-get upgrade -y

Step 2 : Install Required Dependencies

Before starting, you will need to install some dependencies in your server. You can install all of them with the following command:

apt-get install curl software-properties-common apt-transport-https gnupg2 -y

Once all the dependencies are installed, you can proceed to install CouchDB.

Step 3 : Install CouchDB

By default, CouchDB is not available in the Ubuntu standard repository. So you will need to add the CouchDB repository to your system.

First, add the GPG key with the following command:

curl -L | apt-key add -

Next, add the CouchDB repository to the APT:

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

Next, update the repository and install the CouchDB using the following command:

apt-get update -y
apt-get install couchdb -y

During the installation, you will be asked to install a CouchDB in a standalone or cluster mode as shown below:

couchdb on ubuntu 20.04

Select standalone and press Enter. You will be asked to set the listening IP address as shown below:

how to install apache couchdb on ubuntu 20.04

Type for all network interfaces and press Enter. You will be asked to set a password admin user as shown below:

configure couchdb on ubuntu 20.04

Type and confirm the password and press Enter to finish the installation.

Step 4 : Verify the CouchDB Installation

At this point, CouchDB is installed and listening on port 5984. You can verify it using the following command:

ss -antpl | grep 5984

You should get the following output:

LISTEN    0         128         *        users:(("beam.smp",pid=56216,fd=18))                                           

You can now verify the CouchDB installation using the curl command as shown below:

Need a fast and easy fix?
✔ Unlimited Managed Support
✔ Supports Your Software
✔ 2 CPU Cores
✔ 2 GB RAM
✔ 50 GB PCIe4 NVMe Disk
✔ 1854 GeekBench Score
✔ Unmetered Data Transfer

Now just $43 .99


If everything is fine, you should get the CouchDB database information in JSON format:

{"couchdb":"Welcome","version":"3.1.1","git_sha":"ce596c65d","uuid":"3dea9bb2dc9c33294c7f13c8fe921e42","features":["access-ready","partitioned","pluggable-storage-engines","reshard","scheduler"],"vendor":{"name":"The Apache Software Foundation"}}

Step 5 : Access CouchDB Web UI

You can also access the CouchDB web interface using the URL http://your-server-ip:5984/_utils/. You should get the following screen:

install apache couchdb on ubuntu 20.04

Provide your admin username, password and click on the Log In button. You should see the CouchDB dashboard in the following screen:

installing apache couchdb on ubuntu 20.04

Step 6 : Manage CouchDB Service

You can start and stop the CouchDB service using the following command:

systemctl stop couchdb
systemctl start couchdb

To check the status of the CouchDB service, run the following command:

systemctl status couchdb
installing couchdb on ubuntu 20.04

Of course, you don’t have to do any of this if you use one of our Database VPS Hosting services, in which case you can simply ask our expert Linux admins to setup CouchDB for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

Leave a Comment