Configuration Overview


  • RavenDB comes with default settings that are configured for best results.
    If needed, you can customize the default configuration to suit your specific needs.

  • Any configuration key can be modified by either of the following options:

Environment variables

  • To set a configuration key as an environment variable:

    • Add the prefix RAVEN_ to the configuration key name
    • Replace all period characters (.) with the underscore character (_)
  • The server will retrieve these environment variables and apply their values.

Example:

  • To set configuration key Security.Certificate.Path from an environment variable,
    add the environment variable RAVEN_Security_Certificate_Path.

// In Windows PowerShell:
$Env:RAVEN_Security_Certificate_Path=/config/raven-server.certificate.pfx

// This will set the path to your .pfx certificate file

settings.json

settings.json configuration values override their matching environment variables values.

  • The settings.json file is created by RavenDB when running the server for the first time,
    duplicating the settings.default.json file located in the same directory as the server executable.

  • If you want to apply configuration keys to settings.json prior to running the server for the first time,
    you can manually copy settings.default.json to settings.json and make your changes there.

  • The file is read and applied only on server startup.

  • To set a configuration key from settings.json simply add the key and its value to the file.

Example:

{
    "ServerUrl": "http://127.0.0.1:8080",
    "Setup.Mode": "None",
    "License.Path": "D:\\RavenDB\\Server\\license.json"
}

JSON Arrays

Configuration options that include multiple values (like strings separated by ;)
can be configured using regular JSON arrays.
For example, to set Security.WellKnownCertificates.Admin use:

{
    "Security.WellKnownCertificates.Admin" : [ "297430d6d2ce259772e4eccf97863a4dfe6b048c", "e6a3b45b062d509b3382282d196efe97d5956ccb" ]
}

Command line arguments

Command line arguments configuration values override their matching
environment variables and settings.json values.

  • The server can be configured using command line arguments that are passed to the console application
    (or while running as a daemon).

  • Find additional details about Command Line Arguments here.

Example:

./Raven.Server --Setup.Mode=None