{NOTE: }
-
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
- settings.json
- Command line arguments
- Database settings view (database scope only)
{NOTE/}
{PANEL: Environment variables}
{NOTE: }
-
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 (_
)
- Add the prefix
-
The server will retrieve these environment variables and apply their values.
{NOTE/}
{NOTE: }
Example:
- To set configuration key Security.Certificate.Path from an environment variable,
add the environment variableRAVEN_Security_Certificate_Path
.
{CODE-BLOCK:plain} // In Windows PowerShell: $Env:RAVEN_Security_Certificate_Path=/config/raven-server.certificate.pfx
// This will set the path to your .pfx certificate file {CODE-BLOCK/}
{NOTE/}
{PANEL/}
{PANEL: settings.json}
{INFO: } settings.json configuration values override their matching environment variables values. {INFO/}
{NOTE: }
-
The
settings.json
file is created by RavenDB when running the server for the first time,
duplicating thesettings.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.
{NOTE/}
{NOTE: }
Example:
{CODE-BLOCK:json} { "ServerUrl": "http://127.0.0.1:8080", "Setup.Mode": "None", "License.Path": "D:\RavenDB\Server\license.json" } {CODE-BLOCK/}
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:
{CODE-BLOCK:json} { "Security.WellKnownCertificates.Admin" : [ "297430d6d2ce259772e4eccf97863a4dfe6b048c", "e6a3b45b062d509b3382282d196efe97d5956ccb" ] } {CODE-BLOCK/}
{NOTE/}
{PANEL/}
{PANEL: Command line arguments}
{INFO: }
Command line arguments configuration values override their matching
environment variables and settings.json values.
{INFO/}
{NOTE: }
-
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.
{NOTE/}
{NOTE: }
Example:
{CODE-BLOCK:bash} ./Raven.Server --Setup.Mode=None {CODE-BLOCK/}
{NOTE/}
{PANEL/}
{PANEL: Database settings view}
{NOTE: }
-
When the server is up and running, you can modify configuration keys that are in the database scope from the Database settings view in the Studio.
-
After modifying a database configuration key from this view, the database must be reloaded for the change to take effect.
{NOTE/}
{PANEL/}