A Comprehensive Guide: Installing Apache CouchDB on Ubuntu & Debian Servers 2024
Tags: apachecouchdb, nosql, ubuntu, debian
Published: 2024-03-05 18:11:02

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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4nsspscsjk498epkurwg.png)

## 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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/isc7cdpi0uxkczx6eou8.png)

Now we add the CouchDB GPG key:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dg406iisuzj8ej8bl3nh.png)

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

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aawz215bj08yrv4vv6ep.png)

Now, update the system again:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/05rqm206i94ewua5cr52.png)

## Step 3: Install CouchDB
After adding the repository, it’s time to install CouchDB:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wveal1yjhn2n7g0fl2rw.png)

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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zrfc1wlymu965xoi7iw0.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2awa6sgqqmt7g8x6nwlv.png)

> Do not forget to restart your CouchDB server:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b59d7gxsr19bvox750aj.png)

## Step 4: Verify the Installation
Once CouchDB is installed, you can check if it’s running with the following command:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kalba6n1536g82z81ldi.png)

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

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j3h2kh8l4nakgbxq99t4.png)

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

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7wm5iyqko0hug46ginsx.png)

## 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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f3ood6gi9wx72r7istp0.png)

## 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