How to Install CouchDB on Ubuntu – A Step-By-Step Guide

Filed Under: Ubuntu

In this tutorial, we’ll go over how to install CouchDB on Ubuntu. CouchDB is a NoSQL database that allows us to interact with stored data in a non-relational manner. There are multiple types of NoSQL database structures and among them, CouchDB is a Document-oriented database. NoSQL databases have existed for a long time but only recently came into common use because of the vast amount of unrelated data that needs to be handled.

Install CouchDB on Ubuntu

Installing CouchDB on Ubuntu is a simple process. We begin by adding the required Apache CouchDB repositories in our sources.list and then install the CouchDB package and run through the configuration.

Let’s go over this process in detail and in a complete step-by-step manner with screenshots for reference. If you follow through the tutorial, you will have a working CouchDB set up on your Ubuntu or Debian server.

CouchDB Installation Walkthrough

Let’s add the required repository to our sources.list file. There are two ways to do it. You can either add the repository by manually copying and pasting it at the end of the file in the sources.list file, or combine the echo and the tee command in Linux.

Add CouchDB Repository to APT Sources

$ echo "deb https://apache.bintray.com/couchdb-deb {distribution} main" | tee -a /etc/apt/sources.list

Add sudo to the above command if you receive an error about permission being denied and are not able to complete the action.

Couchdb Add Repository
Couchdb Add Repository

Alternatively, you can manually add the same repository to sources.list file. To do so, open the /etc/apt/sources.list file in your favorite text editor and paste the following line at the end of the file.

deb https://apache.bintray.com/couchdb-deb bionic main

Add CouchDB Public Keys

Next, we need to add the public keys to make sure we can download from the CouchDB repository so, let’s get the public key file with the wget command.

root@ubuntu:~# wget https://couchdb.apache.org/repo/bintray-pubkey.asc
Download Couchdb Public Keys
Download Couchdb Public Keys

Once done, we can run the apt-key add command to install the keys to the key database.

root@ubuntu:~# apt-key add bintray-pubkey.asc
Apt Key Add Couchdb Keys
Apt Key Add Couchdb Keys

Update Repositories and Install CouchDB on Ubuntu

We’ll perform both of the actions above with a single command by combining them with the use of the && operator.

root@ubuntu:~# apt update && apt install -y couchdb

You should now see a prompt that allows you to configure the CouchDB login credentials and interfaces.

Configure Couchdb Prompt
Configure CouchDB Prompt
Couchdb Interface Setup
Couchdb Interface Setup

We either select standalone or clustered based on what pre-configuration we need or you can begin with none to set up everything from scratch.

On the interface setup page, you can enter the localhost IP if you want the CouchDB to be accessible only via the loopback interface. If you want it to be accessible across the network, add 0.0.0.0 as I’ve done in the above screenshot.

Once you’re done with that, you’ll be required to set up the default administrator password.

Conclusion

We now have a working CouchDB setup in our Ubuntu systems. You can log into the server by opening your browser and entering the localhost IP address in your URL bar and login with the admin username and password.

Leave a Reply

Your email address will not be published. Required fields are marked *

close
Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages