You are currently browsing legacy 1.0 version of documentation. Click here to switch to the newest 4.2 version.

We can help you with migration to the latest RavenDB

Contact Us Now
see on GitHub

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 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>

Core settings

  • Raven/BackgroundTasksPriority
    What thread priority to give the various background tasks RavenDB uses (mostly for indexing)
    Allowed values: Lowest, BelowNormal, Normal, AboveNormal, Highest
    Default: Normal

  • Raven/MaxPageSize
    The maximum allowed page size for queries.
    Default: 1024
    Minimum: 10

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

Index settings

  • Raven/IndexStoragePath
    The path to the indexes that are kept on disk. Putting them in a different drive than the actual data will improve performance significantly.
    Default: ~/Data/Indexes

  • Raven/SkipCreatingStudioIndexes
    Set to true, tells RavenDB NOT to create the indexes that are used by the Management Studio to provide some Collection related features.
    Allowed values: true/false
    Default: false

  • Raven/MaxNumberOfParallelIndexTasks
    The maximum number of indexing tasks allowed to run in parallel
    Default: the number of processors in the current machine

  • Raven/MaxNumberOfItemsToIndexInSingleBatch
    Max number of items to take for indexing in a batch
    Default: 2500
    Minimum: 128

  • Raven/TempIndexPromotionMinimumQueryCount
    How many times a temporary, auto-generated index has to be accessed before it can be promoted to be a permanent one
    Default: 100

  • Raven/TempIndexPromotionThreshold
    Time (in milliseconds) the index has to be queried at least once in order for it to become permanent
    Default: 60000 (once per minute)

  • Raven/TempIndexCleanupPeriod
    How often to run the temporary index cleanup process (in seconds)
    Default: 600 (10 minutes)

  • Raven/TempIndexCleanupThreshold
    How much time in seconds to wait after a temporary index has been used before removing it if no further calls were made to it during that time
    Default: 1200 (20 minutes)

  • Raven/TempIndexInMemoryMaxMB
    Temp indexes are kept in memory until they reach this integer value in MB
    Default: 25 MB
    Minimum: 1 MB

Data settings:

  • Raven/RunInMemory
    Should RavenDB's storage be in-memory. If set to true, Munin would be used as the storage engine, regardless of what was specified for StorageTypeName
    Allowed values: true/false
    Default: false

  • Raven/DataDir
    The directory for the RavenDB database. You can use the ~\ prefix to refer to RavenDB's base directory.
    Default: ~\Data

  • Raven/StorageTypeName
    What storage type to use (see: RavenDB Storage engines)
    Allowed values: esent, munin (at this point of time only Esent is fully supported by RavenDB)
    Default: esent

  • Raven/TransactionMode
    What sort of transaction mode to use
    Allowed values: Lazy (faster, but can result in data loss in the case of server crash), Safe (slower, but will never lose data)
    Default: Safe

Http settings

  • Raven/HostName
    The hostname to use when creating the http listener (null to accept any hostname or address)
    Default: none, binds to all host names

  • Raven/Port The port to use when creating the http listener.
    Default: 8080

  • Raven/VirtualDirectory
    The virtual directory to use when creating the http listener.
    Default: /

  • Raven/HttpCompression
    Whether to use http compression or not
    Allowed values: true/false
    Default: true

  • Raven/AccessControlAllowOrigin
    Determine the value of the Access-Control-Allow-Origin header sent by the server
    Allowed values: null (don't send the header), *, http://example.org

  • Raven/AnonymousAccess
    Defines which operations are allowed for anonymous users
    Allowed values: All, Get, None
    Default: Get

Misc settings

  • Raven/PluginsDirectory
    Where to look for plugins for RavenDB
    Default: ~\Plugins

  • Raven/WebDir
    The directory to search for RavenDB's WebUI. This is usually only useful if you are debugging RavenDB's WebUI
    Default: ~/Raven/WebUI

  • Raven/Authorization/Windows/RequiredGroups
    Limit the users that can authenticate to RavenDB to only users in the specified groups. Multiple groups can be specified, separated by a semi column (;).

Esent settings

  • Raven/Esent/CacheSizeMax
    The maximum size of the in memory cache that is used by the storage engine. The value is in megabytes.
    Default: 1024

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

  • 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: 16

  • 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
    Where to keep the Esent transaction logs. Putting the logs in a different drive than the data and indexes will improve performance significantly.
    Default: ~/Data/logs

  • Raven/Esent/CircularLog
    Whether or not to enable circular logging with Esent.
    Default: true