Install APOC library for Neo4j Server

Neo4j Graph Database

Vinay Narayana
2 min readAug 20, 2019

Overview

APOC stands for Awesome Procedures On Cypher.
APOC provides developers to use common functionalities like importing data, running graph algorithms without need for re-writing them.

Every Neo4j Developer will have the requirement for installing / loading APOC library to server in some of the following ways:
1. Bulk Import
2. Periodic Operations (like iterate and commit in batches etc..)
3. Widely used graph algorithms (like shortest path, cosine similarities etc..)

This tutorial helps in installing other major libraries like Graph Algorithms as well.

Step I

Download required library from the sources as:
1. APOC library
2. Graph Algorithms

Make sure to library release major and minor version number matches with Neo4j version

Place downloaded files in the following location:
<Neo4j Path>\plugins

Neo4j Plugins folder

Step II

Modify the Neo4j Configuration file, present in the location :
<Neo4j Path>\conf\neo4j.conf

  1. Uncomment dbms.directories.plugins=plugins
    allows Neo4j to load this plugins directory to server
  2. Uncomment and modify as following
    dbms.security.procedures.unrestricted=apoc.*
    dbms.security.procedures.whitelist=apoc.*,apoc.coll.*,apoc.load.*
    loads unrestricted and white-listed procedures/ plugins to the server
  3. Add the following lines
    apoc.import.file.enabled=true
    apoc.export.file.enabled=true
    Useful for reading and writing data from and to files respectively

Step III

Verify installation with Cypher Queries.

Run the following command in Neo4j Browser:
RETURN apoc.version()

Use help command as follows to learn about functionalities

CALL apoc.help(“dijkstra”)

References:

--

--