A Comprehensive Guide: Installing Apache CouchDB on Ubuntu & Debian Servers 2024

Haris Shaikh
4 min readMar 5, 2024

--

CouchDB

Apache CouchDB is a popular open-source NoSQL database system known for its flexibility, scalability, and ease of use. With its document-oriented approach and distributed architecture, CouchDB has become a favored choice for developers and organizations handling large volumes of data. If you’re considering deploying CouchDB on your Ubuntu or Debian server, you’re in the right place. In this guide, we’ll walk you through the step-by-step process of installing CouchDB on both Ubuntu and Debian systems.

Step 1: Update Your System

Before we begin, it’s essential to ensure that your system is up-to-date. Open a terminal window and execute the following commands:

system update
system update

Step 2: Enable CouchDB Repository

CouchDB is not available in the default Ubuntu or Debian repositories, so we have to add its repository manually.

First, we need to install some dependencies to add a new repository over HTTPS:

Enable CouchDB Repository
Enable CouchDB Repository

Now we add the CouchDB GPG key:

CouchDB GPG key
CouchDB GPG key

After adding the GPG key, you need to add the CouchDB repository:

adding the CouchDB repository
adding the CouchDB repository

Now, update the system again:

update the system again
update the system again

Step 3: Install CouchDB

After adding the repository, it’s time to install CouchDB:

installing CouchDB
installing CouchDB

During the installation, you’ll be asked a series of questions. First, it will ask you to choose the type of CouchDB installation. You can select either “standalone” or “clustered”. For a basic, single-server setup, you’ll choose “standalone”.

Next, you’ll be asked to confirm the network interface for CouchDB to bind on. If you’re just using this server for development and not making it available to the network, enter 127.0.0.1. If you are making it available to the network, enter 0.0.0.0.

Then, you’ll need to set up the admin username and password. Make sure to pick a secure password.

After running installation command if it did not display above mentioned options then we can manually bind our server IP and set the password for admin user by adding following line in `/opt/couchdb/etc/local.ini` and `/opt/couchdb/etc/local.d/10-admins.ini` files respectively.

server ip settings in /opt/couchdb/etc/local.ini
server ip settings in /opt/couchdb/etc/local.ini
set the password for admin in /opt/couchdb/etc/local.d/10-admins.ini
set the password for admin in /opt/couchdb/etc/local.d/10-admins.ini

Do not forget to restart your CouchDB server:

restarting couchdb server
restarting couchdb server

Step 4: Verify the Installation

Once CouchDB is installed, you can check if it’s running with the following command:

verify the couchdb installation
verify the couchdb installation

If CouchDB is running correctly, you’ll see a response like this:

couchdb is running
couchdb is running

You can also have a look at the status of running CouchDB server:

Step 5: CouchDB web Interface

You can access the CouchDB web interface by opening a web browser and visiting http://127.0.0.1:5984/_utils/ (replace local IP with you server IP if your are running it in production environment).

CouchDB web Interface
CouchDB web Interface

Conclusion:

Installing Apache CouchDB on Ubuntu and Debian servers is a simple yet essential process for developers and system administrators looking to leverage the capabilities of this NoSQL database system. By following the steps outlined in this guide, you can quickly set up CouchDB and start building innovative applications with confidence.

Don’t forget to follow me on social media platforms for more insightful content.

https://www.linkedin.com/in/compilerharris/

https://github.com/compilerharris

https://medium.com/@compilerharris

--

--

Haris Shaikh

Technology enthusiast with hands-on experience in web technologies like Nest, Next, React, Node, Express, Angular, Laravel, MySQL, Postgres, HTML, CSS, CouchDB.