Default file locations

Neo4j directories

The page describes the Neo4j directories, specifying their default locations per distribution and minimal file permissions.

If Neo4j was installed using a tar.gz or zip archive, <NEO4J_HOME> refers to the location the archive was extracted to.

Instructions provided for Neo4j Desktop are applicable across all operating systems where Neo4j Desktop is supported.

If tmp is set to noexec, it is recommended to set server.jvm.additional=-Djava.io.tmpdir=/home/neo4j in conf/neo4j.conf and replace /home/neo4j with a path that has exec permissions.

For /bin/cypher-shell, set this via an environment variable: export JAVA_OPTS=-Djava.io.tmpdir=/home/neo4j and replace /home/neo4j with a path that has exec permissions.

For the Neo4j’s uses of the Java Native Access (JNA) library, set server.jvm.additional=-Djna.tmpdir=/tmp in conf/neo4j.conf and replace /tmp with a path that has exec permissions.

Bin

The bin directory contains the Neo4j running script and built-in tools, such as Cypher Shell and Neo4j Admin.

File permissions

Read only and execute.

Table 1. bin directory default location per distribution
Neo4j distribution Default file location

Linux / macOS / Docker

<NEO4J_HOME>/bin

Windows

<NEO4J_HOME>\bin

Debian / RPM

/usr/bin

Neo4j Desktop

From the Open dropdown menu of your active Neo4j DBMS, select Terminal and run cd bin.

Certificates

The certificate directory contains the Neo4j TLS certificates.

File permissions

Read only.

Table 2. certificates directory default location per distribution
Neo4j distribution Default file location

Linux / macOS / Docker

<NEO4J_HOME>/certificates

Windows

<NEO4J_HOME>\certificates

Debian / RPM

/var/lib/neo4j/certificates

Neo4j Desktop

From the Open dropdown menu of your active Neo4j DBMS, select Terminal and run cd certificates.

Configuration

The configuration directory contains the Neo4j configuration settings, Log4j configuration settings, and the JMX access credentials. For details about neo4j.conf, see The neo4j.conf file.

File permissions

Read only

Table 3. configuration directory default location per distribution
Neo4j distribution Default file location

Linux / macOS / Docker

<NEO4J_HOME>/conf/neo4j.conf
<NEO4J_HOME>/conf/neo4j-admin.conf
<NEO4J_HOME>/conf/server-logs.xml
<NEO4J_HOME>/conf/user-log.xml

Windows

<NEO4J_HOME>\conf\neo4j.conf
<NEO4J_HOME>\conf\neo4j-admin.conf
<NEO4J_HOME>\conf\server-logs.xml
<NEO4J_HOME>\conf\user-log.xml

Debian / RPM

/etc/neo4j/neo4j.conf
/etc/neo4j/neo4j-admin.conf
/etc/neo4j/server-logs.xml
/etc/neo4j/user-log.xml

Neo4j Desktop

From the Open dropdown menu of your active Neo4j DBMS, select Terminal and run cd conf.

Data

The data directory contains all data-related content, such as databases, transactions, cluster-state (if applicable), dumps, and the cypher.script files (from the neo4j-admin database restore command). The data directory is internal to Neo4j and its structure is subject to change between versions without notice.

File permissions

Read and write.

Table 4. data directory default location per distribution
Neo4j distribution Default file location

Linux / macOS / Docker

<NEO4J_HOME>/data

Windows

<NEO4J_HOME>\data

Debian / RPM

/var/lib/neo4j/data

Neo4j Desktop

From the Open dropdown menu of your active Neo4j DBMS, select Terminal, and run cd data.

Import

The import directory contains all CSV files that the command LOAD CSV uses as sources to import data in Neo4j.

File permissions

Read only

Table 5. import directory default location per distribution
Neo4j distribution Default file location

Linux / macOS / Docker

<NEO4J_HOME>/import

Windows

<NEO4J_HOME>\import

Debian / RPM

/var/lib/neo4j/import

Neo4j Desktop

From the Open dropdown menu of your active Neo4j DBMS, select Terminal, and run cd import.

Labs

The labs directory contains APOC Core. For more information, see APOC User Guide → Installation.

File permissions

Read only.

Table 6. labs directory default location per distribution
Neo4j distribution Default file location

Linux / macOS / Docker

<NEO4J_HOME>/labs

Windows

<NEO4J_HOME>\labs

Debian / RPM

/var/lib/neo4j/labs

Neo4j Desktop

From the Open dropdown menu of your active Neo4j DBMS, select Terminal, and run cd labs.

Lib

The lib directory contains all Neo4j dependencies.

File permissions

Read only.

Table 7. lib directory default location per distribution
Neo4j distribution Default file location

Linux / macOS / Docker

<NEO4J_HOME>/lib

Windows

<NEO4J_HOME>\lib

Debian / RPM

/usr/share/neo4j/lib

Neo4j Desktop

From the Open dropdown menu of your active Neo4j DBMS, select Terminal, and run cd lib.

Licenses

The licenses directory contains Neo4j license files.

File permissions

Read only.

Table 8. licenses directory default location per distribution
Neo4j distribution Default file location

Linux / macOS / Docker

<NEO4J_HOME>/licenses

Windows

<NEO4J_HOME>\licenses

Debian / RPM

/var/lib/neo4j/licenses

Neo4j Desktop

From the Open dropdown menu of your active Neo4j DBMS, select Terminal, and run cd licences.

Logs

The logs directory contains the Neo4j log files.

File permissions

Read and write.

Table 9. logs directory default location per distribution
Neo4j distribution Default file location

Linux / macOS / Docker

<NEO4J_HOME>/logs [1]

Windows

<NEO4J_HOME>\logs

Debian / RPM

/var/log/neo4j/ [2]

Neo4j Desktop

From the Open dropdown menu of your active Neo4j DBMS, select Terminal, and run cd logs.

1. To view neo4j.log in Docker, use docker logs <containerID/name>.

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

Metrics

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

File permissions

Read and write.

Table 10. metrics directory default location per distribution
Neo4j distribution Default file location

Linux / macOS / Docker

<NEO4J_HOME>/metrics

Windows

<NEO4J_HOME>\metrics

Debian / RPM

/var/lib/neo4j/metrics

Neo4j Desktop

From the Open dropdown menu of your active Neo4j DBMS, select Terminal, and run cd metrics.

Plugins

The plugins directory contains custom code that extends Neo4j, for example, user-defined procedures, functions, and security plugins.

File permissions

Read only.

Table 11. plugins directory default location per distribution
Neo4j distribution Default file location

Linux / macOS / Docker

<NEO4J_HOME>/plugins

Windows

<NEO4J_HOME>\plugins

Debian / RPM

/var/lib/neo4j/plugins

Neo4j Desktop

From the Open dropdown menu of your active Neo4j DBMS, select Terminal, and run cd plugins.

Products

The products directory contains the JAR files of the Neo4j products.

For Enterprise Edition, these are:

Community Edition contains only the GenAI plugin.

File permissions

Read only.

Table 12. products directory default location per distribution
Neo4j distribution Default file location

Linux / macOS / Docker

<NEO4J_HOME>/products

Windows

<NEO4J_HOME>\products

Debian / RPM

/var/lib/neo4j/products

Neo4j Desktop

From the Open dropdown menu of your active Neo4j DBMS, select Terminal, and run cd products.

Run

The run directory contains the processes IDs.

File permissions

Read and write.

Table 13. run directory default location per distribution
Neo4j distribution Default file location

Linux / macOS / Docker

<NEO4J_HOME>/run

Windows

<NEO4J_HOME>\run

Debian / RPM

/var/lib/neo4j/run

Neo4j Desktop

From the Open dropdown menu of your active Neo4j DBMS, select Terminal, and run cd run.

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

#server.directories.data=data
#server.directories.plugins=plugins
#server.directories.logs=logs
#server.directories.lib=lib
#server.directories.run=run
#server.directories.licenses=licenses
#server.directories.metrics=metrics
#server.directories.transaction.logs.root=data/transactions
#server.directories.dumps.root=data/dumps
#server.directories.import=import