Installing CouchDB on Ubuntu Linux (Part 2)

In part I post, I explained step by step how to install CouchDB in your machine and how to use it. in this post we will go over a little bit further to find out how we can use the couchDB to do what we really need in Clustering environment. for example how to modify the Local.ini and default.ini files to get what we want to.

after you install a fresh copy of the couchdb database. you can modify and adjust the configuration to make that enable to work on a seperate machine and let the other applications communicate with it over HTTP or HTTPS. in this post we will focus over the HTTP communication only.

get the couchdb configuration files’ location from command line.

couchdb -c

below will be the result


then you can use VI and also using the sudo since it needs root access; then modify below parts in these files to make sure it can be redeuce the security and allow others to communiate with this DB for now.

make a backup and modify the local.ini file for accepting all the traffic and make sure couchDB service can listen to traffics from all IP addresses. NOTE: if you have any specifiv IP address you can just add that expcept

sudo cp /etc/couchdb/local.ini /etc/couchdb/local.ini_bak

then edit the file with your favorit text editor.

sudo vi /etc/couchdb/local.ini

or using gedit

sudo gedit /etc/couchdb/local.ini

look for a section that has the

;bind_address =

and change that to

bind_address =

then restart the couchdb service

sudo service couchdb restart

then try with your IP address, you can use ifconfig to find your ip address for example mine is something like

curl -k

and the result will be the same as part 1 with a JSOn representation of a greeting message. now you have a functioning running Couchdb.

NOTE: right now everyone can do everything in that couchdb so for further security you need to modify the local.ini or default.ini with the proper admin account and password, the password will entered as cleartext however it will get encrypted in the file after save so no worries with that.







Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s