How to Install CouchDB on Debian 9

By 

Published on

2 min read

Install CouchDB on Debian 9

CouchDB is an open-source fault-tolerant and schema-free NoSQL database maintained by the Apache Software Foundation.

CouchDB server stores its data in named databases which contains documents with JSON structure. Each document consists of a number of fields and attachments. Fields can include text, numbers, lists, booleans, more. It is accessible via a RESTful HTTP/JSON API that allows you to read, create, edit and delete database documents.

In this tutorial, we will explain how to install the latest version of CouchDB on Debian 9.

Prerequisites

To be able to install packages on your Debian system, you must be logged in as a user with sudo privileges .

Enabling CouchDB repository

CouchDB .deb packages are available from their official repositories. To enable the CouchDB repository and import GPG key, run the following commands:

Terminal
echo "deb https://couchdb.apache.org/repo/deb/ bionic main" | sudo tee -a /etc/apt/sources.list
curl -L https://couchdb.apache.org/repo/bintray-pubkey.asc | sudo apt-key add -

Installing CouchDB on Debian

Once the repository is enabled update the packages list and install CouchDB:

Terminal
sudo apt update
sudo apt install couchdb

The installer will first ask you whether you want to install CouchDB in a standalone or clustered mode. We will install the CouchDB in a single-server standalone mode.

CouchDB Select Mode

Next, you’ll be given an option to set the IP address of the network interface on which the CouchDB will bind to. For single-server setup leave the default 127.0.0.1. If you are configuring a cluster enter the interface IP address or type 0.0.0.0 which will cause CouchDB to binds to all network interfaces.

CouchDB Select Interface

On the next prompt set the admin password. It is highly recommended to set the password which will take CouchDB out of the insecure “admin party” mode. If you leave this field blank, the admin user will not be created.

CouchDB Create Admin

Confirm the password and the CouchDB installation will continue.

CouchDB Confirm Password

Verifying CouchDB Installation

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

Terminal
curl http://127.0.0.1:5984/

The output will look like below:

output
{  
   "couchdb":"Welcome",
   "version":"2.3.1",
   "git_sha":"c298091a4",
   "uuid":"370903b5400643c2979838f5b68348c1",
   "features":[  
      "pluggable-storage-engines",
      "scheduler"
   ],
   "vendor":{  
      "name":"The Apache Software Foundation"
   }
}

For clarity the output is formatted.

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

url
http://127.0.0.1:5984/_utils/
CouchDB Fauxton

Conclusion

You have learned how to install CouchDB Debian 9. Your next step could be to visit the Apache CouchDB Documentation and find more information on this topic.

Feel free to leave a comment if you have any questions.

Linuxize Weekly Newsletter

A quick weekly roundup of new tutorials, news, and tips.

About the authors

Dejan Panovski

Dejan Panovski

Dejan Panovski is the founder of Linuxize, an RHCSA-certified Linux system administrator and DevOps engineer based in Skopje, Macedonia. Author of 800+ Linux tutorials with 20+ years of experience turning complex Linux tasks into clear, reliable guides.

View author page