Install Apache CouchDB from the Apache project’s package repository on Debian or Ubuntu, or use the project’s RPM repository on supported RHEL and CentOS systems. The exact repository setup depends on your distribution and release; after installing, start the service, verify it locally, and complete CouchDB’s setup before exposing it to a network.
Before you install
CouchDB is a document-oriented database that stores JSON documents and provides an HTTP API. Its package is not necessarily available in the default operating-system repositories, so use the Apache CouchDB installation instructions for your exact distribution and release rather than guessing a repository URL or mixing packages built for different versions.
- Identify the operating system and release with
cat /etc/os-release. - Use an account with
sudoaccess; on RHEL-family systems, confirm that the required package-management tools are installed. - Back up existing CouchDB data and configuration before upgrading or reinstalling.
- Plan how you will set an administrator password and restrict network access. Do not leave an internet-accessible database in an unconfigured state.
Apache maintains platform-specific package instructions and repository details, which can change over time. Consult the current Apache CouchDB installation documentation before adding a repository, especially on older releases or systems no longer supported by the project.
Install on Debian and Ubuntu
On Debian and Ubuntu, the general process is to configure the Apache CouchDB APT repository and signing key, refresh the package index, and install the package. The repository setup commands may differ by operating-system release, so take the current commands from CouchDB’s official installation page rather than copying an old key URL or a release codename from another machine.
- Update the package index and install any prerequisite tools named in the official instructions, such as a tool for downloading repository metadata.
- Configure the CouchDB signing key and APT source using the instructions for your release. Verify that the source refers to the correct distribution codename and architecture.
- Refresh package metadata with
sudo apt update. - Install CouchDB with
sudo apt install couchdb. - Follow the installer prompts. Where prompted to choose a configuration mode, select the mode appropriate to your design: a single local node or a clustered deployment. Set the administrator credentials when requested.
If CouchDB is already installed from a different source, inspect the configured APT sources and package version before proceeding. Packages from unrelated repositories can have different versions or dependencies, and replacing them without a backup can complicate upgrades.
Install on RHEL and CentOS
On RHEL and CentOS, CouchDB is generally installed from the Apache project’s RPM repository, where packages are available for supported platform versions. Repository definitions and package names are release-specific; follow the official RPM instructions for the exact RHEL or CentOS version, including any required repository prerequisites.
- Check the release using
cat /etc/os-release, and confirm it is supported by the CouchDB package instructions. - Add the official CouchDB RPM repository and configure its signing key as directed by Apache.
- Refresh repository metadata using the system’s package manager. Depending on the release, this is typically
dnforyum. - Install the package using the package name specified in the official instructions. On many supported configurations the command is
sudo dnf install couchdb; older systems may useyum. - Complete the initial configuration and administrator setup using the package’s prompts or the documented configuration process.
CentOS Linux and CentOS Stream are not interchangeable labels for repository compatibility. Check the supported-platform list instead of assuming that a package intended for one CentOS generation also applies to another, or to every RHEL-compatible distribution.
Start the service and verify it
After installation, check whether the package started the service automatically. On systems using systemd, these commands show its state and can start it if needed:
sudo systemctl status couchdb
sudo systemctl enable --now couchdb
Use the service name supplied by the package documentation if it differs on your system. Then test the local HTTP endpoint:
curl http://127.0.0.1:5984/
A running CouchDB instance normally returns a JSON response identifying CouchDB and its version. This local check establishes that the service responds on the loopback interface; it does not prove that remote access, authentication, or cluster configuration is correct.
For a new installation, open the CouchDB setup interface at http://127.0.0.1:5984/_utils#setup from the server itself or through a secure local tunnel. Complete the single-node or cluster setup and create an administrator account. Confirm the result in the interface or with an authenticated request before using the database.
Configuration and network safety
CouchDB’s HTTP interface is commonly served on port 5984. Binding, firewall rules, authentication, and administrator setup determine who can reach and use it. Do not assume that installing the package automatically makes the service safe for public access.
- Keep CouchDB bound to localhost when only applications on the same server need it.
- If remote clients need access, configure the intended interface and firewall deliberately, and use an appropriate protected network path.
- Set an administrator account and verify authentication before allowing untrusted clients to connect.
- For production use, plan backups, updates, monitoring, and access controls. Do not expose the database directly to the public internet simply to make a test request work.
Configuration files and their locations can vary with package and release. Check the documentation for the installed package before editing settings, and keep a copy of the original configuration. Firewall commands also differ between distributions and local policies; open only the access your deployment requires.
Common installation problems
- Package not found: The repository may not be configured, its metadata may be stale, or the operating-system release may not be supported. Check the official repository instructions and refresh APT or DNF/YUM metadata.
- Signing-key or repository errors: Recheck the official key setup and repository entry. Avoid disabling signature verification as a workaround; package signing helps confirm package integrity and origin.
- Service will not start: Inspect
sudo journalctl -u couchdbfor service logs and check the CouchDB configuration for invalid settings, permissions problems, or a port already in use. - Connection refused: Confirm that the service is active and listening on the address you are testing. A local response on the server and a remote connection are separate checks.
- Remote connection times out: Check the configured bind address, firewall, and network path. Do not solve a timeout by making the database publicly reachable without authentication and a deliberate security design.
A common misconception is that a successful package installation means CouchDB is ready for application use. Installation only places the software on the system; initial setup, credentials, network decisions, and any required cluster configuration remain essential.
Frequently Asked Questions
Is CouchDB included in the default Ubuntu or Debian repositories?
Availability depends on the operating-system release and repository configuration. For the Apache-supported package and its current version, follow CouchDB’s official APT installation instructions.
Can I use the same installation command on RHEL, CentOS, Debian, and Ubuntu?
No. Debian and Ubuntu use APT, while RHEL-family systems use DNF or YUM, and repository setup differs. Use instructions matching both the distribution and its release.
How do I check whether CouchDB is running?
Check sudo systemctl status couchdb, then run curl http://127.0.0.1:5984/ on the server. A local response does not confirm remote connectivity.
What port does CouchDB use?
The HTTP API commonly uses port 5984. Confirm the installed configuration before changing firewall rules or assuming the service is listening on a particular interface.
Do I need to configure CouchDB after installing it?
Yes. Complete the setup process, select a single-node or cluster configuration as appropriate, and create administrator credentials before relying on the database.
Official documentation
Because supported distributions, repository keys, and package instructions can change, use the current Apache CouchDB installation documentation as the authority for your release. After installation, consult the CouchDB documentation for configuration, administration, upgrades, and backups.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Fix Error 0x80072f76 0x20016 in Windows
- How to Backup and Restore Drivers in Windows 11
- Fix Windows Couldn’t Complete the Requested Changes
- Move to iOS Stuck? Fixes That Actually Work
- USB Bluetooth Dongle: What It Is and How It Works
- ADB Device Not Found Error on Windows: Fixed