The official documentation has moved to http://docs.couchdb.org — The transition is not 100% complete, but http://docs.couchdb.org should be seen as having the latest info. In some cases, the wiki still has some more or older info on certain topics inside CouchDB.

You need to be added to the ContributorsGroup to edit the wiki. But don't worry! Just email any Mailing List or grab us on IRC and let us know your user name.

Using CouchDB does not require installing cygwin, or becoming a command-line guru. If you get stuck here your best bet is IRC on #couchdb or the mailing lists. This page will help you relax on Windows just as much as anywhere else!

Quick Start

So you just can't wait to relax can you? The fastest route is to:

If you wish, you can install CouchDB yourself instead of using a hosted option, using https://couchdb.apache.org/#download.

Run

net.exe stop "Apache CouchDB" && net.exe start "Apache CouchDB"

curl -H "Content-Type: application/json" -X PUT http://username:password@localhost:5984/albums/6e1295ed6c29495e54cc05947f18c8af -d '{"title":"There is Nothing Left to Lose","artist":"Foo Fighters"}'

 curl -H "Content-Type: application/json" -X PUT http://username:password@localhost:5984/albums/6e1295ed6c29495e54cc05947f18c8af -d @foo.json

curl -H "Content-Type: application/json" -X PUT http://username:password@localhost:5984/albums/6e1295ed6c29495e54cc05947f18c8af -d "{\"title\":\"There is Nothing Left to Lose\",\"artist\":\"Foo Fighters\"}"

Building from Source

Note the full build chain is documented -- but again you don't need this for *installing* and *using* CouchDB on Windows. There are a number of community-provided scripts helping you build from source if needed.

Upgrade

How is CouchDB deployed on Windows?

A full MSI installer package is not yet available but check back on dev@ for news on this. The Official CouchDB installer performs 4 main functions:

Integrating CouchDB into your Windows Applications

From the above, the bare minimum to roll CouchDB into your own application installer follows.

Preparation

Bundling

You can bundle the app in whatever installer toolkit you prefer. Make sure it does the following, in order:

Upgrading

Most recent changes since 0.8 have required a full uninstall and re-install to avoid mixing Erlang libraries from different versions. Depending on changes in Erlang and CouchDB it may be that the on-disk format or replication has also changed. You will need to decide how to handle this on a case-by-case basis. The official CouchDB installer in versions after 1.0.2 will not require a reboot during/after uninstall & reinstall. This is due to killing off the stray epmd.exe process prior to upgrade/installation.

Inside CouchDB on Windows - the gory details

There are 3 different ways of running CouchDB on windows.

The werl.exe version is clearly simplest for interactive and development usage, but the service is far superior for production usage. Full information is available for erlsrv.exe and erl.exe which also covers werl.exe; refer to couchdb.bat for current flags passed to the emulator.

Assuming you have an environment variable %COUCH% already set then:

use case

erlsrv parameters

impact

deployed CouchDB service up to 1.0.2 inclusive

erlsrv.exe add "Apache CouchDB" -w "%COUCH%\bin" -ar "-sasl errlog_type error -s couch" -c "Apache CouchDB 1.1.1"

service will not restart automatically; VM not tuned

Start CouchDB in debug mode

erlsrv.exe add "CouchDeBug" -workdir "%COUCH%\bin" -onfail restart_always -debugtype console -args "-sasl errlog_type error -s couch +A 4 +W w" -comment "CouchDeBug"

service will restart automatically. Console is accessible to users logged into winsta0 i.e. local interactive users for input

Production mode and CouchDB versions > 1.0.2

erlsrv.exe add "CouchDB_Production" -workdir "%COUCH%\bin" -onfail restart_always -args "-sasl errlog_type error -s couch +A 4 +W w" -comment "CouchDB_Production 1.1.1"

Console hidden, service restarts automatically

Quirks_on_Windows (last edited 2013-08-30 12:40:16 by DaveCottlehuber)