Configuration

The programs and tools shipped in anArangoDB package can be configured with various startup options.

arangosh —server.database myDB

server.database = myDB

  • There are also flags which are for command line usage only,such as ‑‑help and ‑‑version. They don’t take any valuein contrast to options.

Find the available options and flags in the Options sub-chapters of therespective Programs & Tools sub-chapter, like theArangoDB Server Options.

The ArangoDB Starter works differentlyto the other programs and tools. It uses setup.json files for its ownconfigurationand has a fluent command line interface to execute certain actions.If you deploy ArangoDB with the Starter, then custom arangod.conf filesare 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 twodashes (also known as hyphen minus), the name of the option, a space asseparator and the value. You may also use an equals sign = as separatorlike ‑‑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 ashortcut 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 betweenany of the named arguments. For arangod it is the ‑‑database.directoryoption. The following commands are identical:

  1. arangod my_data_dir
  2. arangod "my_data_dir"
  3. arangod --database.directory my_data_dir
  4. arangod --database.directory=my_data_dir
  5. arangod --database.directory "my_data_dir"
  6. arangod --database.directory="my_data_dir"

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 global options.

To list available options, you can run a binary with the ‑‑help flag:

  1. 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:

  1. key = value

It may look like this:

  1. server.endpoint = tcp://127.0.0.1:8529
  2. server.authentication = true

Alternatively, a header section can be specified and options pertaining tothat section can be specified in a shorter form:

  1. [server]
  2. endpoint = tcp://127.0.0.1:8529
  3. authentication = true

So you see, a command line option ‑‑section.param value can be easilytranslated to an option in a configuration file:

  1. [section]
  2. param = value

Whitespace around = is ignored in configuration files.This includes whitespace around equality signs in the parameter value:

  1. log.level = startup = trace

It is the same as without whitespace:

  1. log.level=startup=trace

Comments can be placed in the configuration file by placing one or morehash symbols # at the beginning of a line. Comments that are placed inother 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 configurationfile. Command line options which act as flags should only be entered on thecommand line when starting the server.

Using Configuration Files

For each binary (except arangodb, which is the Starter) there is acorresponding .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 optionavailable to let you specify a path to a .conf file. If you want tocompletely ignore a configuration file (likely the default one) withoutnecessarily deleting the file, then add the command line option

  1. -c none

or

  1. --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 tomultiply the value by a certain factor. This can be used to conveniently specifyvalues in megabytes or gigabytes for example.

SuffixFactorExample
kib, KiB1024512KiB
mib, MiB1024 ^ 264mib
gib, GiB1024 ^ 33gib
k, K, kb, KB10003k
m, M, mb, MB1000 ^ 23mb
g, G, gb, GB1000 ^ 33GB
%0.015%

Suffix could be used like this in a configuration file:

  1. [rocksdb]
  2. write-buffer-size=512KiB
  3. block-cache-size=512MiB
  4. total-write-buffer-size=2GiB
  5. max-bytes-for-level-multiplier=1K
  6. [cache]
  7. 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 aplaceholder. It can be combined with fixed strings for instance.

Command line example:

  1. arangod --temp.path @TEMP@/arango_tmp

In a configuration file:

  1. [temp]
  2. path = @TEMP@/arango_tmp

On a Windows system, above setting would typically make the ArangoDB Servercreate its folder for temporary files in %USERPROFILE%\AppData\Local\Temp,i.e. C:\Users\xxx\AppData\Local\Temp\arango_tmp.

Options with multiple values

Certain startup options accept multiple values. In case of parameters beingvectors 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 atool’s option table (e.g. ArangoDB Server Options)or the type information provided on a command line in the —help output ofan ArangoDB binary:

  1. --log.level <string...> the global or topic-specific log level

Vectors can be identified by the three dots at the end of the data typeinformation (in angled brackets). For log.level you can set one or morestrings for different log levels for example. Simply repeat the option todo so. On a command line:

  1. arangod --log.level warning --log.level queries=trace --log.level startup=info

This sets a global log level of warning and two topic-specific levels(trace for queries and info for startup). The same in a configuration file:

  1. [log]
  2. level = warning
  3. level = queries=trace
  4. level = startup=info

Configuration precedence

There are built-in defaults, with which all configuration variables are firstinitialized. They can be overridden by configuration files and command lineoptions (in this order). Only a fraction of all available options are set inthe configuration files that ArangoDB ships with. Many options will thereforefall back to the built-in defaults unless they are overridden by the user.

It is common to use modified configuration files together with startupoptions on a command line to override specific settings. Command line optionstake 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:

  1. server.database = myDB1
  2. server.database = myDB2

… and start ArangoShell like:

  1. arangosh --server.database myDB3 --server.database myDB4

… then the database it will connect to is myDB4, because this startup optiontakes a single value only (i.e. it is not a vector), the built-in defaultis _system but the configuration file overrules the setting. It gets set tomyDB1 temporarily before it is replaced by myDB2, which in turn getsoverridden by the command line options twice, first to myDB3 and then thefinal value myDB4.

Change configuration at runtime

In general, supplied startup options can not be changed nor can configurationfiles be reloaded once an executable is started, other than by restarting theexecutable with different options. However, some of the startup optionsdefine default values which can be overridden on a per-query basis forinstance, or adjusted at runtime via an API call. Examples:

Fetch Current Configuration Options

To list the configuration options of a running arangod instance, you canconnect with an ArangoShell and invoke aTransaction by calling db._executeTransaction()and providing a JavaScript function to retrieve the server options:

  1. arangosh> db._executeTransaction({ collections: {}, action: function() {return require("internal").options(); } })

Show execution results

Hide execution results

  1. {
  2. "check-configuration" : false,
  3. "config" : "/work/ArangoDB/etc/testing/arangod-single.conf",
  4. "configuration" : "/work/ArangoDB/etc/testing/arangod-single.conf",
  5. "console" : false,
  6. "daemon" : false,
  7. "default-language" : "en_US",
  8. "define" : [
  9. "TOP_DIR=/work/ArangoDB"
  10. ],
  11. "dump-dependencies" : false,
  12. "dump-options" : false,
  13. "fortune" : false,
  14. "gid" : "",
  15. "hund" : false,
  16. "log" : [
  17. "info",
  18. "info",
  19. "replication=warn"
  20. ],
  21. "pid-file" : "",
  22. "supervisor" : false,
  23. "uid" : "",
  24. "version" : false,
  25. "working-directory" : "/var/tmp",
  26. "agency.activate" : false,
  27. "agency.compaction-keep-size" : 50000,
  28. "agency.compaction-step-size" : 1000,
  29. "agency.disaster-recovery-id" : "",
  30. "agency.election-timeout-max" : 5,
  31. "agency.election-timeout-min" : 1,
  32. "agency.endpoint" : [ ],
  33. "agency.max-append-size" : 250,
  34. "agency.my-address" : "",
  35. "agency.pool-size" : 1,
  36. "agency.size" : 1,
  37. "agency.supervision" : false,
  38. "agency.supervision-frequency" : 1,
  39. "agency.supervision-grace-period" : 10,
  40. "agency.wait-for-sync" : true,
  41. "arangosearch.threads" : 0,
  42. "arangosearch.threads-limit" : 0,
  43. "audit.hostname" : "",
  44. "audit.output" : [ ],
  45. "backup.api-enabled" : "true",
  46. "backup.local-path-prefix" : "/",
  47. "cache.rebalancing-interval" : 2000000,
  48. "cache.size" : 16341597184,
  49. "cluster.agency-endpoint" : [ ],
  50. "cluster.agency-prefix" : "",
  51. "cluster.create-waits-for-sync-replication" : false,
  52. "cluster.default-replication-factor" : 1,
  53. "cluster.force-one-shard" : false,
  54. "cluster.index-create-timeout" : 3600,
  55. "cluster.max-number-of-shards" : 1000,
  56. "cluster.max-replication-factor" : 10,
  57. "cluster.min-replication-factor" : 1,
  58. "cluster.my-address" : "",
  59. "cluster.my-advertised-endpoint" : "",
  60. "cluster.my-role" : "",
  61. "cluster.require-persisted-id" : false,
  62. "cluster.resign-leadership-on-shutdown" : false,
  63. "cluster.synchronous-replication-timeout-factor" : 1,
  64. "cluster.synchronous-replication-timeout-minimum" : 30,
  65. "cluster.synchronous-replication-timeout-per-4k" : 0.1,
  66. "cluster.system-replication-factor" : 2,
  67. "cluster.upgrade" : "auto",
  68. "cluster.write-concern" : 1,
  69. "compaction.db-sleep-time" : 1,
  70. "compaction.dead-documents-threshold" : 16384,
  71. "compaction.dead-size-percent-threshold" : 0.1,
  72. "compaction.dead-size-threshold" : 131072,
  73. "compaction.max-file-size-factor" : 3,
  74. "compaction.max-files" : 3,
  75. "compaction.max-result-file-size" : 134217728,
  76. "compaction.min-interval" : 10,
  77. "compaction.min-small-data-file-size" : 131072,
  78. "database.auto-upgrade" : false,
  79. "database.check-version" : false,
  80. "database.directory" : "/tmp/arangosh_oLGAal/rocksdb-clusterOrNot/data",
  81. "database.force-sync-properties" : false,
  82. "database.ignore-datafile-errors" : false,
  83. "database.init-database" : false,
  84. "database.maximal-journal-size" : 1048576,
  85. "database.required-directory-state" : "any",
  86. "database.restore-admin" : false,
  87. "database.throw-collection-not-loaded-error" : false,
  88. "database.upgrade-check" : true,
  89. "database.wait-for-sync" : false,
  90. "foxx.api" : true,
  91. "foxx.queues" : true,
  92. "foxx.queues-poll-interval" : 1,
  93. "foxx.store" : true,
  94. "frontend.proxy-request-check" : true,
  95. "frontend.trusted-proxy" : [ ],
  96. "frontend.version-check" : true,
  97. "http.allow-method-override" : false,
  98. "http.hide-product-header" : false,
  99. "http.keep-alive-timeout" : 300,
  100. "http.trusted-origin" : [
  101. "*"
  102. ],
  103. "javascript.allow-admin-execute" : true,
  104. "javascript.allow-external-process-control" : false,
  105. "javascript.allow-port-testing" : false,
  106. "javascript.app-path" : "/tmp/arangosh_oLGAal/rocksdb-clusterOrNot/apps",
  107. "javascript.copy-installation" : false,
  108. "javascript.enabled" : true,
  109. "javascript.endpoints-blacklist" : [ ],
  110. "javascript.endpoints-whitelist" : [ ],
  111. "javascript.environment-variables-blacklist" : [ ],
  112. "javascript.environment-variables-whitelist" : [ ],
  113. "javascript.files-whitelist" : [ ],
  114. "javascript.gc-frequency" : 60,
  115. "javascript.gc-interval" : 2000,
  116. "javascript.harden" : false,
  117. "javascript.module-directory" : [
  118. "/work/ArangoDB/enterprise/js"
  119. ],
  120. "javascript.script" : [ ],
  121. "javascript.script-parameter" : [ ],
  122. "javascript.startup-directory" : "/work/ArangoDB/js",
  123. "javascript.startup-options-blacklist" : [ ],
  124. "javascript.startup-options-whitelist" : [ ],
  125. "javascript.v8-contexts" : 16,
  126. "javascript.v8-contexts-max-age" : 60,
  127. "javascript.v8-contexts-max-invocations" : 0,
  128. "javascript.v8-contexts-minimum" : 1,
  129. "javascript.v8-max-heap" : 3072,
  130. "javascript.v8-options" : [ ],
  131. "ldap.async-connect" : false,
  132. "ldap.basedn" : "",
  133. "ldap.binddn" : "",
  134. "ldap.debug" : false,
  135. "ldap.enabled" : false,
  136. "ldap.network-timeout" : 0,
  137. "ldap.port" : 389,
  138. "ldap.prefix" : "",
  139. "ldap.referrals" : false,
  140. "ldap.refresh-rate" : 300,
  141. "ldap.restart" : false,
  142. "ldap.retries" : 1,
  143. "ldap.roles-attribute-name" : "",
  144. "ldap.roles-exclude" : "",
  145. "ldap.roles-include" : "",
  146. "ldap.roles-search" : "",
  147. "ldap.roles-transformation" : [ ],
  148. "ldap.search-attribute" : "uid",
  149. "ldap.search-filter" : "objectClass=*",
  150. "ldap.search-scope" : "sub",
  151. "ldap.serialize-timeout" : 5,
  152. "ldap.serialized" : false,
  153. "ldap.server" : "",
  154. "ldap.suffix" : "",
  155. "ldap.superuser-role" : "",
  156. "ldap.timeout" : 0,
  157. "ldap.tls" : false,
  158. "ldap.tls-cacert-dir" : "",
  159. "ldap.tls-cacert-file" : "",
  160. "ldap.tls-cert-check-strategy" : "hard",
  161. "ldap.tls-version" : "1.2",
  162. "ldap.url" : "",
  163. "log.color" : true,
  164. "log.escape" : true,
  165. "log.file" : "/tmp/arangosh_oLGAal/rocksdb-clusterOrNot/log",
  166. "log.file-group" : "",
  167. "log.file-mode" : "",
  168. "log.force-direct" : false,
  169. "log.foreground-tty" : false,
  170. "log.ids" : true,
  171. "log.keep-logrotate" : false,
  172. "log.level" : [
  173. "info",
  174. "info",
  175. "replication=warn"
  176. ],
  177. "log.line-number" : false,
  178. "log.output" : [
  179. "file:///tmp/arangosh_oLGAal/rocksdb-clusterOrNot/log"
  180. ],
  181. "log.performance" : false,
  182. "log.prefix" : "",
  183. "log.request-parameters" : true,
  184. "log.role" : true,
  185. "log.shorten-filenames" : true,
  186. "log.thread" : false,
  187. "log.thread-name" : false,
  188. "log.time-format" : "utc-datestring",
  189. "log.use-local-time" : false,
  190. "log.use-microtime" : false,
  191. "network.idle-connection-ttl" : 60000,
  192. "network.io-threads" : 1,
  193. "network.max-open-connections" : 1024,
  194. "network.verify-hosts" : false,
  195. "nonce.size" : 4194304,
  196. "query.cache-entries" : 128,
  197. "query.cache-entries-max-size" : 268435456,
  198. "query.cache-entry-max-size" : 16777216,
  199. "query.cache-include-system-collections" : false,
  200. "query.cache-mode" : "off",
  201. "query.fail-on-warning" : false,
  202. "query.memory-limit" : 0,
  203. "query.optimizer-max-plans" : 128,
  204. "query.optimizer-rules" : [ ],
  205. "query.parallelize-gather-writes" : true,
  206. "query.registry-ttl" : 30,
  207. "query.slow-streaming-threshold" : 10,
  208. "query.slow-threshold" : 10,
  209. "query.smart-joins" : true,
  210. "query.tracking" : true,
  211. "query.tracking-with-bindvars" : true,
  212. "random.generator" : 1,
  213. "rclone.executable" : "rclone-arangodb",
  214. "replication.active-failover" : false,
  215. "replication.auto-start" : true,
  216. "replication.automatic-failover" : false,
  217. "replication.connect-timeout" : 10,
  218. "replication.max-parallel-tailing-invocations" : 0,
  219. "replication.request-timeout" : 600,
  220. "rocksdb.allow-fallocate" : true,
  221. "rocksdb.block-align-data-blocks" : false,
  222. "rocksdb.block-cache-shard-bits" : -1,
  223. "rocksdb.block-cache-size" : 19609916620,
  224. "rocksdb.compaction-read-ahead-size" : 2097152,
  225. "rocksdb.create-sha-files" : true,
  226. "rocksdb.debug-logging" : false,
  227. "rocksdb.delayed-write-rate" : 0,
  228. "rocksdb.dynamic-level-bytes" : true,
  229. "rocksdb.enable-pipelined-write" : false,
  230. "rocksdb.enable-statistics" : false,
  231. "rocksdb.encryption-key-generator" : "",
  232. "rocksdb.encryption-keyfile" : "",
  233. "rocksdb.enforce-block-cache-size-limit" : false,
  234. "rocksdb.exclusive-writes" : false,
  235. "rocksdb.intermediate-commit-count" : 1000000,
  236. "rocksdb.intermediate-commit-size" : 536870912,
  237. "rocksdb.level0-compaction-trigger" : 2,
  238. "rocksdb.level0-slowdown-trigger" : 20,
  239. "rocksdb.level0-stop-trigger" : 36,
  240. "rocksdb.limit-open-files-at-startup" : false,
  241. "rocksdb.max-background-jobs" : 8,
  242. "rocksdb.max-bytes-for-level-base" : 268435456,
  243. "rocksdb.max-bytes-for-level-multiplier" : 10,
  244. "rocksdb.max-subcompactions" : 0,
  245. "rocksdb.max-total-wal-size" : 83886080,
  246. "rocksdb.max-transaction-size" : 18446744073709552000,
  247. "rocksdb.max-write-buffer-number" : 9,
  248. "rocksdb.min-write-buffer-number-to-merge" : 1,
  249. "rocksdb.num-levels" : 7,
  250. "rocksdb.num-threads-priority-high" : 4,
  251. "rocksdb.num-threads-priority-low" : 4,
  252. "rocksdb.num-uncompressed-levels" : 2,
  253. "rocksdb.optimize-filters-for-hits" : false,
  254. "rocksdb.recycle-log-file-num" : false,
  255. "rocksdb.sync-interval" : 100,
  256. "rocksdb.table-block-size" : 16384,
  257. "rocksdb.throttle" : true,
  258. "rocksdb.total-write-buffer-size" : 26146555494,
  259. "rocksdb.transaction-lock-timeout" : 1000,
  260. "rocksdb.use-direct-io-for-flush-and-compaction" : false,
  261. "rocksdb.use-direct-reads" : false,
  262. "rocksdb.use-file-logging" : false,
  263. "rocksdb.use-fsync" : false,
  264. "rocksdb.wal-archive-size-limit" : 0,
  265. "rocksdb.wal-directory" : "",
  266. "rocksdb.wal-file-timeout" : 10,
  267. "rocksdb.wal-file-timeout-initial" : 180,
  268. "rocksdb.wal-recovery-skip-corrupted" : false,
  269. "rocksdb.write-buffer-size" : 67108864,
  270. "server.allow-use-database" : true,
  271. "server.authentication" : false,
  272. "server.authentication-system-only" : true,
  273. "server.authentication-timeout" : 0,
  274. "server.authentication-unix-sockets" : true,
  275. "server.check-max-memory-mappings" : true,
  276. "server.descriptors-minimum" : 0,
  277. "server.endpoint" : [
  278. "tcp://127.0.0.1:3492"
  279. ],
  280. "server.export-metrics-api" : true,
  281. "server.flush-interval" : 1000000,
  282. "server.gid" : "",
  283. "server.harden" : false,
  284. "server.io-threads" : 8,
  285. "server.local-authentication" : true,
  286. "server.maintenance-actions-block" : 2,
  287. "server.maintenance-actions-linger" : 3600,
  288. "server.maintenance-threads" : 9,
  289. "server.maximal-queue-size" : 4096,
  290. "server.maximal-threads" : 64,
  291. "server.minimal-threads" : 2,
  292. "server.prio1-size" : 4096,
  293. "server.rest-server" : true,
  294. "server.scheduler-queue-size" : 4096,
  295. "server.statistics" : true,
  296. "server.statistics-history" : true,
  297. "server.storage-engine" : "rocksdb",
  298. "server.uid" : "",
  299. "ssl.cafile" : "",
  300. "ssl.cipher-list" : "HIGH:!EXPORT:!aNULL@STRENGTH",
  301. "ssl.ecdh-curve" : "prime256v1",
  302. "ssl.keyfile" : "/work/ArangoDB/UnitTests/server.pem",
  303. "ssl.options" : 2147485780,
  304. "ssl.protocol" : 9,
  305. "ssl.require-peer-certificate" : false,
  306. "ssl.session-cache" : false,
  307. "tcp.backlog-size" : 64,
  308. "tcp.reuse-address" : true,
  309. "temp.path" : "/tmp/arangosh_oLGAal/rocksdb-clusterOrNot/tmp",
  310. "ttl.frequency" : 30000,
  311. "ttl.max-collection-removes" : 1000000,
  312. "ttl.max-total-removes" : 1000000,
  313. "ttl.only-loaded-collection" : true,
  314. "wal.allow-oversize-entries" : true,
  315. "wal.directory" : "",
  316. "wal.flush-timeout" : 30000,
  317. "wal.historic-logfiles" : 10,
  318. "wal.ignore-logfile-errors" : false,
  319. "wal.ignore-recovery-errors" : false,
  320. "wal.logfile-size" : 33554432,
  321. "wal.open-logfiles" : 0,
  322. "wal.reserve-logfiles" : 3,
  323. "wal.slots" : 1048576,
  324. "wal.sync-interval" : 100000,
  325. "wal.throttle-wait" : 15000,
  326. "wal.throttle-when-pending" : 0,
  327. "wal.use-mlock" : false
  328. }