selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

Apache CouchDB logo

Self-host Apache CouchDB

3.5.3-post1

Syncing JSON document DB with an HTTP/JSON API

ReleaseOpen SourceApache-2.0
Updated3 weeks ago
LanguageErlang
Setup difficultyModerate
Stars
7 014
Port
5984 (CouchDB HTTP API (container side; the Docker images expose this port))
Requires
Erlang/OTP, ICU, Mozilla SpiderMonkey, OpenSSL
Docker
apache/couchdb
Install with Linux
Apache CouchDB screenshot 1

What is Apache CouchDB?

Apache CouchDB is a document-oriented database built on Erlang/OTP that stores semi-structured JSON documents and speaks plain HTTP, so any client that can make requests can read and update data through its RESTful API. Its signature capability is replication: changes sync bi-directionally between nodes, laptops, phones and browsers, resuming from the last checkpoint and surfacing edit conflicts as a normal state rather than an error. The same engine scales from a single-node instance to a "shared nothing" cluster that runs one logical database across many servers or VMs without changing the API. Queries use design documents with JavaScript map/reduce view functions and incrementally maintained view indexes, and offline space is reclaimed by online compaction. Data lives in a crash-resistant append-only file structure, so no consistency repair is needed after a power failure. Administrators get the bundled Fauxton web interface at /_utils, and users authenticate with Basic or Cookie auth against a server admin created before first start. Self-hosters can run the official apache/couchdb Docker image, the couchdb snap, a Helm chart on Kubernetes, convenience deb/rpm packages, or build from source with ./configure && make release; optional add-ons include the Lucene-based search indexes and the Nouveau search server.

Apache CouchDB alternatives

Should you self-host Apache CouchDB?

Apache CouchDB scores 73/100 on selfhost.directory (how scoring works) and ranks #10 of 38 in Databases. It has 7 014 GitHub stars, +39 in the last 30 days.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is Apache-2.0-licensed and written mostly in Erlang.

Its closest alternative on selfhost.directory is Redis (86/100, 77 511 stars). It scores higher overall, so compare the two before you pick. See Apache CouchDB vs Redis side by side.

Features

  • ACID per-document transactions
  • Bi-directional replication
  • Cookie authentication
  • Document-oriented storage
  • HTTP/JSON REST API
  • MapReduce views
  • Multi-node clustering
  • Online compaction
  • Search indexes (Nouveau)Optional separate server, not part of the core storage engine.
  • TLS/SSL Support
  • Web admin UI (Fauxton)

Apache CouchDB README

Apache CouchDB README

1 2

Installation

For a high-level guide to Unix-like systems, inc. Mac OS X and Ubuntu, see:

How to install Apache CouchDB

Install Apache CouchDB with Linux

sudo yum install -y yum-utils sudo yum-config-manager --add-repo https://couchdb.apache.org/repo/couchdb.repo

Second step: `sudo yum install -y couchdb` (on RHEL 9 install mozjs78 first; RHEL 9 also needs EPEL/CRB enabled).

How to configure Apache CouchDB

  • adminsnap setting used to set the CouchDB admin password, e.g. `sudo snap set couchdb admin=[your-password]`

    values: password

  • database_dir[couchdb] config key in local.ini pointing at the data directory (example from the snap troubleshooting docs)

    values: path to database files

  • view_index_dir[couchdb] config key in local.ini pointing at the view index directory (example from the snap troubleshooting docs)

    values: path to view indexes

  • max_document_sizeOptional [couchdb] key limiting document size in bytes (shown commented out in the snap docs example)

    values: bytes

  • os_process_timeoutOptional [couchdb] key for query-server process timeout (shown commented out in the snap docs example)

    values: milliseconds

More in Databases

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…