How to configure Neo4j Fabric.

Fabric database setup

Fabric must be set on a standalone Neo4j DBMS: the settings in neo4j.conf are identified by the fabric namespace. The minimal requirements to setup Fabric are:

  • A virtual database name: this is the entry point used by the client applications to access the Fabric environment.

  • One or more Fabric graph URI and database: this a reference of a URI and a database for each graph set in the Fabric environment.

Local development setup example

Consider a standalone Neo4j DBMS, which has two databases, db1 and db2. Note that all databases except for the default and system must be created using the CREATE DATABASE command.

Fabric is enabled by configuring:

This configuration enables Fabric and exposes the feature under the virtual database with the name example, which is accessible using the default URI, neo4j://localhost:7687. After connecting to the DBMS with the example database selected, you can run queries like the following:

USE db1
USE db2
fabric minimal setting
Figure 1. Minimal local Fabric setting in a development setup

Remote development setup example

This example consists of a setup with three standalone Neo4j DBMSs. One instance acts as the Fabric proxy, configured to enable Fabric. The other two instances contain the databases db1 and db2.

The following configuration enables Fabric on the proxy instance and allows it to access the databases in the other two instances.


This configuration enables Fabric and exposes the feature under the virtual database named example, which is accessible using the default URI, neo4j://localhost:7687. The Fabric graphs are uniquely identified by their IDs, 0 and 1.

After connecting to the DBMS with the selected database set to "example", you can run queries like the following:

USE example.graph(0)
USE example.graph(1)
fabric minimal remote setting
Figure 2. Minimal remote Fabric setting in a development setup

Naming graphs

Graphs can be identified by their ID or by a name. A graph can be named by adding an extra configuration setting, fabric.graph.<ID>.name.

For example, if the given names are graphA (associated to db1) and graphB (associated to db2), the two additional settings will be:

Giving names to graphs means you can refer to them by name in queries:

USE example.graphA
USE example.graphB

Cluster setup with no single point of failure example

In this example, all components are redundant and data is stored in a Causal Cluster. In addition to the settings described in the previous example, a setting with no single point of failure requires the use of the routing servers parameter, which specifies a list of standalone Neo4j DBMSs that expose the same Fabric database and configuration. This parameter is required in order to simulate the same connectivity that client applications use with Causal Cluster, which means, in case of fault of one instance, the client application may revert to another existing instance.

Assume that in this example, the data is stored in three databases: db1, db2 and db3. The configuration of Fabric would be:


The configuration above must be added to the neo4j.conf file of the Neo4j DBMSs server1 and server2. The parameter fabric.routing.servers contains the list of available standalone Neo4j DBMSs hosting the Fabric database. The parameter fabric.graph.<ID>.uri can contain a list of URIs, so in case the first server does not respond to the request, the connection can be established to another server that is part of the cluster. The URIs refer to the neo4j:// schema so that Fabric can retrieve a routing table and can use one of the members of the cluster to connect.

fabric setting
Figure 3. Fabric setting with Causal Cluster and no single point of failure

Cluster routing context

The URIs in the graph settings may include routing contexts, which are described in the Neo4j Driver manuals. This can be used to associate a Fabric graph with a filtered subset of Causal Cluster members, by selecting a routing policy.

As an example, assuming you have a server policy called read_replicas defined in the configuration of the cluster you are targeting, you might set up a Fabric graph that accesses only the read replicas of the cluster.

This enables scenarios where queries executed through Fabric are explicitly offloaded to specific instances in clusters.

Authentication and authorization


Connections between the Fabric database and the Neo4j DBMSs hosting the data are created using the same credentials that are supplied in the client connection to the Fabric database. It is recommended to maintain a set of user credentials on all the Neo4j DBMSs; if required, a subset of credentials may be set for local access on the remote DBMSs.

User and role administration

User and role administration actions are not automatically propagated to the Fabric environment, therefore security settings must be executed on any DBMS that is part of Fabric.

Privileges on the Fabric database

In order to use all Fabric features, users of Fabric databases need ACCESS and READ privileges.

Important settings

This section provides general information about Fabric settings and describes the ones important for creating a fabric set-up. For the full list of Fabric configuration options, see Configuration settings.

Fabric settings are divided in the following categories:

  • System Settings: DBMS-level settings.

  • Graph Settings: definition and configuration of Fabric graphs.

  • Drivers Settings: configuration of drivers used to access Neo4j DBMSs and databases associated to Fabric graphs.

System settings

Table 1. Fabric system settings
Parameter Description

Name of the Fabric database. Neo4j Fabric currently supports one Fabric database in a standalone Neo4j DBMS.


A comma-separated list of Neo4j DBMSs that share the same Fabric configuration. These DBMSs form a routing group. A client application will route transactions through a Neo4j driver or connector to one of the members of the routing group. A Neo4j DBMS is represented by its Bolt connector address. Example: fabric.routing.servers=server1:7687.

Graph settings

The <ID> in the following settings is the integer associated to each Fabric graph.

Table 2. Fabric graph settings
Parameter Description


URI of the Neo4j DBMS hosting the database associated to the Fabric graph. Example: neo4j://somewhere:7687


Name of the database associated to the Fabric graph.


Name assigned to the Fabric graph. The name can be used in Fabric queries.


Any specific driver setting, that means, any setting related to a connection to a specific Neo4j DBMS and database. This setting overrides a global driver setting.

When configuring access to a remote DBMS, make sure that the remote is configured to advertise its address correctly, using either dbms.default_advertised_address or dbms.connector.bolt.advertised_address. Fabric reads the routing table from the remote DBMS and then connects back using an appropriate entry in that table.

Drivers settings

Fabric uses the Neo4j Java driver to connect to and access the data stored in Neo4j databases associated to Fabric graphs. This section presents the most important parameters available to configure the driver.

Drivers settings are configured with parameters with names of the format:


A setting can be global, i.e. be valid for all the drivers used in Fabric, or it can be specific for a given connection to a Neo4j database associated to a graph. The graph-specific setting overrides the global configuration for that graph.

Example 1. Global drivers setting versus graph-specific drivers setting

A drivers setting for Fabric as the following is valid for all the connections established with the Neo4j DBMSs set in Fabric:


A graph-specific connection for the database with ID=6 will override the fabric.driver.api setting for that database:

Table 3. Fabric drivers setting suffixes
Parameter suffix Explanation


SSL for Fabric drivers is configured using the fabric SSL policy. This setting can be used to instruct the driver not to use SSL even though the fabric SSL policy is configured. The driver will use SSL if the fabric SSL policy is configured, and this setting is set to true. This parameter can only be used in fabric.graph.<graph ID>.driver.ssl_enabled and not fabric.driver.ssl_enabled.


Determine which driver API to be used. Supported values are RX and ASYNC.

Most driver options described in Configuration in the Neo4j Driver manuals have an equivalent in Fabric configuration.