Configuration Options

Location of config options

Configuration options for APOC can be set using:

Option Description

Environment variables

Set via either export key=val or --env settings when used for Docker.

conf/apoc.conf

Located in the same folder as neo4j.conf.

The order of the above table matches the config option precedence. For example, any environment variable setting will override options set in apoc.conf.

APOC internally relies on Apache commons-config for resolving config settings. The meta-configuration is located in src/main/resources/apoc-config.xml.

Reference of config options

Set these config options in $NEO4J_HOME/conf/apoc.conf, or by using environment variables.

All boolean options default to false. This means that they are disabled, unless mentioned otherwise.

Property Description

apoc.export.file.enabled=false/true

Enables writing local files to disk.

apoc.http.timeout.connect=<number> (default 10000)

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, a Neo.ClientError.Procedure.ProcedureCallFailed exception is raised. A timeout of zero is interpreted as an infinite timeout.

apoc.http.timeout.read=<number> (default 60000)

Sets the read timeout to a specified timeout, in milliseconds. A non-zero value specifies the timeout when reading from a connection established to a resource. If the timeout expires before there is data available for read, a Neo.ClientError.Procedure.ProcedureCallFailed exception is raised. A timeout of zero is interpreted as an infinite timeout.

apoc.import.file.enabled=false/true

Enables reading local files from disk.

apoc.import.file.use_neo4j_config=true/false (default true)

This procedure checks 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.

apoc.jobs.scheduled.num_threads=number-of-threads (default: number of CPU cores / 4)

Many 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.

apoc.jobs.pool.num_threads=number-of-threads (default: number of CPU cores * 2)

Number of threads in the default APOC thread pool used for background executions.

apoc.jobs.queue.size=size of the queue (default: value of apoc.jobs.pool.num_threads * 5)

Size of the ThreadPoolExecutor working queue.

apoc.spatial.geocode.provider=<providername> apoc.spatial.geocode.<providerName>.<key>=<value>

configuration for geocoding providers, keys and values are provider specific, see [spatial].

apoc.trigger.enabled=false/true

Enables triggers.