Hello, friends. In this post, you will learn how to install Apache CouchDB on Ubuntu 20.04. It will be easy to follow step by step guide.
On the other hand, CouchDB places a lot of emphasis on data replication as a persistent way to obtain data. That is, we will be able to connect multiple nodes and from there do the replication.
Of course, there are a lot of features and reasons why this project of the Apache Foundation is so important today.
So, let us start.
Install CouchDB on Ubuntu 20.04
Apache CouchDB although it is an open-source application is not in the official Ubuntu repositories. But the installation is not complicated since there is a dedicated repository for Ubuntu.
So, open a terminal or start an SSH session on your server.
Then, update your entire distribution:
sudo apt update
sudo apt upgrade
Next, you can install some packages needed to complete this tutorial.
sudo apt-get install software-properties-common curl
Then, download and import the GPG key from the CouchDB repository.
curl -L https://couchdb.apache.org/repo/bintray-pubkey.asc | sudo apt-key add
Then we can add the repository:
echo "deb https://apache.bintray.com/couchdb-deb focal main" | sudo tee -a /etc/apt/sources.list
Then refresh APT to load the added repository:
sudo apt update
Now you can install CouchDB by running the following command:
sudo apt install couchdb Reading package lists… Done Building dependency tree Reading state information… Done The following additional packages will be installed: libmozjs-68-0 The following NEW packages will be installed: couchdb libmozjs-68-0 0 upgraded, 2 newly installed, 0 to remove and 1 not upgraded. Need to get 31.5 MB of archives. After this operation, 63.0 MB of additional disk space will be used. Do you want to continue? [Y/n]
During the installation, you will see some configuration screens.
The first one will ask you how to install CouchDB. It can be a single server or in the form of a Cluster. In this case, I will choose the first option:
Then you will have to configure the IP address where CouchDB will listen. As I am working with a remote server it is convenient to use either the IP address of the server or 0.0.0.0 to make it accessible from all interfaces.
Then configure a login password for the CouchDB user. You will have to enter it twice.
Afterward, the installation will be completed.
After the installation, you can check the status of the service.
sudo systemctl status couchdb ● couchdb.service - Apache CouchDB Loaded: loaded (/lib/systemd/system/couchdb.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2020-12-14 15:29:45 CET; 25s ago Main PID: 2092 (beam.smp) Tasks: 36 (limit: 2286) Memory: 34.4M CGroup: /system.slice/couchdb.service ├─2092 /opt/couchdb/bin/../erts-220.127.116.11/bin/beam.smp -K true -A 16 -Bd -- -root /opt/couchdb/bin/.. -progname couchdb -- -home /opt/couchdb -- -boot /opt/> ├─2109 /opt/couchdb/bin/../erts-18.104.22.168/bin/epmd -daemon ├─2127 erl_child_setup 65536 ├─2149 inet_gethost 4 └─2150 inet_gethost 4 Dec 14 15:29:45 test systemd: Started Apache CouchDB.
Access to the Apache CouchDB web interface
Now open your web browser and go to
Note: You have to open port 5984 in your firewall for this to work.
The next thing you will see is the log in screen.
The user is admin and the password is the one you defined during the installation.
When you log in you will see the entire CouchDB dashboard where you can create new databases and manage them.
Apache CouchDB is a database manager clearly focused on the professional environment, but this does not prevent it from being used in learning and personal environments. So today you have learned how to install it on a server with Ubuntu 20.04.