Default file locations

Neo4j directories

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

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

Description

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

File permissions

Read only and execute.

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

Description

The Neo4j TLS certificates.

File permissions

Read only.

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

Description

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

Neo4j distribution Default file location

Linux / macOS / Docker

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

Windows

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

Debian / RPM

/etc/neo4j/neo4j.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

Description

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.

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

Description

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

File permissions

Read only

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

Description

Contains APOC Core. For more information, see APOC User Guide → Installation.

File permissions

Read only.

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

Description

All Neo4j dependencies.

File permissions

Read only.

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

Description

For storing license files from Neo4j.

File permissions

Read only.

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

Description

The Neo4j log files.

File permissions

Read and write.

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

Description

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

File permissions

Read and write.

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

Description

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

File permissions

Read only.

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

Description

The JAR files of the Neo4j products: Graph Data Science Library, Neo4j Bloom, and GenAI plugin. The folder also contains a README.txt file with information on enabling them.

File permissions

Read only.

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

Description

The processes IDs.

File permissions

Read and write.

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