Skip to main content
Version: 2.0.1

Configuration

The main Memgraph configuration file is available in /etc/memgraph/memgraph.conf. You can modify that file to suit your specific needs. Additional configuration can be specified by including another configuration file, in a file pointed to by the MEMGRAPH_CONFIG environment variable or by passing arguments on the command line.

Each configuration setting is in the form: --setting-name=value.

Bolt

FlagDescriptionType
--bolt-address=0.0.0.0IP address on which the Bolt server should listen.[string]
--bolt-cert-file=Certificate file which should be used for the Bolt server.[string]
--bolt-key-file=Key file which should be used for the Bolt server.[string]
--bolt-num-workers=Number of workers used by the Bolt server.
By default, this will be the number of processing units available on the machine.
[int32]
--bolt-port=7687Port on which the Bolt server should listen.[int32]
--bolt-server-name-for-init=Server name which the database should send to the client in the Bolt INIT message.[string]
--bolt-session-inactivity-timeout=1800Time in seconds after which inactive Bolt sessions will be closed.[int32]

Query

FlagDescriptionType
--query-cost-planner=trueUse the cost-estimating query planner.[bool]
--query-execution-timeout-sec=180Maximum allowed query execution time.
Queries exceeding this limit will be aborted. Value of 0 means no limit.
[uint64]
--query-max-plans=1000Maximum number of generated plans for a query.[uint64]
--query-modules-directory=/usr/lib/memgraph/query-modulesDirectory where modules with custom query procedures are stored. NOTE: Multiple comma-separated directories can be defined.[string]
--query-plan-cache-ttl=60Time to live for cached query plans, in seconds.[int32]
--query-vertex-count-to-expand-existing=10Maximum count of indexed vertices which provoke indexed lookup and then expand to existing,
instead of a regular expand. Default is 10, to turn off use -1.
[int64]

Storage

FlagDescriptionType
--storage-gc-cycle-sec=30Storage garbage collector interval (in seconds).[uint64]
--storage-properties-on-edges=trueControls whether edges have properties.[bool]
--storage-recover-on-startup=trueControls whether the storage recovers persisted data on startup.[bool]
--storage-snapshot-interval-sec=300Storage snapshot creation interval (in seconds). Set to 0 to disable periodic snapshot creation.[uint64]
--storage-snapshot-on-exit=trueControls whether the storage creates another snapshot on exit.[bool]
--storage-snapshot-retention-count=3The number of snapshots that should always be kept.[uint64]
--storage-wal-enabled=trueControls whether the storage uses write-ahead-logging. To enable WAL periodic snapshots must be enabled.[bool]
--storage-wal-file-flush-every-n-tx=100000Issue a 'fsync' call after this amount of transactions are written to the WAL file. Set to 1 for fully synchronous operation.[uint64]
--storage-wal-file-size-kib=20480Minimum file size of each WAL file.[uint64]

Other

FlagDescriptionType
--allow-load-csvControls whether LOAD CSV clause is allowed in queries[bool]
--also-log-to-stderr=falselog messages go to stderr in addition to logfiles[bool]
--data-directory=/var/lib/memgraphPath to directory in which to save all permanent data.[string]
--isolation-levelDefault isolation level used for the transactions. Allowed values: SNAPSHOT_ISOLATION, READ_COMMITTED, READ_UNCOMMITTED[string]
--kafka-bootstrap-servers=List of Kafka brokers as a comma separated list of broker host or host:port.[string]
--log-file=/var/log/memgraph/memgraph.logPath to where the log should be stored.[string]
--log-levelMinimum log level. Allowed values: TRACE, DEBUG, INFO, WARNING, ERROR, CRITICAL[string]
--memory-limit=0Total memory limit in MiB. Set to 0 to use the default values which are 100% of the physical memory if the swap is enabled and 90% of the physical memory otherwise.[uint64]
--memory-warning-threshold=1024Memory warning threshold, in MB. If Memgraph detects there is less available RAM it will log a warning.
Set to 0 to disable.
[uint64]
--telemetry-enabled=trueSet to true to enable telemetry. We collect information about the running system (CPU and memory information), information about the database runtime (vertex and edge counts and resource usage), and aggregated statistics about some features of the database (e.g. how many times a feature is used) to allow for an easier improvement of the product.[bool]

Additional configuration inclusion

You can include additional configuration files from this file. Additional files are processed after this file. Settings that are set in the additional files will override previously set values. Additional configuration files are specified with the --flag-file flag.

Example:

--flag-file=another.conf