Installation

APOC Extended can be downloaded using one of the methods described in the sections below.

Neo4j Server

Since APOC relies on Neo4j’s internal APIs you need to use the matching APOC version for your Neo4j installation. Make sure that the first two version numbers match between Neo4j and APOC.

Go to here for all the APOC extended releases and download the binary jar to place into your $NEO4J_HOME/plugins folder.

After you move the jar file to the plugins folder you have to restart neo4j with neo4j restart

Since APOC relies on Neo4j’s internal APIs, you need to use the right APOC version for your Neo4j installation.

APOC uses a consistent versioning scheme: <neo4j-version>.<apoc> version. The trailing <apoc> part of the version number will be incremented with every apoc release.

The version compatibility matrix explains the mapping between Neo4j and APOC versions:

apoc version neo4j version

5.8.1

5.8.0 (5.8.x)

5.7.0

5.7.0 (5.7.x)

5.6.0

5.6.0 (5.6.x)

5.5.0

5.5.0 (5.5.x)

5.4.0

5.4.0 (5.4.x)

5.3.1

5.3.0 (5.3.x)

5.2.0

5.2.0 (5.2.x)

5.1.0

5.1.0 (5.1.x)

4.4.0.18

4.4.0 (4.4.x)

If by mistake a jar not compatible with the neo4j version is inserted, a log.warn like this will appear in neo4j.log:

The apoc version (<APOC_VERSION>) and the Neo4j DBMS versions [NEO4J_VERSION] are incompatible.
See the compatibility matrix in https://neo4j.com/labs/apoc/4.4/installation/ to see the correct version

Docker

APOC Extended can be used with Docker.

This feature is intended to facilitate using APOC in development environments, but it is not recommended for use in production environments.

Download the APOC release matching our Neo4j version and, copy it to a local folder, and supply it as a data volume mounted at /plugins.

The following downloads the APOC Extended library into the plugins directory and then mounts that folder to the Neo4j Docker container
mkdir plugins
pushd plugins
wget https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases/download/5.8.1/apoc-5.8.1-extended.jar
popd
docker run --rm -e NEO4J_AUTH=none -p 7474:7474 -v $PWD/plugins:/plugins -p 7687:7687 neo4j:5.0

If you want to pass custom apoc config to your Docker instance, you can use environment variables, like here:

docker run \
    -p 7474:7474 -p 7687:7687 \
    -v $PWD/data:/data -v $PWD/plugins:/plugins \
    --name neo4j-apoc \
    -e NEO4J_apoc_export_file_enabled=true \
    -e NEO4J_apoc_import_file_enabled=true \
    -e NEO4J_apoc_import_file_use__neo4j__config=true \
    neo4j

Maven Repository

In a pom.xml of a maven project, you can add these two dependencies from Maven Repository:

<dependency>
    <groupId>org.neo4j.procedure</groupId>
    <artifactId>apoc-extended</artifactId>
    <version>5.8.1</version>
    <classifier>extended</classifier>
</dependency>

Alternatively, you can download the jar from here and put it into plugin folder.

Load and unrestrict procedures/functions

The Extended APOC library contains over 150 functions and procedures.

It is not recommended to load all of these into the dbms, but instead use the principle of least privilege. This principle dictates that you only load the functions and procedures necessary to execute your queries.

The procedures and functions that should be loaded can be specified using the Neo4j configuration setting dbms.security.procedures.allowlist in $NEO4J_HOME/conf/neo4j.conf. For example, to load apoc.load.csv and all functions in the apoc.cypher package, use dbms.security.procedures.allowlist=apoc.load.csv,apoc.cypher.*.

Please note that using e.g. apoc.cypher., if the APOC Core plugin is installed, will also load the the `apoc.cypher. Core procedures / functions, as well as other plugins that may be using the same package.

The default of the setting is *. This means that if you do not explicitly give it a value (or no value), all APOC procedures and functions, as well as other potential libraries in the plugins directory will be loaded.

For security reasons, procedures and functions that use internal APIs are disabled by default. In this case, it is also recommended to use the principle of least privilege and only unrestrict those procedures and functions which you are certain to use. Procedures and functions can be unrestricted using the Neo4j configuration setting dbms.security.procedures.unrestricted in $NEO4J_HOME/conf/neo4j.conf. For example, if you need to unrestrict apoc.ttl.expire and apoc.ttl.expireIn, use: dbms.security.procedures.unrestricted=apoc.ttl.expire,apoc.ttl.expireIn.

To unrestrict a whole package of APOC functions and procedures when using the Neo4j Docker container, you need to amend the Docker environment variables. For example, if you need to add the full apoc.custom package, add -e NEO4J_dbms_security_procedures_unrestricted=apoc.custom.\\\* to your docker run …​ command. The three backslashes are necessary to prevent wildcard expansions.

Please note that if you have APOC Core installed, the same goes for the dbms.security.procedures.allowlist one, so setting dbms.security.procedures.unrestricted=package.name.* will unrestrict both Extended and Core procedures / functions.