5.2. File locations

This section provides an overview of where files are stored in the different Neo4j distributions, and the necessary file permissions for running Neo4j.

This section describes the following:

5.2.1. Default file locations

The following table lists the default location of the Neo4j files, per type and distribution.

Table 5.1. Default file locations
File type Description Linux or macOS tarball Windows zip Debian RPM Neo4j Desktop [4] Neo4j Docker image

Bin

The Neo4j running script and built-in tools, such as, cypher-shell and neo4j-admin.

<neo4j-home>/bin

<neo4j-home>\bin

/usr/bin

/usr/bin

From the Open dropdown menu of your Neo4j instance, select Terminal, and navigate to <installation-version>/bin.

<neo4j-home>/bin

Configuration [1]

The Neo4j configuration settings and the JMX access credentials.

<neo4j-home>/conf/neo4j.conf

<neo4j-home>\conf\neo4j.conf

/etc/neo4j/neo4j.conf

/etc/neo4j/neo4j.conf

From the Open dropdown menu of your Neo4j instance, select Terminal, and navigate to <installation-version>/conf/neo4j.conf.

<neo4j-home>/conf/neo4j.conf

Data [2]

All data-related content, such as, databases, transactions, cluster state (if applicable).

<neo4j-home>/data

<neo4j-home>\data

/var/lib/neo4j/data

/var/lib/neo4j/data

From the Open dropdown menu of your Neo4j instance, select Terminal, and navigate to <installation-version>/data.

<neo4j-home>/data

Import

All CSV files that the command LOAD CSV uses as sources to import data in Neo4j.

<neo4j-home>/import

<neo4j-home>\import

/var/lib/neo4j/import

/var/lib/neo4j/import

From the Open dropdown menu of your Neo4j instance, select Terminal, and navigate to <installation-version>/import.

<neo4j-home>/import

Lib

All Neo4j dependencies.

<neo4j-home>/lib

<neo4j-home>\lib

/usr/share/neo4j/lib

/usr/share/neo4j/lib

From the Open dropdown menu of your Neo4j instance, select Terminal, and navigate to <installation-version>/lib.

<neo4j-home>/lib

Logs

The Neo4j log files.

<neo4j-home>/logs

<neo4j-home>\logs

/var/log/neo4j/ [3]

/var/log/neo4j/ [3]

From the Open dropdown menu of your Neo4j instance, select Terminal, and navigate to <installation-version>/logs.

<neo4j-home>/logs

Metrics

The Neo4j built-in metrics for monitoring the Neo4j DBMS and each individual database.

<neo4j-home>/metrics

<neo4j-home>\metrics

/var/lib/neo4j/metrics

/var/lib/neo4j/metrics

From the Open dropdown menu of your Neo4j instance, select Terminal, and navigate to <installation-version>/metrics.

<neo4j-home>/metrics

Plugins

Custom code that extends Neo4j, for example, user-defined procedures, functions, and security plugins.

<neo4j-home>/plugins

<neo4j-home>\plugins

/var/lib/neo4j/plugins

/var/lib/neo4j/plugins

From the Open dropdown menu of your Neo4j instance, select Terminal, and navigate to <installation-version>/plugins.

<neo4j-home>/plugins

Run

The processes IDs.

<neo4j-home>/run

<neo4j-home>\run

/var/lib/neo4j/run

/var/lib/neo4j/run

From the Open dropdown menu of your Neo4j instance, select Terminal, and navigate to <installation-version>/run.

<neo4j-home>/run

[1]For details about neo4j.conf, see: The neo4j.conf file.

[2]The data directory is internal to Neo4j and its structure is subject to change between versions without notice.

[3]To view the neo4j.log for Debian and RPM, use journalctl --unit=neo4j.

[4]Applicable to all operating systems where Neo4j Desktop is supported.

5.2.2. Customize your file locations

The file locations can also be customized by using environment variables and options.

The locations of <neo4j-home> and conf can be configured using environment variables:

Table 5.2. Configuration of <neo4j-home> and conf
Location Default Environment variable Notes

<neo4j-home>

parent of bin

NEO4J_HOME

Must be set explicitly if bin is not a subdirectory.

conf

<neo4j-home>/conf

NEO4J_CONF

Must be set explicitly if it is not a subdirectory of <neo4j-home>.

The rest of the locations can be configured by uncommenting the respective setting in the conf/neo4j.conf file and changing the default value.

#dbms.directories.data=data
#dbms.directories.plugins=plugins
#dbms.directories.logs=logs
#dbms.directories.lib=lib
#dbms.directories.run=run
#dbms.directories.metrics=metrics

5.2.3. File permissions

The operating system user that Neo4j server runs as must have the following minimal permissions:

Read only
  • conf
  • import
  • bin
  • lib
  • plugins
  • certificates
Read and write
  • data
  • logs
  • metrics
  • run
Execute
  • all files in bin