How to Install CouchDB on CentOS 8

Published on

3 min read

Install CouchDB on CentOS 8

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

In this article, we will cover the installation of CouchDB on CentOS 8.

Enabling CouchDB Repository

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

Open your editor of choice as root or user with sudo privileges and create the CouchDB repository file:

sudo nano /etc/yum.repos.d/bintray-apache-couchdb-rpm.repo

Paste the following content to the file:


Save the file and close the editor.

Installing CouchDB on CentOS

Install the CouchDB packages by running the following command:

sudo dnf install couchdb

Once the installation is completed, enable and start the CouchDB service:

sudo systemctl enable --now couchdb

Configuring CouchDB

CouchDB can be set up in a single-node or a clustered mode. In this example, we’ll deploy the server in single-node configuration. Check the official documentation about how to set up CouchDB in clustered mode.

You can configure CouchDB using the Fauxton, at or from the command-line. The Setup Wizard will guide you through the mode selection and admin creation.

We’ll create the admin user and the databases from the command-line.

Apache CouchDB data and configuration files are stored in the /opt/couchdb directory. To create an admin account, open the local.ini file and add a line under the [admins] section in the format username = password.

sudo nano /opt/couchdb/etc/local.ini
admin = mysecretpassword

Restart the CouchDB service to change the password to a hash:

sudo systemctl restart couchdb

You can use the same format to add multiple admin accounts. Always restart the CouchDB service after adding a new account.

Use curl to create the system databases _users, _replicator, and _global_changes:


Each command should return the following:


Verifying CouchDB Installation

The CouchDB server is running at localhost:5984. To verify whether 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:


For clarity, the output below is formatted.

      "name":"The Apache Software Foundation"

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


We’ve shown you how to install CouchDB on CentOS 8. 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.