Configuration options

All the configuration options detailed below are defined in the section of your config file as separate values. When running RavenDB as a website (through IIS, or in Embedded mode), the config file is web.config; otherwise it is the Raven.Server.exe.config file.

Changes to the config file or additions / removal from the Plugins directory will not be picked up automatically by the RavenDB service. For your changes to be recognized you will need to restart the service. You can do so calling: Raven.Server.exe /restart.

If you are running in Embedded mode, or RavenDB is running as an IIS application, touching the web.config file will cause IIS to automatically restart RavenDB.

Sample configurations file

This is the standard app.config XML file. The appSettings section is where the global configuration options go, also for web applications which have a web.config file instead.

<?xml version="1.0" encoding="utf-8" ?> 
<configuration> 
  <appSettings> 
    <add key="Raven/Port" value="*"/> 
    <add key="Raven/DataDir" value="~\Data"/> 
    <add key="Raven/AnonymousAccess" value="Get" /> 
  </appSettings> 
        <runtime> 
                <loadFromRemoteSources enabled="true"/> 
                <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
                        <probing privatePath="Analyzers"/> 
                </assemblyBinding> 
        </runtime> 
</configuration>

Configuration options

Core settings

  • Raven/MaxPageSize
    The maximum page size that can be specified on this server.
    Default: 1024
    Minimum: 10

  • Raven/MemoryCacheExpiration
    The expiration value for documents in the internal document cache. Value is in seconds.
    Default: 5 minutes

  • Raven/MemoryCacheLimitMegabytes The max size in MB for the internal document cache inside RavenDB server.
    Default: 50% of the total system memory minus the size of the Esent cache.

  • Raven/MemoryCacheLimitPercentage The percentage of memory that the internal document cache inside RavenDB server will use.
    Default: 0 (auto)

  • Raven/MemoryCacheLimitCheckInterval The internal for checking that the internal document cache inside RavenDB server will be cleaned.
    Format: HH:MM:SS
    Default: depends on system polling interval

Index settings

  • Raven/IndexStoragePath
    The path for the indexes on disk. Useful if you want to store the indexes on another HDD for performance reasons.
    Default: ~/Data/Indexes

  • Raven/MaxNumberOfParallelIndexTasks
    The number of indexing tasks that can be run in parallel. There is usually one or two indexing tasks for each index.
    Default: the number of processors in the current machine

  • Raven/MaxNumberOfItemsToIndexInSingleBatch
    The max number of items that will be indexed in a single batch. Larger batch size result in faster indexing, but higher memory usage.
    Default: 128 * 1024 for 64-bit and 64 * 1024 for 32-bit
    Minimum: 128

  • Raven/InitialNumberOfItemsToIndexInSingleBatch The number of items that will be indexed in a single batch. Larger batch size result in faster indexing, but higher memory usage.
    Default: 512 for 64-bit and 256 for 32-bit

  • Raven/AvailableMemoryForRaisingIndexBatchSizeLimit The minimum amount of memory available for us to double the size of InitialNumberOfItemsToIndexInSingleBatch if we need to.
    Default: 50% of total system memory
    Minimum: 768

  • Raven/ResetIndexOnUncleanShutdown When the database is shut down rudely, determine whatever to reset the index or to check it. Note that checking the index may take some time on large databases.
    Default: false

  • Raven/MaxIndexingRunLatency What is the suggested max latency for a single indexing run that allows the database to increase the indexing batch size.
    Default: 5 minutes

  • Raven/TaskScheduler The TaskScheduler type to use for executing indexing.

  • Raven/TempIndexPromotionMinimumQueryCount
    The number of times a temporary index has to be queried during the promotion threshold to become a permanent auto index.
    Default: 100
    Minimum: 1

  • Raven/TempIndexPromotionThreshold
    The promotion threshold for promoting a temporary dynamic index into a permanent auto index. The value is in second and refer to the length of time that the index have to get to the minimum query count value.
    Default: 60000 (once per minute)

  • Raven/TempIndexCleanupPeriod
    How often will temp dynamic indexes be purged from the system. The value is in seconds.
    Default: 600 (10 minutes)

  • Raven/TempIndexCleanupThreshold
    How long does a temporary index hang around if there are no queries made to it. The value is in seconds.
    Default: 1200 (20 minutes)

  • Raven/TempIndexInMemoryMaxMB
    The max size in MB of a temporary index held in memory. When a temporary dynamic index exceeds that value, it will be using on disk indexing, rather then RAM indexing.
    Default: 25 MB
    Minimum: 1 MB

  • Raven/CreateTemporaryIndexesForAdHocQueriesIfNeeded Whatever we allow creation of temporary indexes on dynamic queries.
    Default: true

  • Raven/SkipCreatingStudioIndexes Control whatever the Studio default indexes will be created or not. These default indexes are only used by the UI, and are not required for RavenDB to operate.
    Default: false

  • Raven/LimitIndexesCapabilities Control whatever RavenDB limits what the indexes can do (to avoid potentially destabilizing operations).
    Default: false

Data settings:

  • Raven/RunInMemory
    Whatever the database should run purely in memory. When running in memory, nothing is written to disk and if the server is restarted all data will be lost. This is mostly useful for testing.
    Default: false

  • Raven/DataDir
    The path for the database directory. Can use ~\ as the root, in which case the path will start from the server base directory.
    Default: ~\Data

  • Raven/StorageTypeName
    What storage type to use (see: RavenDB Storage engines)
    Allowed values: esent, munin
    Default: esent

  • Raven/TransactionMode
    What transaction mode to use. Safe transaction mode ensures data consistency, but is slower. Lazy is faster, but may result in a data loss if the server crashes.
    Allowed values: Lazy, Safe
    Default: Safe

Http settings

  • Raven/HostName
    The hostname to bind the embedded http server to, if we want to bind to a specific hostname, rather than all.
    Default: none, binds to all host names

  • Raven/Port The port to use when creating the http listener. Allowed: 1 - 65,536 or * (find first available port from 8080 and upward)
    Default: 8080

  • Raven/VirtualDirectory
    The virtual directory for the RavenDB server.
    Default: /

  • Raven/HttpCompression
    Whatever http compression is enabled.
    Default: true

  • Raven/AccessControlAllowOrigin
    Configures the server to send Access-Control-Allow-Origin header with the specified value. If this value isn't specified, all the access control settings are ignored.
    Allowed values: null (don't send the header), *, http://example.org,
    Default: none

  • Raven/AccessControlMaxAge Configures the server to send Access-Control-Max-Age header with the specified value.
    Default: 1728000 (20 days)

  • Raven/AccessControlAllowMethods Configures the server to send Access-Control-Allow-Methods header with the specified value.
    Default: PUT, PATCH, GET, DELETE, POST.

  • Raven/AccessControlRequestHeaders Configures the server to send Access-Control-Request-Headers header with the specified value.
    Default: none

Misc settings

  • Raven/License The full license string for RavenDB. If Raven/License is specified, it overrides the Raven/LicensePath configuration.

  • Raven/LicensePath The path to the license file for RavenDB.
    Default: ~\license.xml

Bundles

  • Raven/ActiveBundles Semicolon separated list of bundles names, such as: 'Replication;Versioning'. If the value is not specified, none of the bundles are installed.
    Default: none

  • Raven/BundlesSearchPattern Allow to limit the loaded plugins by specifying a search pattern, such as Raven.*.dll. Multiple values can be specified, separated by a semicolon (;).

  • Raven/PluginsDirectory
    The location of the plugins directory for this database.
    Default: ~\Plugins

Studio

  • Raven/WebDir
    The location of the web directory for known files that makes up the RavenDB internal website.
    Default: ~/Raven/WebUI

  • Raven/RedirectStudioUrl The url to redirect the user to when then try to access the local studio.

Esent settings

  • Raven/Esent/CacheSizeMax
    The size in MB of the Esent page cache, which is the default storage engine.
    Default: 256 for 32-bit and 25% of total system memory for 64-bit
    Minimum: 256 for 32-bit and 1024 for 64-bit

  • Raven/Esent/MaxVerPages
    The maximum size of version store (in memory modified data) available. The value is in megabytes.
    Default: 512

  • Raven/Esent/DbExtensionSize
    The size that the database file will be enlarged with when the file is full. The value is in megabytes. Lower values will result in smaller file size, but slower performance.
    Default: 8

  • Raven/Esent/LogFileSize
    The size of the database log file. The value is in megabytes.
    Default: 64

  • Raven/Esent/LogBuffers
    The size of the in memory buffer for transaction log.
    Default: 16

  • Raven/Esent/MaxCursors
    The maximum number of cursors allowed concurrently.
    Default: 2048

  • Raven/Esent/LogsPath
    The path for the esent logs. Useful if you want to store the indexes on another HDD for performance reasons.
    Default: ~/Data/Logs

  • Raven/Esent/CircularLog
    Whatever circular logs will be used, defaults to true. If you want to use incremental backups, you need to turn this off, but logs will only be truncated on backup.
    Default: true

Tenants

  • Raven/Tenants/MaxIdleTimeForTenantDatabase The time in seconds to allow a tenant database to be idle. Value is in seconds.
    Default: 900

  • Raven/Tenants/FrequencyToCheckForIdleDatabases The time in seconds to check for an idle tenant database. Value is in seconds.
    Default: 60

Quotas

  • Raven/Quotas/Size/HardLimitInKB The hard limit after which we refuse any additional writes.
    Default: none

  • Raven/Quotas/Size/SoftMarginInKB The soft limit before which we will warn about the quota.
    Default: 1024

Authorization & Authentication

  • Raven/AnonymousAccess Determines what actions an anonymous user can do. Get - read only, All - read & write, None - allows access to only authenticated users, Admin - all (including administrative actions).
    Default: Get

Warning

Admin should only be used for testing and development, since it grants to ANY user administrative rights.

  • Raven/OAuthTokenServer The url clients should use for authenticating when using OAuth mode.
    Default: http://RavenDB-Server-Url/OAuth/AccessToken - the internal OAuth server.

  • Raven/OAuthTokenCertificatePath The path to the OAuth certificate.
    Default: none. If no certificate is specified, one will be automatically created.

  • Raven/OAuthTokenCertificatePassword The password for the OAuth certificate.
    Default: none

Encryption

  • Raven/Encryption/Algorithm
    AssemblyQualifiedName value. Additionaly provided type must be a subclass of SymmetricAlgorithm from System.Security.Cryptography namespace and must not be an abstract class.
    Default: "System.Security.Cryptography.AesManaged, System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
  • Raven/Encryption/Key
    Key used for encryption purposes with minimum length of 8 characters, base64 encoded.
  • Raven/Encryption/EncryptIndexes
    Boolean value indicating if the indexes should be encrypted.
    Default: True

Availability of configuration options

Many of the configuration options described in section above can be used both in global and per database context. If you want to set configuration per database, please refer to this page.

Configuration option Database Global
Raven/MaxPageSize Yes Yes
Raven/MemoryCacheExpiration Yes Yes
Raven/MemoryCacheLimitMegabytes Yes Yes
Raven/MemoryCacheLimitPercentage Yes Yes
Raven/MemoryCacheLimitCheckInterval Yes Yes
 
Raven/IndexStoragePath Yes Yes
Raven/MaxNumberOfParallelIndexTasks Yes Yes
Raven/MaxNumberOfItemsToIndexInSingleBatch Yes Yes
Raven/InitialNumberOfItemsToIndexInSingleBatch Yes Yes
Raven/AvailableMemoryForRaisingIndexBatchSizeLimit Yes Yes
Raven/ResetIndexOnUncleanShutdown Yes Yes
Raven/MaxIndexingRunLatency Yes Yes
Raven/TaskScheduler Yes Yes
Raven/TempIndexPromotionMinimumQueryCount Yes Yes
Raven/TempIndexPromotionThreshold Yes Yes
Raven/TempIndexCleanupPeriod Yes Yes
Raven/TempIndexCleanupThreshold Yes Yes
Raven/TempIndexInMemoryMaxMB Yes Yes
Raven/CreateTemporaryIndexesForAdHocQueriesIfNeeded Yes Yes
Raven/SkipCreatingStudioIndexes Yes Yes
Raven/LimitIndexesCapabilities Yes Yes
 
Raven/RunInMemory Yes Yes
Raven/DataDir Yes Yes
Raven/StorageTypeName Yes Yes
Raven/TransactionMode Yes Yes
 
Raven/HostName No Yes
Raven/Port No Yes
Raven/VirtualDirectory No Yes
Raven/HttpCompression No Yes
Raven/AccessControlAllowOrigin No Yes
Raven/AccessControlMaxAge No Yes
Raven/AccessControlAllowMethods No Yes
Raven/AccessControlRequestHeaders No Yes
 
Raven/License No Yes
Raven/LicensePath No Yes
 
Raven/ActiveBundles Yes* Yes
Raven/BundlesSearchPattern No Yes
Raven/PluginsDirectory No Yes
 
Raven/Esent/CacheSizeMax Yes Yes
Raven/Esent/MaxVerPages Yes Yes
Raven/Esent/DbExtensionSize Yes Yes
Raven/Esent/LogFileSize Yes Yes
Raven/Esent/LogBuffers Yes Yes
Raven/Esent/MaxCursors Yes Yes
Raven/Esent/LogsPath Yes Yes
Raven/Esent/CircularLog Yes Yes
 
Raven/Tenants/MaxIdleTimeForTenantDatabase No Yes
Raven/Tenants/FrequencyToCheckForIdleDatabases No Yes
 
Raven/Quotas/Size/HardLimitInKB Yes Yes
Raven/Quotas/Size/SoftMarginInKB Yes Yes
 
Raven/AnonymousAccess Yes Yes
Raven/OAuthTokenServer Yes Yes
Raven/OAuthTokenCertificatePath Yes Yes
Raven/OAuthTokenCertificatePassword Yes Yes
 
Raven/Encryption/Algorithm Yes** Yes
Raven/Encryption/Key Yes** Yes
Raven/Encryption/EncryptIndexes Yes** Yes

Note

Raven/ActiveBundles can be changed after database has been created, but any changes may cause unexpected stability issues and are HIGHLY unrecommended. Please activate bundles only when creating new database.

Note

Raven/Encryption settings can only be provided when database is being created. Changing them later will cause DB malfunction. More about Encryption bundle can be found here.

Note

Raven/Authorization/Windows/RequiredGroups and Raven/Authorization/Windows/RequiredUsers has been removed. You should create a document with the ID Raven/Authorization/WindowsSettings in order to configure windows authentication.