Configuration
Startup options you specify on a command line are referred to as command line options:
The same options can also be set via , using a slightly different syntax:
server.database = myDB
There are also flags which are for command line usage only, such as
‑‑help
and‑‑version
. They don’t take any value in contrast to options.
Find the available options and flags in the Options sub-chapters of the respective Programs & Tools sub-chapter, like the .
The ArangoDB Starter works differently to the other programs and tools. It uses setup.json
files for its own and has a fluent command line interface to execute certain actions. If you deploy ArangoDB with the Starter, then custom arangod.conf
files are generated by this tool and are used instead of the default configuration.
Command line options
Command line options can be supplied in the style ‑‑option value
with two dashes (also known as hyphen minus), the name of the option, a space as separator and the value. You may also use an equals sign =
as separator like ‑‑option=value
.
The value can be surrounded with double quote marks "
like ‑‑option="value"
. This is mandatory if the value contains spaces, but it is optional otherwise.
Some binaries accept one unnamed argument, which means you can take a shortcut and leave out the ‑‑option
part and supply the value directly. It does not matter if you supply it as first or last argument, or between any of the named arguments. For arangod it is the ‑‑database.directory
option. The following commands are identical:
Many options belong to a section as in ‑‑section.param
, e.g. ‑‑server.database
, but there can also be options without any section. These options are referred to as general options.
To list available options, you can run a binary with the ‑‑help
flag:
arangosh --help
To list the options of a certain section only, use ‑‑help‑{section}
like ‑‑help‑server
. To list all options including hidden ones use ‑‑help‑.
.
Configuration file format
.conf
files for ArangoDB binaries are in a simple key-value pair format. Each option is specified on a separate line in the form:
key = value
server.endpoint = tcp://127.0.0.1:8529
server.authentication = true
Alternatively, a header section can be specified and options pertaining to that section can be specified in a shorter form:
[server]
endpoint = tcp://127.0.0.1:8529
authentication = true
So you see, a command line option ‑‑section.param value
can be easily translated to an option in a configuration file:
[section]
param = value
Whitespace around =
is ignored in configuration files. This includes whitespace around equality signs in the parameter value:
It is the same as without whitespace:
log.level=startup=trace
Comments can be placed in the configuration file by placing one or more hash symbols #
at the beginning of a line. Comments that are placed in other places (i.e. not at the beginning of a line) are unsupported and should be avoided to ensure correct parsing of the startup options as intended.
Only command line options with a value should be set within the configuration file. Command line options which act as flags should only be entered on the command line when starting the server.
For each binary (except arangodb
, which is the Starter) there is a corresponding .conf
file that an ArangoDB package ships with. arangosh.conf
contains the default ArangoShell configuration for instance. The configuration files can be adjusted or new ones be created.
To load a particular configuration file, there is a ‑‑configuration
option available to let you specify a path to a .conf
file. If you want to completely ignore a configuration file (likely the default one) without necessarily deleting the file, then add the command line option
-c none
or
--configuration none
The value none is case-insensitive.
Suffixes for Numeric Options
It is possible to add suffixes to numeric options that will cause ArangoDB to multiply the value by a certain factor. This can be used to conveniently specify values in megabytes or gigabytes for example.
Suffix could be used like this in a configuration file:
[rocksdb]
write-buffer-size=512KiB
block-cache-size=512MiB
total-write-buffer-size=2GiB
max-bytes-for-level-multiplier=1K
[cache]
size=2G
Environment variables as parameters
If you want to use an environment variable in a value of a startup option, write the name of the variable wrapped in at signs @
. It acts as a placeholder. It can be combined with fixed strings for instance. For literal at signs in startup option arguments, escape them like @@
.
Command line example:
arangod --temp.path @TEMP@/arango_tmp
On a Windows system, above setting would typically make the ArangoDB Server create its folder for temporary files in %USERPROFILE%\AppData\Local\Temp
, i.e. C:\Users\xxx\AppData\Local\Temp\arango_tmp
.
Certain startup options accept multiple values. In case of parameters being vectors you can specify one or more times the option with varying values. Whether this is the case can be seen by looking at the Type column of a tool’s option table (e.g. ArangoDB Server Options) or the type information provided on a command line in the --help
output of an ArangoDB binary:
--log.level <string...> the global or topic-specific log level
Vectors can be identified by the three dots ...
at the end of the data type information (in angled brackets). For log.level
you can set one or more strings for different log levels for example. Simply repeat the option to do so. On a command line:
arangod --log.level warning --log.level queries=trace --log.level startup=info
This sets a log level of warning
for the general
topic (not globally!) and two topic-specific levels (trace
for queries and info
for startup).
The same in a configuration file:
[log]
level = warning
level = queries=trace
level = startup=info
Configuration precedence
There are built-in defaults, with which all configuration variables are first initialized. They can be overridden by configuration files and command line options (in this order). Only a fraction of all available options are set in the configuration files that ArangoDB ships with. Many options will therefore fall back to the built-in defaults unless they are overridden by the user.
It is common to use modified configuration files together with startup options on a command line to override specific settings. Command line options take precedence over values set in a configuration file.
If the same option is set multiple times, but only supports a single value, then the last occurrence of the option will become the final value. For example, if you edit arangosh.conf
to set:
server.database = myDB1
server.database = myDB2
… and start ArangoShell like:
arangosh --server.database myDB3 --server.database myDB4
… then the database it will connect to is myDB4
, because this startup option takes a single value only (i.e. it is not a vector), the built-in default is _system
but the configuration file overrules the setting. It gets set to myDB1
temporarily before it is replaced by myDB2
, which in turn gets overridden by the command line options twice, first to myDB3
and then the final value myDB4
.
Change configuration at runtime
In general, supplied startup options can not be changed nor can configuration files be reloaded once an executable is started, other than by restarting the executable with different options. However, some of the startup options define default values which can be overridden on a per-query basis for instance, or adjusted at runtime via an API call. Examples:
- via JavaScript API
To list the configuration options of a running arangod
instance, you can connect with an ArangoShell and invoke a by calling db._executeTransaction()
and providing a JavaScript function to retrieve the server options:
Show execution results
Hide execution results
{
"check-configuration" : false,
"config" : "/work/ArangoDB/etc/testing/arangod-single.conf",
"configuration" : "/work/ArangoDB/etc/testing/arangod-single.conf",
"console" : false,
"daemon" : false,
"default-language" : "en_US",
"define" : [
"TOP_DIR=/work/ArangoDB"
],
"dump-dependencies" : false,
"dump-options" : false,
"fortune" : false,
"gid" : "",
"hund" : false,
"log" : [
"info",
"info",
"replication=warn"
],
"pid-file" : "",
"supervisor" : false,
"uid" : "",
"version" : false,
"working-directory" : "/var/tmp",
"agency.activate" : false,
"agency.compaction-keep-size" : 50000,
"agency.compaction-step-size" : 1000,
"agency.disaster-recovery-id" : "",
"agency.election-timeout-max" : 5,
"agency.election-timeout-min" : 1,
"agency.endpoint" : [ ],
"agency.max-append-size" : 250,
"agency.my-address" : "",
"agency.pool-size" : 1,
"agency.size" : 1,
"agency.supervision" : false,
"agency.supervision-frequency" : 1,
"agency.supervision-grace-period" : 10,
"agency.supervision-ok-threshold" : 5,
"agency.wait-for-sync" : true,
"arangosearch.commit-threads" : 2,
"arangosearch.commit-threads-idle" : 2,
"arangosearch.consolidation-threads" : 2,
"arangosearch.consolidation-threads-idle" : 2,
"arangosearch.threads" : 0,
"arangosearch.threads-limit" : 0,
"audit.hostname" : "",
"audit.max-entry-length" : 134217728,
"audit.output" : [ ],
"backup.api-enabled" : "true",
"backup.local-path-prefix" : "/",
"cache.rebalancing-interval" : 2000000,
"cache.size" : 15268124672,
"cluster.agency-endpoint" : [ ],
"cluster.create-waits-for-sync-replication" : true,
"cluster.default-replication-factor" : 1,
"cluster.force-one-shard" : false,
"cluster.index-create-timeout" : 259200,
"cluster.max-number-of-shards" : 1000,
"cluster.max-replication-factor" : 10,
"cluster.min-replication-factor" : 1,
"cluster.my-advertised-endpoint" : "",
"cluster.my-role" : "",
"cluster.require-persisted-id" : false,
"cluster.resign-leadership-on-shutdown" : false,
"cluster.synchronous-replication-timeout-factor" : 1,
"cluster.synchronous-replication-timeout-minimum" : 30,
"cluster.synchronous-replication-timeout-per-4k" : 0.1,
"cluster.system-replication-factor" : 2,
"cluster.upgrade" : "auto",
"cluster.write-concern" : 1,
"database.auto-upgrade" : false,
"database.check-version" : false,
"database.directory" : "/tmp/arangosh_dLjMla/rocksdb-clusterOrNot/data",
"database.force-sync-properties" : false,
"database.ignore-datafile-errors" : false,
"database.init-database" : false,
"database.old-system-collections" : true,
"database.required-directory-state" : "any",
"database.restore-admin" : false,
"database.throw-collection-not-loaded-error" : false,
"database.upgrade-check" : true,
"database.wait-for-sync" : false,
"foxx.api" : true,
"foxx.force-update-on-startup" : true,
"foxx.queues" : true,
"foxx.queues-poll-interval" : 1,
"foxx.store" : true,
"frontend.proxy-request-check" : true,
"frontend.trusted-proxy" : [ ],
"frontend.version-check" : true,
"http.allow-method-override" : false,
"http.hide-product-header" : false,
"http.keep-alive-timeout" : 300,
"http.permanently-redirect-root" : true,
"http.trusted-origin" : [
"*"
],
"javascript.allow-admin-execute" : true,
"javascript.allow-external-process-control" : false,
"javascript.allow-port-testing" : false,
"javascript.app-path" : "/tmp/arangosh_dLjMla/rocksdb-clusterOrNot/apps",
"javascript.copy-installation" : false,
"javascript.enabled" : true,
"javascript.endpoints-blacklist" : [ ],
"javascript.endpoints-whitelist" : [ ],
"javascript.environment-variables-blacklist" : [ ],
"javascript.environment-variables-whitelist" : [ ],
"javascript.files-whitelist" : [ ],
"javascript.gc-frequency" : 60,
"javascript.gc-interval" : 2000,
"javascript.harden" : false,
"javascript.module-directory" : [
"/work/ArangoDB/enterprise/js"
],
"javascript.script" : [ ],
"javascript.script-parameter" : [ ],
"javascript.startup-directory" : "/work/ArangoDB/js",
"javascript.startup-options-blacklist" : [ ],
"javascript.startup-options-whitelist" : [ ],
"javascript.v8-contexts" : 16,
"javascript.v8-contexts-max-age" : 60,
"javascript.v8-contexts-max-invocations" : 0,
"javascript.v8-contexts-minimum" : 1,
"javascript.v8-max-heap" : 3072,
"javascript.v8-options" : [ ],
"ldap.allow-offline" : false,
"ldap.async-connect" : false,
"ldap.basedn" : "",
"ldap.binddn" : "",
"ldap.debug" : false,
"ldap.enabled" : false,
"ldap.network-timeout" : 0,
"ldap.port" : 389,
"ldap.prefix" : "",
"ldap.referrals" : false,
"ldap.refresh-rate" : 300,
"ldap.responsible-for" : "",
"ldap.restart" : false,
"ldap.retries" : 1,
"ldap.roles-attribute-name" : "",
"ldap.roles-exclude" : "",
"ldap.roles-include" : "",
"ldap.roles-search" : "",
"ldap.roles-transformation" : [ ],
"ldap.search-attribute" : "uid",
"ldap.search-filter" : "objectClass=*",
"ldap.search-scope" : "sub",
"ldap.serialize-timeout" : 5,
"ldap.serialized" : false,
"ldap.server" : "",
"ldap.suffix" : "",
"ldap.superuser-role" : "",
"ldap.timeout" : 0,
"ldap.tls" : false,
"ldap.tls-cacert-dir" : "",
"ldap.tls-cacert-file" : "",
"ldap.tls-cert-check-strategy" : "hard",
"ldap.tls-version" : "1.2",
"ldap.url" : "",
"ldap2.allow-offline" : false,
"ldap2.async-connect" : false,
"ldap2.basedn" : "",
"ldap2.binddn" : "",
"ldap2.debug" : false,
"ldap2.enabled" : false,
"ldap2.network-timeout" : 0,
"ldap2.port" : 389,
"ldap2.prefix" : "",
"ldap2.referrals" : false,
"ldap2.refresh-rate" : 300,
"ldap2.responsible-for" : "",
"ldap2.restart" : false,
"ldap2.retries" : 1,
"ldap2.roles-attribute-name" : "",
"ldap2.roles-exclude" : "",
"ldap2.roles-include" : "",
"ldap2.roles-search" : "",
"ldap2.roles-transformation" : [ ],
"ldap2.search-attribute" : "uid",
"ldap2.search-filter" : "objectClass=*",
"ldap2.search-scope" : "sub",
"ldap2.serialize-timeout" : 5,
"ldap2.serialized" : false,
"ldap2.server" : "",
"ldap2.suffix" : "",
"ldap2.superuser-role" : "",
"ldap2.timeout" : 0,
"ldap2.tls" : false,
"ldap2.tls-cacert-dir" : "",
"ldap2.tls-cacert-file" : "",
"ldap2.tls-cert-check-strategy" : "hard",
"ldap2.tls-version" : "1.2",
"ldap2.url" : "",
"log.api-enabled" : "true",
"log.color" : true,
"log.escape" : true,
"log.file" : "/tmp/arangosh_dLjMla/rocksdb-clusterOrNot/log",
"log.file-group" : "",
"log.file-mode" : "",
"log.force-direct" : false,
"log.foreground-tty" : false,
"log.ids" : true,
"log.in-memory-level" : "info",
"log.keep-logrotate" : false,
"log.level" : [
"info",
"info",
"replication=warn"
],
"log.line-number" : false,
"log.max-entry-length" : 134217728,
"log.output" : [
"file:///tmp/arangosh_dLjMla/rocksdb-clusterOrNot/log"
],
"log.performance" : false,
"log.prefix" : "",
"log.request-parameters" : true,
"log.shorten-filenames" : true,
"log.thread" : false,
"log.thread-name" : false,
"log.time-format" : "utc-datestring",
"log.use-local-time" : false,
"log.use-microtime" : false,
"network.idle-connection-ttl" : 60000,
"network.io-threads" : 1,
"network.max-open-connections" : 1024,
"network.protocol" : "",
"network.verify-hosts" : false,
"nonce.size" : 4194304,
"query.cache-entries" : 128,
"query.cache-entries-max-size" : 268435456,
"query.cache-entry-max-size" : 16777216,
"query.cache-include-system-collections" : false,
"query.cache-mode" : "off",
"query.max-parallelism" : 4,
"query.max-runtime" : 0,
"query.memory-limit" : 0,
"query.optimizer-max-plans" : 128,
"query.optimizer-rules" : [ ],
"query.parallelize-gather-writes" : true,
"query.parallelize-traversals" : true,
"query.registry-ttl" : 30,
"query.require-with" : false,
"query.slow-streaming-threshold" : 10,
"query.slow-threshold" : 10,
"query.smart-joins" : true,
"query.tracking" : true,
"query.tracking-slow-queries" : true,
"query.tracking-with-bindvars" : true,
"query.tracking-with-datasources" : false,
"query.tracking-with-querystring" : true,
"random.generator" : 1,
"rclone.executable" : "rclone-arangodb",
"replication.active-failover" : false,
"replication.auto-start" : true,
"replication.automatic-failover" : false,
"replication.connect-timeout" : 10,
"replication.max-parallel-tailing-invocations" : 0,
"replication.quick-keys-limit" : 1000000,
"replication.request-timeout" : 600,
"replication.sync-by-revision" : true,
"rocksdb.allow-fallocate" : true,
"rocksdb.block-align-data-blocks" : false,
"rocksdb.block-cache-shard-bits" : -1,
"rocksdb.block-cache-size" : 18321749606,
"rocksdb.cache-index-and-filter-blocks" : false,
"rocksdb.cache-index-and-filter-blocks-with-high-priority" : true,
"rocksdb.compaction-read-ahead-size" : 2097152,
"rocksdb.create-sha-files" : true,
"rocksdb.debug-logging" : false,
"rocksdb.delayed-write-rate" : 0,
"rocksdb.dynamic-level-bytes" : true,
"rocksdb.edge-cache" : true,
"rocksdb.enable-pipelined-write" : false,
"rocksdb.enable-statistics" : false,
"rocksdb.encryption-gen-internal-key" : false,
"rocksdb.encryption-key-generator" : "",
"rocksdb.encryption-key-rotation" : false,
"rocksdb.encryption-keyfile" : "",
"rocksdb.encryption-keyfolder" : "",
"rocksdb.enforce-block-cache-size-limit" : false,
"rocksdb.exclusive-writes" : false,
"rocksdb.intermediate-commit-count" : 1000000,
"rocksdb.intermediate-commit-size" : 536870912,
"rocksdb.level0-compaction-trigger" : 2,
"rocksdb.level0-slowdown-trigger" : 20,
"rocksdb.level0-stop-trigger" : 36,
"rocksdb.limit-open-files-at-startup" : false,
"rocksdb.max-background-jobs" : 8,
"rocksdb.max-bytes-for-level-base" : 268435456,
"rocksdb.max-bytes-for-level-multiplier" : 10,
"rocksdb.max-parallel-compactions" : 2,
"rocksdb.max-subcompactions" : 0,
"rocksdb.max-total-wal-size" : 83886080,
"rocksdb.max-transaction-size" : 18446744073709552000,
"rocksdb.max-write-buffer-number" : 9,
"rocksdb.max-write-buffer-size-to-maintain" : 0,
"rocksdb.min-write-buffer-number-to-merge" : 1,
"rocksdb.num-levels" : 7,
"rocksdb.num-threads-priority-high" : 4,
"rocksdb.num-threads-priority-low" : 4,
"rocksdb.num-uncompressed-levels" : 2,
"rocksdb.optimize-filters-for-hits" : false,
"rocksdb.pin-l0-filter-and-index-blocks-in-cache" : false,
"rocksdb.pin-top-level-index-and-filter" : true,
"rocksdb.recycle-log-file-num" : false,
"rocksdb.sync-delay-threshold" : 5000,
"rocksdb.sync-interval" : 100,
"rocksdb.table-block-size" : 16384,
"rocksdb.target-file-size-base" : 67108864,
"rocksdb.target-file-size-multiplier" : 1,
"rocksdb.throttle" : true,
"rocksdb.total-write-buffer-size" : 24428999475,
"rocksdb.transaction-lock-timeout" : 1000,
"rocksdb.use-direct-io-for-flush-and-compaction" : false,
"rocksdb.use-direct-reads" : false,
"rocksdb.use-file-logging" : false,
"rocksdb.use-fsync" : false,
"rocksdb.wal-archive-size-limit" : 0,
"rocksdb.wal-directory" : "",
"rocksdb.wal-file-timeout" : 10,
"rocksdb.wal-file-timeout-initial" : 180,
"rocksdb.wal-recovery-skip-corrupted" : false,
"rocksdb.write-buffer-size" : 67108864,
"server.allow-use-database" : true,
"server.authentication" : false,
"server.authentication-system-only" : true,
"server.authentication-timeout" : 0,
"server.authentication-unix-sockets" : true,
"server.descriptors-minimum" : 0,
"server.endpoint" : [
"tcp://127.0.0.1:14788"
],
"server.export-metrics-api" : true,
"server.export-read-write-metrics" : false,
"server.flush-interval" : 1000000,
"server.gid" : "",
"server.harden" : false,
"server.io-threads" : 4,
"server.local-authentication" : true,
"server.maintenance-actions-block" : 2,
"server.maintenance-actions-linger" : 3600,
"server.maintenance-threads" : 5,
"server.maximal-queue-size" : 4096,
"server.maximal-threads" : 64,
"server.minimal-threads" : 2,
"server.prio1-size" : 4096,
"server.rest-server" : true,
"server.scheduler-queue-size" : 4096,
"server.statistics" : true,
"server.statistics-all-databases" : true,
"server.statistics-history" : true,
"server.storage-engine" : "rocksdb",
"server.uid" : "",
"server.unavailability-queue-fill-grade" : 1,
"server.validate-utf8-strings" : true,
"ssl.cafile" : "",
"ssl.cipher-list" : "HIGH:!EXPORT:!aNULL@STRENGTH",
"ssl.ecdh-curve" : "prime256v1",
"ssl.keyfile" : "/work/ArangoDB/UnitTests/server.pem",
"ssl.options" : 2147485780,
"ssl.prefer-http1-in-alpn" : false,
"ssl.protocol" : 9,
"ssl.require-peer-certificate" : false,
"ssl.server-name-indication" : [ ],
"ssl.session-cache" : false,
"tcp.backlog-size" : 64,
"tcp.reuse-address" : true,
"temp.path" : "/tmp/arangosh_dLjMla/rocksdb-clusterOrNot/tmp",
"transaction.streaming-lock-timeout" : 8,
"ttl.frequency" : 30000,
"ttl.max-collection-removes" : 1000000,
"ttl.max-total-removes" : 1000000,
"ttl.only-loaded-collection" : true