Configuration Options
Location of config options
Configuration options for APOC can be set using:
Option | Description |
---|---|
Environment variables |
Set via either |
|
Located in the same folder as |
The order of the above table matches the config option precedence.
For example, any environment variable setting will override options set in apoc.conf
.
The Additionally, as of Neo4j v.5, APOC config settings are no longer supported in the It is also possible to set the config settings using environment variables. |
Reference of config options
-
apoc.export.file.enabled: Enables writing local files to disk.
-
apoc.import.file.enabled: Enables reading local files from disk.
-
apoc.import.file_use_neo4j_config: Uses Neo4j configuration settings when reading local files from disk.
-
apoc.http.timeout.connect: Sets an timeout for outbound HTTP connection establishment.
-
apoc.http.timeout.read: Set a timeout for outbound HTTP reads.
-
apoc.jobs.scheduled.num_threads: Scheduled execution thread pool size.
-
apoc.jobs.pool.num_threads: Background execution thread pool size.
-
apoc.jobs.queue.size: Background execution job queue size.
-
apoc.spatial.geocode.provider: Configuration for geocoding providers.
-
apoc.trigger.enabled: Enables the procedures in the apoc.trigger package.
-
apoc.trigger.refresh: Triggers refresh rate.
-
apoc.max.decompression.ratio: Limits the relative size a decompressed file can reach with respect to the compressed file in the loading procedures.
Description |
Enables writing local files to disk. |
Valid values |
|
Default value |
|
Description |
Enables reading local files from disk. |
Valid values |
|
Default value |
|
Description |
If enabled, this setting controls whether file system access is allowed and possibly constrained to a specific directory by reading the two configuration parameters dbms.security.allow_csv_import_from_file_urls and server.directories.import respectively. |
Valid values |
|
Default value |
|
Description |
Sets a specified timeout value, in milliseconds, to be used when communicating with a URI. If the timeout expires before the connection can be established, then an exception is raised. A timeout of zero is interpreted as an infinite timeout. |
Valid values |
|
Default value |
|
Description |
Sets a specified timeout value, in milliseconds, to be used when communicating with a URI. If the timeout expires before the data is available to be read, then an exception is raised. A timeout of zero is interpreted as an infinite timeout. |
Valid values |
|
Default value |
|
Description |
The apoc.periodic procedures rely on a scheduled executor that has a pool of threads with a default fixed size. The pool size can be configured using this configuration property. |
Valid values |
|
Default value |
|
Description |
Number of threads in the default APOC thread pool used for background executions. |
Valid values |
|
Default value |
|
Description |
Size of the |
Valid values |
|
Default value |
|
Description |
Configuration for geocoding providers. Keys and values are provider specific, see Configuring Geocode Provider. |
Valid values |
|
Default value |
|
Description |
Enables the procedures in the apoc.trigger package. |
Valid values |
|
Default value |
|
Description |
Triggers refresh rate, in milliseconds. The refresh rate refers to how long the database will wait before checking whether any new triggers have been installed, dropped, or stopped. |
Valid values |
|
Default value |
|
Description |
Limits the relative size a decompressed file can reach with respect to the compressed file in the loading procedures. If negative, no limit to the decompressed size is imposed. |
Valid values |
Integers different from 0 |
Default value |
|
Command Expansion
This feature was introduced in APOC 5.11.
Command expansion provides an additional capability to configure APOC by allowing scripts that set values sourced from external files to be specified. This is especially useful for:
-
Avoiding setting sensitive information, such as usernames, passwords, keys, etc., in the
apoc.conf
file as plain text. -
Handling the configuration settings of instances running in environments where the file system is not accessible.
These scripts can be specified in the apoc.conf
file.
They must begin with $
and be within parentheses ()
.
For example: apoc.setting=$(script_to_execute)
.
APOC leverages Neo4j’s command expansion capability. See the Operations Manual → The Neo4j conf. file for more information.
To enable command expansions, Neo4j must be started with the argument --expand-commands
.
bin/neo4j start --expand-commands
If the startup script does not receive the --expand-commands
argument, commands in the configuration file are treated as invalid settings.