CouchDB and Futon

How To Install CouchDB and Futon on Ubuntu 24.04

Welcome back to the Greenhost.cloud blog! CouchDB is a powerful NoSQL database that utilizes a schema-free JSON document format, allowing for great flexibility in data storage and management. Combined with Futon, CouchDB’s web-based interface, it makes database management straightforward and efficient. In this post, we’ll guide you step by step through the installation process of CouchDB and Futon on Ubuntu 24.04.

Prerequisites

Before we start, ensure that you have:

  • A running instance of Ubuntu 24.04.
  • A user account with sudo privileges.
  • Basic familiarity with the terminal.

Step 1: Update System Packages

First, it’s essential to make sure your system is up-to-date. Open your terminal and run the following commands:

sudo apt update
sudo apt upgrade -y

Step 2: Install Dependencies

CouchDB requires certain dependencies to be installed. Use the following command to install these prerequisites:

sudo apt install build-essential git erlang libicu-dev -y

Step 3: Install CouchDB

Now, it’s time to install CouchDB. The easiest way is to add the official CouchDB repository:

  1. Add CouchDB Repository: First, import the GPG key:
   wget -qO - https://apache.org/dist/couchdb/KEYS | sudo apt-key add -

Then, add the CouchDB repository:

   echo "deb https://apache.mirrors.pair.com/couchdb/binaries/ubuntu/ focal main" | sudo tee /etc/apt/sources.list.d/couchdb.list
  1. Install CouchDB: Update the package list again to include the new repository, and install CouchDB:
   sudo apt update
   sudo apt install couchdb -y
  1. Configure CouchDB: During the installation process, you may be prompted to configure CouchDB. Choose “Standalone” operation mode and set an admin user’s password when prompted.

Step 4: Start CouchDB Service

Once installed, you can start the CouchDB service using the following command:

sudo systemctl start couchdb

To enable CouchDB to start automatically on boot, run:

sudo systemctl enable couchdb

Step 5: Verify CouchDB Installation

After starting the service, check if CouchDB is running by visiting the following URL in your web browser:

http://127.0.0.1:5984/

You should see a JSON response containing information about your CouchDB instance.

Step 6: Install Futon

Futon, CouchDB’s web-based administration tool, is included in the CouchDB installation. You can access it via a web browser at:

http://127.0.0.1:5984/_utils/

Use the admin credentials you set during the CouchDB installation to log in.

Step 7: Configuring Firewall

If you plan to access CouchDB from a remote machine, you may need to adjust your firewall settings. For UFW, the command is:

sudo ufw allow 5984

Step 8: Additional Configuration (optional)

For more security, you may want to configure your CouchDB instance to only allow connections from specific IP addresses. This can be done by editing the configuration file located at /etc/couchdb/local.ini.

Conclusion

Congratulations! You have successfully installed CouchDB and accessed Futon on Ubuntu 24.04. You can now start taking advantage of the powerful features of CouchDB for your projects.

For further exploration, consider diving into CouchDB’s extensive documentation to understand its capabilities and best practices for database management.

If you have any questions or hit a snag during the installation, feel free to drop a comment below. Happy coding with CouchDB!


At Greenhost.cloud, we’re committed to providing you with the best resources for hosting and managing your applications. Stay tuned for more tutorials and tips!