There is a new version of this tutorial available for Ubuntu 20.04 (Focal Fossa).

How to Install Apache CouchDB on Ubuntu 18.04 LTS

This tutorial exists for these OS versions

On this page

  1. Requirements
  2. Install Apache
  3. Install CouchDB
  4. Access CouchDB Web Interface

CouchDB is a free and an open source NOSQL database solution implemented in the concurrency-oriented language Erlang. It has a document-oriented NoSQL database architecture. It uses JSON to store data, JavaScript as its query language using MapReduce, and HTTP for an API. CouchDB implements a form of multi-version concurrency control, so it does not lock the database file during writes. You can use CouchDB in mobile devices for replication and synchronization.

In this tutorial, we will learn how to install CouchDB on Ubuntu 18.04 LTS (Bionic Beaver) server.


  • A server running Ubuntu 18.04.
  • A non-root user with sudo privileges.

Install Apache

Before starting, you will need to install Apache web server to your system. You can install it by just running the following command:

sudo apt-get install apache2 -y

Once Apache is installed, start Apache web server and enable it to start on boot time by running the following command:

sudo systemctl start apache2
sudo systemctl enable apache2

Install CouchDB

By default, Apache CouchDB is not available in Ubuntu 18.04, so you will need to add the official repository of CouchDB. First, add the repository using the following command:

echo "deb xenial main" \ | sudo tee -a /etc/apt/sources.list

Next, sign the added repository with the following command:

curl -L \ | sudo apt-key add -

Finally, update the CouchDB repository and install it with the following command:

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

During the installation, you will prompt you for some initial configuration as shown below:

Install CouchDB with apt

Use standalone mode

Bind CouchDB to network address

Set a password

Repeat the password

Once the installation is finished. Start CouchDB and enable it to start on boot time using the following command:

sudo systemctl start couchdb
sudo systemctl enable couchdb

You can check the status of CouchDB using the following command:

sudo systemctl status couchdb


? couchdb.service - Apache CouchDB
   Loaded: loaded (/lib/systemd/system/couchdb.service; enabled; vendor preset: 
   Active: active (running) since Sun 2018-06-10 20:22:25 IST; 45s ago
 Main PID: 3092 (beam)
   CGroup: /system.slice/couchdb.service
           ??3092 /opt/couchdb/bin/../erts-7.3/bin/beam -K true -A 16 -Bd -- -ro
           ??3119 /opt/couchdb/bin/../erts-7.3/bin/epmd -daemon
           ??3145 sh -s disksup
           ??3149 /opt/couchdb/bin/../lib/os_mon-2.4/priv/bin/memsup
           ??3150 /opt/couchdb/bin/../lib/os_mon-2.4/priv/bin/cpu_sup

Jun 10 20:22:25 Node1 systemd[1]: Started Apache CouchDB.
Jun 10 20:23:01 Node1 systemd[1]: Started Apache CouchDB.
Jun 10 20:23:04 Node1 systemd[1]: Started Apache CouchDB.

Access CouchDB Web Interface

CouchDB is now started and listening on port 5984. You can access it by visiting the URL http://your-server-ip:5984/_utils/, you will be redirected to the following page:

CouchDB web interface

Now, provide your admin username and password, then click on the Login button, you should see the following page:

CouchDB database management interface

Share this page:

Suggested articles

8 Comment(s)

Add comment


By: Chinaedu

You are defining xenial here: 'echo "deb xenial main" \ | sudo tee -a /etc/apt/sources.list' But the title is how to install CDB for Ubuntu 18.04, so should be bionic?

By: Scott Whittaker

Yes, as of July 11 official bionic sources are available. Just replace xenial with bionic in the above and you should be good to go. If you have already added the xenial sources you'll need to remove the entry otherwise it will look there first. I had errors with dependencies using the xenial sources.

By: Scott Whittaker

curl -L \ | sudo apt-key add -

Results in

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed

100  3100  100  3100    0     0   1994      0  0:00:01  0:00:01 --:--:--  1993


curl: (3) Host name ' ' contains bad letter



sudo apt-get install couchdb -y

results in

Reading package lists... Done

Building dependency tree       

Reading state information... Done

Some packages could not be installed. This may mean that you have

requested an impossible situation or if you are using the unstable

distribution that some required packages have not yet been created

or been moved out of Incoming.

The following information may help to resolve the situation:


The following packages have unmet dependencies:

 couchdb : Depends: libcurl3 (>= 7.16.2) but it is not going to be installed

           Depends: libicu55 (>= 55.1-1~) but it is not installable

           Recommends: python-progressbar but it is not going to be installed


E: Unable to correct problems, you have held broken packages.

By: Scott Whittaker

Hi, just an update to let you know that I've found some official bionic sources. So you can use the same commands above, replacing xenial with bionic and you should be good to go. However if you've already added the xenial source you'll need to remove it first.

By: Edwin

Still don't understand this Scott. Your last post is generating the same libcurl3 error that I am getting, even after the Xenial fix to sources. I can't understand why couchdb is so difficult to install....


By: Siddharth Velappan

@Edwin : I faced the same issue as yours. After adding 'deb bionic main' to the sources list, make sure you deleted the previously added entry for 'xenial'. It works fine.

By: Aayush

How did you remove it?

By: johnny5

you can edit your sources list using nano sudo nano /etc/apt/sources.list navigate to the bottom where you added the xenial package and change thet word xenial to bionic