How to Install CouchDB on Ubuntu 24.04
Learn how to install couchdb on ubuntu 24.04 with official Apache repositories, standalone setup, Fauxton web dashboard, and REST API testing.

5 min read
Learn how to install couchdb on ubuntu 24.04 with official Apache repositories, standalone setup, Fauxton web dashboard, and REST API testing.
- Prerequisites and Supported Releases
- Step 1: Installing Dependencies and Importing the Apache CouchDB GPG Key
- Step 2: Adding the Apache CouchDB Repository
Apache CouchDB is an open-source, document-oriented NoSQL database system renowned for its seamless multi-master sync capabilities, schema-free JSON document storage, and RESTful HTTP API.
Unlike traditional relational databases that use SQL, CouchDB communicates entirely over HTTP using standard JSON payloads, making it an ideal choice for offline-first web and mobile applications (using PouchDB), distributed microservices, and edge computing.
Ubuntu 24.04 LTS (Noble Numbat) provides an ideal enterprise hosting environment for CouchDB when paired with official upstream repositories provided by the Apache Software Foundation.
In this guide, we walk through how to install couchdb on ubuntu 24.04, choose between standalone and clustered deployment modes, configure administrative credentials, and interact with the database through both the Fauxton web interface and terminal REST calls.
Complete step-by-step developer and database administrator guide to installing and configuring Apache CouchDB on Ubuntu 24.04 LTS (Noble Numbat). Explains importing official Apache GPG signing keys, selecting between standalone and clustered modes during debconf installation, creating an administrative account, accessing the Fauxton web dashboard, and creating databases via REST API.
Prerequisites and Supported Releases
This guide is thoroughly verified on Ubuntu 24.04 LTS (Noble Numbat) & Ubuntu 22.04 LTS. The instructions apply cleanly to cloud instances (AWS EC2, Google Compute Engine, DigitalOcean, Hetzner), bare-metal servers, and local virtual machines.
Before proceeding, ensure you have the following requirements satisfied:
- A server running Ubuntu 24.04 LTS or Ubuntu 22.04 LTS.
- A non-root user account with
sudoadministrative privileges. - UFW firewall installed.
- Basic familiarity with JSON and RESTful HTTP requests.
Step 1: Installing Dependencies and Importing the Apache CouchDB GPG Key
To ensure you deploy the latest stable release of Apache CouchDB with upstream security patches, configure the official Apache CouchDB APT repository.
First, install prerequisite packages for repository management and cryptographic key verification:
Import the official Apache CouchDB GPG key into your system's trusted keyrings directory:
# Update package index and install prerequisites:
sudo apt update
sudo apt install -y curl apt-transport-https gnupg lsb-release
# Import official CouchDB repository signing key:
curl -fsSL https://couchdb.apache.org/repo/keys.asc | sudo gpg --dearmor -o /usr/share/keyrings/couchdb-archive-keyring.gpg
Step 2: Adding the Apache CouchDB Repository
With the cryptographic signing key safely in place, add the official repository definition file to /etc/apt/sources.list.d/couchdb.list.
Reference your active Ubuntu release codename (such as noble for 24.04 or jammy for 22.04):
Update your local package lists to incorporate CouchDB packages:
# Add CouchDB repository definition:
echo "deb [signed-by=/usr/share/keyrings/couchdb-archive-keyring.gpg] https://apache.jfrog.io/artifactory/couchdb-deb/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/couchdb.list
# Refresh APT cache:
sudo apt update
Step 3: Installing CouchDB via APT with Debconf Prompts
Install the couchdb package using apt.
During installation, the Debian package configuration wizard (debconf) presents several interactive configuration prompts:
Follow these guidelines to configure your installation:
# Launch CouchDB package installation:
sudo apt install -y couchdb
# Follow the on-screen terminal configuration prompts.
# Verify CouchDB service status:
sudo systemctl status couchdb
# Expected output confirms:
# Active: active (running)
| Debconf Prompt | Recommended Value | Technical Explanation |
|---|---|---|
| General type of CouchDB configuration | standalone | Select standalone for single-node servers; select clustered for multi-node deployments |
| CouchDB interface bind address | 127.0.0.1 (or 0.0.0.0) | Use 127.0.0.1 for local reverse proxy setups; use 0.0.0.0 to allow external network access |
| Set CouchDB admin password | YourStrongPassword | Sets administrative password for the 'admin' user account |
Step 4: Verifying Installation via the REST API
CouchDB listens by default on port 5984.
Because CouchDB is fundamentally an HTTP server, verify its operation by executing a GET request against the root endpoint using curl:
Review the JSON greeting returned by the database engine:
# Query CouchDB root API endpoint:
curl http://127.0.0.1:5984/
# Expected JSON response:
# {
# "couchdb": "Welcome",
# "version": "3.3.3",
# "git_sha": "...",
# "uuid": "...",
# "features": [
# "access-ready",
# "partitioned",
# "pluggable-storage-engines",
# "reshard",
# "scheduler"
# ],
# "vendor": {
# "name": "The Apache Software Foundation"
# }
# }
Step 5: Accessing the Fauxton Web Dashboard
CouchDB includes a built-in web-based management dashboard called Fauxton.
Fauxton allows administrators to create databases, manage documents, write MapReduce views, and monitor system metrics visually.
If CouchDB is bound to 127.0.0.1 on a remote server, establish an SSH port-forwarding tunnel from your local computer:
Open your browser and navigate to the Fauxton URL:
# Establish SSH port forward from your local terminal:
ssh -L 5984:127.0.0.1:5984 username@YOUR_SERVER_IP
# Open your local web browser and visit:
# http://127.0.0.1:5984/_utils/
# Log in using the administrator credentials created in Step 3:
# Username: admin
# Password: YourStrongPassword
Step 6: Creating Your First Database and Storing Documents
You can manage CouchDB entirely from the command line using standard HTTP methods (PUT, POST, GET, DELETE).
Create a new database named app_users with administrative authentication:
Insert a sample JSON document and retrieve it using curl:
# Create a database named 'app_users':
curl -X PUT http://admin:[email protected]:5984/app_users
# Response: {"ok":true}
# Insert a JSON document:
curl -X POST http://admin:[email protected]:5984/app_users \
-H "Content-Type: application/json" \
-d '{"name": "John Doe", "role": "developer", "active": true}'
# Response: {"ok":true,"id":"a1b2c3d4...","rev":"1-e5f6..."}
# List all databases on the server:
curl -X GET http://admin:[email protected]:5984/_all_dbs
# Response: ["_users","_replicator","app_users"]
Troubleshooting and Common Errors
When configuring Ubuntu servers, unexpected permission errors, network timeouts, or lock contention can occur. Review these common issues and verified resolutions:
curl: (7) Failed to connect to 127.0.0.1 port 5984: Connection refused
Cause: CouchDB service is stopped or failed to bind to the network socket.
Resolution: Check service health with sudo systemctl status couchdb and inspect /var/log/couchdb/couch.log.
sudo journalctl -u couchdb --no-pager -n 50
HTTP 401 Unauthorized: You are not authorized to access this db
Cause: Attempting to perform administrative actions without providing valid basic authentication credentials.
Resolution: Include admin:password@ in the URL: curl http://admin:[email protected]:5984/_all_dbs.
curl -u admin http://127.0.0.1:5984/_all_dbs
Cannot access Fauxton web interface from remote browser
Cause: CouchDB is bound exclusively to 127.0.0.1 and port 5984 is blocked by UFW.
Resolution: Use an SSH tunnel (ssh -L 5984:127.0.0.1:5984 user@server) or configure an Nginx reverse proxy with SSL.
sudo ss -tulpn | grep 5984
Security Best Practices and Hardening
Never leave CouchDB in 'Admin Party' mode (without an administrator password); always enforce authentication on port 5984.
Do not expose port 5984 directly to the public internet; terminate SSL through Nginx or Caddy and proxy traffic to localhost.
Store encrypted CouchDB backups of the data directory located at /var/lib/couchdb/ on an offsite storage volume.
Related Ubuntu Tutorials and Documentation
Deepen your Linux system administration skills with our related production-tested guides:
- How to Install and Configure Caddy on Ubuntu 24.04 — Set up a modern reverse proxy with automatic HTTPS for CouchDB.
- How to Install and Configure PostgreSQL on Ubuntu 24.04 — Compare NoSQL document databases with relational database management systems.
- Initial Server Setup on Ubuntu 24.04 LTS — Harden base operating system parameters before running database services.
Authoritative References and Official Documentation

The Linux Command Line, 2nd Edition: A Complete Introduction
Frequently Asked Questions
Quick answers to common questions and configurations
_rev). Updates must include the previous revision ID to prevent conflicting concurrent writes./var/lib/couchdb/, owned by the couchdb:couchdb system user.Editorial Disclosure: Website Vidya is supported by our readers. When you purchase hosting, tools, or software through our verified partner links, we may earn an affiliate commission at no extra cost to you. We only recommend solutions we trust and rigorously verify.
Rajesh Ray
I’m Rajesh Rai, a full-stack developer, Linux administrator, and technology enthusiast passionate about making complex technology easier to understand and use.
Most Read Guides
TrendingUbuntu Server Not Booting? 10 Simple Steps to Fix It Fast
How to Create a 3D Button in HTML and CSS: Easy Steps
How to Install Python and Pip on Ubuntu 24.04 LTS
How to Install Nginx on Ubuntu 24.04
How to Install Python on Ubuntu 24.04 LTS
Related Technical Guides
Tested runbooks, server administration walkthroughs, and troubleshooting guides
Join the Conversation & Perspective
Have thoughts, counterpoints, or reflections on this story? Engage directly with fellow readers and editorial contributors.
No comments on this guide yet. Be the first to share your thoughts or ask a question!