How to install latest CouchDB on Ubuntu 12.04, 14.04, 15.04, 15.10, 16.04, etc?

I spent around an hour trying different ways and instructions for installing latest CouchDB on my Ubuntu 12.4 installation. I have posted the best way that I found as answer to save other peoples time.

| improve this question | | | | |

Install the latest stable release with the commands below:

sudo apt-get remove couchdb couchdb-bin couchdb-common -f
sudo apt-get install python-software-properties
sudo apt-add-repository ppa:couchdb/stable
sudo apt-get update
sudo apt-get install couchdb couchdb-bin couchdb-common -f


| improve this answer | | | | |
  • 1
    I got couchdb : Depends: couchdb-bin (>= 1.6.1-0ubuntu1) but it is not going to be installed with this method. – Ali Shakiba Jun 24 '15 at 9:36
  • Doesn't seem to work in Debian Jessie :(. – danieljimenez Feb 19 '17 at 17:29
  • before running the apt-add-repository, make sure you have: apt-get install software-properties-common – Kaf Apr 5 '17 at 10:18
  • Check also this url for a easier installation gist.github.com/christophemarois/… – Kaf Apr 26 '17 at 7:06

Run this script:

cd /tmp
mkdir x
cd x

set -e

sudo apt-get update || true
sudo apt-get --no-install-recommends -y install build-essential pkg-config runit erlang libicu-dev libmozjs185-dev libcurl4-openssl-dev

wget http://mirrors.fe.up.pt/pub/apache/couchdb/source/2.0.0/apache-couchdb-2.0.0.tar.gz

tar -xvzf apache-couchdb-2.0.0.tar.gz
cd apache-couchdb-2.0.0/
./configure && make release

sudo adduser --system \
        --no-create-home \
        --shell /bin/bash \
        --group --gecos \
        "CouchDB Administrator" couchdb

sudo cp -R rel/couchdb /home/couchdb
sudo chown -R couchdb:couchdb /home/couchdb
sudo find /home/couchdb -type d -exec chmod 0770 {} \;
sudo sh -c 'chmod 0644 /home/couchdb/etc/*'

sudo mkdir /var/log/couchdb
sudo chown couchdb:couchdb /var/log/couchdb

sudo mkdir /etc/sv/couchdb
sudo mkdir /etc/sv/couchdb/log

cat > run << EOF

export HOME=/home/couchdb
exec 2>&1
exec chpst -u couchdb /home/couchdb/bin/couchdb

cat > log_run << EOF

exec svlogd -tt /var/log/couchdb

sudo mv ./run /etc/sv/couchdb/run
sudo mv ./log_run /etc/sv/couchdb/log/run

sudo chmod u+x /etc/sv/couchdb/run
sudo chmod u+x /etc/sv/couchdb/log/run

sudo ln -s /etc/sv/couchdb/ /etc/service/couchdb

sleep 5
cd /tmp/x/apache-couchdb-2.0.0

sudo sv status couchdb    mv rel/couchdb /usr/local/bin/
cd ..
rm -r /tmp/x

cat <<EOT >> /etc/systemd/system/couchdb.service
Description=Couchdb service

ExecStart=/usr/local/bin/couchdb/bin/couchdb -o /dev/stdout -e /dev/stderr

systemctl  daemon-reload
systemctl  start couchdb.service
systemctl  enable couchdb.service
service couchdb start

then open the url http://localhost:5984/_utils/

| improve this answer | | | | |
  1. Download the latest Source package of CouchDB from couchdb.apache.org and extract it
  2. Open INSTALL.Unix or any other appropriate readme or install file
  3. RTFM™ and follow instructions, install unmet dependencies if any and Relax!™
| improve this answer | | | | |

While this post is not focused on Ubuntu (but rather debian on a Raspberry Pi), I was successful in following these guidelines on Ubuntu:



  1. Add Erlang repositories to your package manager
  2. Install Erlang
  3. Install spidermonkey
  4. Install libicu
  5. Install curl
  6. Set up user account for CouchDB
  7. Download CouchDB source code
  8. Do configure/make/make install
  9. Create soft links
  10. Make CouchDB config writable
| improve this answer | | | | |
  • Why the downvote? – brdlph Jul 31 '15 at 8:22

Just try to use snap to install CouchDB.Only 2 commands needed.

sudo apt install snapd
sudo snap install couchdb

Source: Stack Overflow

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.