How To Install CouchDB on Windows

Article By saleh01


In this Tutorial you will learn how to Install CouchDB on Windows.


Apache CouchDB or CouchDB is a document oriented open source database that works for JSON to store data, JavaScript as the query language of it and HTTP for the API. Its main features are- Document storage, ACID Semantics, Map or reduce views and indexes, distribute architecture with replication, REST API or for eventual consultancy. CouchDB is very highly partition tolerant and available, but it’s also eventually consistent. And as long as you care about your data, CouchDB is here for a fault-tolerant storage engine For the purpose of safety of your data.

Facts to install CouchDB

  • CouchDB is a highly concurrent document-oriented database which is written in Erlang.
  • CouchDb is a part of the NoSQL database generation.
  • It’s an Apache Foundation project that allows storing applications like JSON via the RESTful interface.
  • Using map, reduces the index and makes a database query easier with CouchDB.

Installing CouchDB on Windows

There are two different methods of installing CouchDB on Windows operating system- Installing from sources and Installing from Binaries. Here we’ve discussed both of the methods in details with necessary steps

Method 1 of 2:
Installing CouchDB From Sources

Before starting the setup process, make sure you have these following installed in your PC

Here are the notes that you need to install Libcurl only if you want to run Javascript Test Suite and you need to install help2man in case you plan to install CouchDB man page. Also, two more software (Python and Sphinx) are needed to be installed in order to build online documentation.

Also, ensure the following before starting and during the installation process

  • Built the Erlang from source while installing the Erlang.
  • When you’re installing Cygwin, make sure that you’ve selected all of the development tools.
  • Remember, CouchDB needs several numbers of Erlang build scripts.
  • It’s not good if you try to link against libraries that are built with MingW or Cygwin. Because MingW or Cygwin are not compatible with CouchDB build scripts or Erlang/OTP.
  • Using MSBuild, ICU version 4.6 or further will be build cleanly.
  • To build the online documentation, Python and Sphinx are alternative options instead. It’s better to use Cygwin-provided python and to install Sphinx by using easy_install or pip. Find more on this topic here.

Now, after you are done, you can go through these following steps orderly-

Step 1: Setting Up the Cygwin

Before starting to run Cygwin Terminal, run

set CYGWIN=nontsec

To setup the environment, run

While running the code of environment setup, replace the [VS_BIN] with the path directory of your visual studio bin. Now, after you are done, you need to check these followings

  • The which link command points to the Microsoft Linker.
  • The which cl command points to the Microsoft compiler.
  • The which mc command points to the Microsoft message compiler.
  • The which mt command points to the Microsoft manifest tool.
  • The which nmake command points to Microsoft make tool.

Step 2: Building Erlang

At this stage, you must have Win32 OpenSQL which is built statistically from source. Also, exactly same versions need to be used as required by the build process of Erlang/OTP.

Now, if you want, you can skip the GUI tools by running

echo "skipping gs" > lib/gs/SKIP
echo "skipping ic" > lib/ic/SKIP
echo "skipping jinterface" > lib/jinterface/SKIP

Afterwards, follow these instructions to complete building Erlang successfully

Run the following

./otp_build release –a

Now, run this following
./release/win32/Install.exe –s

The process mentioned above will set up a destination and data directory for CouchDB installation. This will set up the release/win32/bin directory successfully.

Now, in order to set up the environment for building CouchDB, run

eval `./otp_build env_win32

In order to set up the ERL_TOP environment variable, run
export ERL_TOP=[ERL_TOP]

Here, replace the [ERL_TOP] part with the name of the Erlang source directory. Also, don’t forget to use /cygdrive/c/ instead of c:/ as the directory prefix while replacing.

Finally, to setup the path, you run

export PATH=$ERL_TOP/release/win32/erts-5.8.5/bin:$PATH

Now, after you’ve successfully gone through the process, now it’s time to build the CouchDB.

Step 3: Build CouchDB

Before you start this step, keep in mind that you need to have win32-curl only if you want to run the developer test.

You can skip the documentation part by just running --disable-docs if you want to. Now, after satisfying the dependencies, run

./configure \
--with-js-include=/cygdrive/c/path_to_spidermonkey_include \
--with-js-lib=/cygdrive/c/path_to_spidermonkey_lib \
--with-win32-icu-binaries=/cygdrive/c/path_to_icu_binaries_root \
--with-erlang=$ERL_TOP/release/win32/usr/include \
--with-win32-curl=/cygdrive/c/path/to/curl/root/directory \
--with-openssl-bin-dir=/cygdrive/c/openssl/bin \
--with-msvc-redist-dir=/cygdrive/c/dir/with/vcredist_platform_executable \
--disable-init \
--disable-launchd \

After you run, it will take some moments to execute the command. After completing this successfully, a message like the following will appear

You have configured Apache CouchDB, time to relax.

Now, after configuring, you need to install CouchDB. Run-

make install

Now, if everything is done perfectly, a following message will appear

You have installed Apache CouchDB, time to relax.

Finally, to in order to build the re-installer package also, just run

make dist

As a alternative process, you can also run CouchDB from the build tree directly. But don’t run make dist after the process to avoid any kind of contamination.

Step 4: First Run CouchDB

To run VouchDb for the very first time, just run


If done successfully, the CouchDB will show this message Apache CouchDB has started, time to relax.

Also, to check out the verification test and to check whether everything is working or not, follow this URL via Firefox or other web browsers-  

Method 2 of 2: Install CouchDB from Binaries

Between the two described processes in this article, this one is easier to go. Few steps and selections will complete the whole installation process.

Let’s start with the steps

Step 1

Click the CouchDB website and get the latest Windows binaries. Also, you can find older releases of Windows binary here.

Step 2

Now, at the installation wizard, go through these sub-steps-

  1. Click Next on the welcome screen.
  2. Accept the agreement of the license.
  3. Select the directory of installation.
  4. Specify a group name for the Start Menu.
  5. Approve the permission that, you are likely to install CouchDB as a service and the processes will automatically take place.
  6. Verify the Settings for Installation.
  7. Install CouchDB.

Step 3

Now open Futton from http://localhost:5984/_utils". Mind that, if you have not selected Autostart CouchDB, manually start it first to continue.

All done, now relax and enjoy!

Notes on Installation and Upgrading

  • In some cases, you may be asked for permission to reboot the computer. Allow those processes.
  • It’s strictly suggested to install CouchDB with the previous versions before upgrading.
  • While upgrading, make sure you kept the backup files like ini config or CouchDB index/database files.

Tags: , , ,

Spin Up A VPS Server In No Time Flat

Simple Setup

Full Root Access

Straightforward Pricing


Leave a Reply