DEV Community

Cover image for A Comprehensive Guide: Installing Apache CouchDB on Ubuntu & Debian Servers 2024
Haris Shaikh
Haris Shaikh

Posted on • Edited on

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

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:

Image description

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:

Image description

Now we add the CouchDB GPG key:

Image description

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

Image description

Now, update the system again:

Image description

Step 3: Install CouchDB

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

Image description

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.

Image description

Image description

Do not forget to restart your CouchDB server:

Image description

Step 4: Verify the Installation

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

Image description

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

Image description

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

Image description

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).

Image description

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

Top comments (0)