How To Install CouchDB on Debian 11

In this article, we want to teach you How To Install CouchDB on Debian 11.

CouchDB is a document-oriented database and within each document, fields are stored as key-value maps. Fields can be either a simple key/value pair, list, or map.

How To Install CouchDB on Debian 11

Before you start to set up CouchDB on Debian 11, you need to log in to your server as a non-root user with sudo privileges. To do this, you can follow our article the Initial Server Setup with Debian 11.

Now you can follow the steps below to install CouchDB on your server.

Set up CouchDB on Debian 11

Here you need to add the CouchDB repository to set up CouchDB on Debian 11.

First, update your local package index with the following command:

sudo apt update

Then, install the required packages with the command below:

sudo apt install -y curl apt-transport-https gnupg

Now enable the CouchDB repo and add the public GPG key with the commands below:

$ curl https://couchdb.apache.org/repo/keys.asc | gpg --dearmor | sudo tee /usr/share/keyrings/couchdb-archive-keyring.gpg >/dev/null 2>&1
$ source /etc/os-release
$ echo "deb [signed-by=/usr/share/keyrings/couchdb-archive-keyring.gpg] https://apache.jfrog.io/artifactory/couchdb-deb/ ${VERSION_CODENAME} main" \
    | sudo tee /etc/apt/sources.list.d/couchdb.list >/dev/null

Again update your system with the following command:

sudo apt update

At this point, you can install CouchDB on your server with the following command:

sudo apt install -y couchdb

During your installation, you will be asked to configure CouchDB. In the first window, read the configurations and press ok to continue.

CouchDB configuration

In this article, we install CouchDB in a single mode. So choose the standalone mode and press ok.

Configuration type of CouchDB

Next, you need to enter the CouchDB interface bind address. For standalone mode leave it by default and press ok. If you are in a cluster mode enter the interface IP address or type 0.0.0.0 that tells CouchDB to bind to all network interfaces on Debian 11.

CouchDB binding address

Here you should set the admin password. If you leave it blank the admin user will not be created. Enter a strong password and press ok.

CouchDB admin user

Confirm the password to complete your installation.

Re-enter CouchDB admin password on Debian 11

At this point, you can verify your CouchDB installation by using the curl command on Debian 11:

curl http://127.0.0.1:5984/

In your output, you will see the information about the CouchDB database in JSON format:

Output
{"couchdb":"Welcome",
"version":"3.2.1",
"git_sha":"244d428af",
"uuid":"00be2f4f34c4f7a8f47fba6fcf8ab589",
"features":["access-ready","partitioned",
"pluggable-storage-engines","reshard","scheduler"],
"vendor":{"name":"The Apache Software Foundation"}
}

Now you have successfully installed CouchDB on your Debian 11.

Conclusion

At this point, you learn to set up CouchDB on Debian 11.

Hope you enjoy using it.

May you will be interested in these articles:

How To Install CouchDB on Ubuntu 20.04.

How To Install CouchDB on AlmaLinux 8.

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Leave a Reply

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

Stay informed and not overwhelmed, subscribe now!