<commit_before>.. Licensed under the Apache License, Version 2.0 (the "License"); you may not
.. use this file except in compliance with the License. You may obtain a copy of
.. the License at
..
..   http://www.apache.org/licenses/LICENSE-2.0
..
.. Unless required by applicable law or agreed to in writing, software
.. distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
.. WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
.. License for the specific language governing permissions and limitations under
.. the License.

.. default-domain:: config

.. highlight:: ini

.. _config/intro:

=============================
Introduction Into Configuring
=============================

Configuration files
-------------------

By default, CouchDB reads configuration files from the following locations,
in the following order:

#. ``LOCALCONFDIR/default.ini``

#. ``LOCALCONFDIR/default.d/*``

#. ``LOCALCONFDIR/local.ini``

#. ``LOCALCONFDIR/local.d/*``

The ``LOCALCONFDIR`` points to the directory that contains configuration files
(``/usr/local/etc/couchdb`` by default). This variable may vary from the
target operation system and may be changed during building from the source code.
For binary distributions, it mostly points to the installation path
(e.g. ``C:\Program Files\CouchDB\etc\couchdb`` for Windows).

To see the actual configuration files chain run in shell::

  couchdb -c

This will print out all *actual* configuration files that will form the result
CouchDB configuration::

  /etc/couchdb/default.ini
  /etc/couchdb/default.d/geocouch.ini
  /etc/couchdb/local.ini
  /etc/couchdb/local.d/geocouch.ini
  /etc/couchdb/local.d/vendor.ini

Settings in successive documents override the settings in earlier entries.
For example, setting the :option:`httpd/bind_address` parameter in ``local.ini``
would override any setting in ``default.ini``.

.. warning::
   The ``default.ini`` file may be overwritten during an upgrade or
   re-installation, so localised changes should be made to the
   ``local.ini`` file or files within the ``local.d`` directory.

The configuration files chain may be changed by specifying additional sources<commit_msg>[docs] re-add plugins dir config section<commit_after>.. Licensed under the Apache License, Version 2.0 (the "License"); you may not
.. use this file except in compliance with the License. You may obtain a copy of
.. the License at
..
..   http://www.apache.org/licenses/LICENSE-2.0
..
.. Unless required by applicable law or agreed to in writing, software
.. distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
.. WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
.. License for the specific language governing permissions and limitations under
.. the License.

.. default-domain:: config

.. highlight:: ini

.. _config/intro:

=============================
Introduction Into Configuring
=============================

Configuration files
-------------------

By default, CouchDB reads configuration files from the following locations,
in the following order:

#. ``LOCALCONFDIR/default.ini``

#. ``LOCALCONFDIR/default.d/*.ini``

#. ``PLUGINS_DIR/*/priv/default.d/*.ini``

#. ``LOCALCONFDIR/local.ini``

#. ``LOCALCONFDIR/local.d/*.ini``

The ``LOCALCONFDIR`` points to the directory that contains configuration files
(``/usr/local/etc/couchdb`` by default). This variable may vary from the
target operation system and may be changed during building from the source code.
For binary distributions, it mostly points to the installation path
(e.g. ``C:\Program Files\CouchDB\etc\couchdb`` for Windows).

To see the actual configuration files chain run in shell::

  couchdb -c

This will print out all *actual* configuration files that will form the result
CouchDB configuration::

  /etc/couchdb/default.ini
  /etc/couchdb/default.d/geocouch.ini
  /etc/couchdb/local.ini
  /etc/couchdb/local.d/geocouch.ini
  /etc/couchdb/local.d/vendor.ini

Settings in successive documents override the settings in earlier entries.
For example, setting the :option:`httpd/bind_address` parameter in ``local.ini``
would override any setting in ``default.ini``.

.. warning::
   The ``default.ini`` file may be overwritten during an upgrade or
   re-installation, so localised changes should be made to the
   ``local.ini`` file or files within the ``local.d`` directory.

The configuration files chain may be changed by specifying additional sources
{'fraction_non_alphanumeric': 0.13007585899152163, 'fraction_numerical': 0.00178491744756805, 'mean_word_length': 4.020156774916013, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '220363', 'n_tokens_mistral': 1213, 'n_tokens_neox': 1194, 'n_words': 503}