How to Install CouchDB on Ubuntu 20.04

Install CouchDB on Ubuntu 20.04

In this article, we will have explained the necessary steps to install and configure Apache CouchDB on Ubuntu 20.04 LTS. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.

Apache CouchDB is a free software resource which allows us to access data from where necessary by defining the Couch Replication Protocol, which was implemented by a variety of projects and products that cover all IT environments, from globally distributed server clusters, or mobile phones to web browsers. The CouchDB server stores its data in a named database, which contains documents with a JSON structure. Each document consists of a number of fields and appendices. Columns can include text, numbers, lists, booleans and more. CouchDB includes a RESTful HTTP API that allows you to read, create, edit and delete database documents.

Install Apache CouchDB on Ubuntu 20.04

Step 1. First, before you start installing any package on your Ubuntu server, we always recommend making sure that all system packages are updated.

Step 2. Install Apache CouchDB on Ubuntu system.

Run the following command as root or a user with sudo rights to activate the CouchDB repository and import the GPG key:

After the repository is activated, update the package list and install CouchDB:

During the installation, you should see messages to select some option in a standalone or clustered mode:

couchdb-select-mode

Next is an option to set the IP address of the network interface on which the CouchDB will bind:

couchdb-select-interface

On the next prompt set the admin password, which is highly recommended:

couchdb-confirm-password

After installation, enable and start the CouchDB service bu issuing the commands below:

To verify whether the installation has completed successfully run the following curl command which will print the CouchDB database information in JSON format:

Result:

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

That’s all you need to do to install CouchDB on Ubuntu 20.04 LTS Focal Fossa. I hope you find this quick tip helpful. If you have questions or suggestions, feel free to leave a comment below.