How to Install CouchDB on Debian 10

Posted 

2 min read

Apache CouchDB is a free and open-source NoSQL database developed by the Apache Software Foundation. It can be used as a single-node or clustered database.

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. CouchDB includes a RESTful HTTP API that allows you to read, create, edit, and delete database documents.

This article describes how to install CouchDB on Debian 10, Buster.

Enabling CouchDB repository

The easiest way to install CouchDB on CentOS 8 is to enable the vendor repository and install the binary packages.

Run the following commands as root or user with sudo privileges to enable the CouchDB repository and import GPG key:

echo "deb https://apache.bintray.com/couchdb-deb buster main" | sudo tee -a /etc/apt/sources.listcurl -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:

sudo apt updatesudo apt install couchdb

First, the installer will ask you whether you want to install CouchDB in a standalone or clustered mode. We’ll install the CouchDB in a single-server standalone 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 tells CouchDB to binds to all network interfaces.

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

Confirm the password and the installation will continue.

Verifying CouchDB Installation

The CouchDB server is running at localhost:5984. To confirm that the installation was successful and the service is running, run the following curl command that will print information about the CouchDB database in JSON format:

curl http://127.0.0.1:5984/

The output will look like below:

{
   "couchdb":"Welcome",
   "version":"3.0.0",
   "git_sha":"03a77db6c",
   "uuid":"adab3f42ce6a06245d2955c1d6832266",
   "features":[
      "access-ready",
      "partitioned",
      "pluggable-storage-engines",
      "reshard",
      "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:

http://127.0.0.1:5984/_utils/

Conclusion

We’ve shown you how to install CouchDB Debian 10. You can find more information on this topic in the Apache CouchDB Documentation.

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