couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Couchdb Wiki] Trivial Update of "Additional_Instances" by DaveCottlehuber
Date Thu, 19 Apr 2012 09:52:23 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The "Additional_Instances" page has been changed by DaveCottlehuber:

New page:

= Setting up Additional CouchDB Instances =

While most of the time, it's sufficient to have different applications stored in separate
design docs, or in separate DBs, sometimes you just need a separate instance. For example,
SSL certificates and port/ip addresses are bound to the erlang instance, not the individual

This is the file structure you'll need to create:

 * {{{lib/couchdb}}} for the couchdb data files
 * {{{{log,run}/couchdb/}}} are self explanatory
 * and a single {{{etc/couchdb/local.ini}}} which will over-ride the system-installed CouchDB
{{{default.ini}}} at runtime

    ├── etc
    │   └── couchdb
    │       └── local.ini
    └── var
        ├── lib
        │   └── couchdb
        ├── log
        │   └── couchdb
        └── run
            └── couchdb

 * Assuming you adapt OLD & NEW as appropriate, here's how to set it up:

% OLD=/usr/local
% NEW=/tmp/couchdb

% mkdir -p $NEW/etc/couchdb/
% mkdir -p $NEW/var/{lib,log,run}/couchdb/

% cp $OLD/etc/couchdb/local.ini $NEW/etc/couchdb/

% tree -l $NEW
[...tedious output omitted...]

 * Don't forget to {{{chown/chmod}}} all these dirs and files so that the future CouchDB user
has r/w permissions.
 * Finally, you then need to adapt {{{local.ini}}} for these new locations, and obviously
include a different port/bind_address combo

database_dir = /tmp/couchdb/var/lib/couchdb
view_index_dir = /tmp/couchdb/var/lib/couchdb
uri_file = /tmp/couchdb/var/run/couchdb/couch.uri

port = 5985
bind_address =

file = /tmp/couchdb/var/log/couchdb/couch.log

You can test this by running couchdb (in my case interactively using -i):
% couchdb -i -a /tmp/couchdb/etc/couchdb/local.ini

And Relax.

== Caveats ==

The original {{{local.ini}}} is still included in the configuration chain. You can see this
by running:

% couchdb -i -a /tmp/couchdb/etc/couchdb/local.ini -c


This means anything (for example server admins (in {{{[admins]]]} or SSL certificates in {{{[ssl]}}})
that are not over-ridden in your newer config file will apply. If you've got server admins
created then don't forget to prune them in the duplicated local.ini if needed.

View raw message