How to Install Apache CouchDB on CentOS 7

Updated on February 8, 2022
How to Install Apache CouchDB on CentOS 7 header image


Apache CouchDB is a free open source NoSQL database server that stores databases as documents in JSON format. It includes a RESTful HTTP API that allows you to create, read, edit, and delete documents easily.

This guide will teach you how to install and set up Apache CouchDB on a CentOS 7 server.


Setup the CouchDB Repository

Install the CentOS EPEL repository.

$ sudo yum install epel-release

Then, set up a new CouchDB repository file:

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

Paste the following contents in it:


Update the Server.

$ sudo yum install couchdb

Install CouchDB

Now that all necessary repositories are set up, install CouchDB with the following command:

$ sudo yum install couchdb

Enable CouchDB to start at boot time.

$ sudo systemctl enable couchdb

Start CouchDB.

$ sudo systemctl start couchdb

Setup CouchDB

All CouchDB data and configuration files are stored in /opt/couchdb, and local.ini is the main configuration file located in the /etc/ subdirectory. First, set up CouchDB by binding it to a network address, then add a new administrative user.

Open the file /opt/couchdb/etc/local.ini.

$ sudo nano /opt/couchdb/local.ini

Locate the entry bind_address =, and change it to your preferred setting. By default, it is set to, the address makes CouchDB accessible from any network address, and global binds it to your public Vultr IP Address.

;port = 5984
bind_address =

To set up a new user, scroll to the bottom or search for the keyword admins. Under the section, add a new entry with the format username = password. To tighten your server security, replace admin with a secretive username of your choice.


Additionally, add the following entry to allow CouchDB to create all necessary system databases upon restart.



Save and close the file.

Alternatively, you can manually create the system databases: _users, _replicator, _global_changes with the following commands:

$ curl -u Username:Password -X PUT
$ curl -u Username:Password -X PUT
$ curl -u Username:Password -X PUT

Restart CouchDB for changes to take effect.

$ sudo systemctl restart couchdb

Configure Firewall

First, allow HTTP Traffic on your server.

$ sudo firewall-cmd --permanent --zone=public --add-service=http

If you have an SSL certificate on the server, allow HTTPS Traffic.

$ sudo firewall-cmd --permanent --zone=public --add-service=https 

Then, open port 5984.

$ sudo firewall-cmd --permanent --zone=public --add-port=5984/tcp

Restart firewall for rules to take effect.

$ sudo systemctl reload firewalld

Test Your CouchDB Installation

In your terminal window, test your CouchDB Installation using the following curl command:

$ curl

Your Output should be similar to the one below:

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

Visit your Vultr server's public IP address on port 5984 with the /utils endpoint for a GUI version.


![CouchDB Login page(

Log in with the administrator username and password created earlier to proceed.


You have successfully installed and set up CouchDB on a CentOS 7 server. For more information on using Apache CouchDB, visit the official documentation page.