Settings reference

Parameter Explanation

initial.server.mode_constraint

This setting constrains the operating mode of the database to be used only in primary or secondary mode. Default setting is NONE, ie. no constraint. As an initial setting, the value set here is used when a server is first enabled. Once enabled, a server’s mode constraint can only be changed with ALTER SERVER 'name' SET OPTIONS {modeConstraint:'PRIMARY'}.

Example: a server configured with initial.server.mode_constraint=SECONDARY is only allocated databases whose topologies contain 1 or more secondary. This server always only hosts those databases in SECONDARY mode.

initial.dbms.automatically_enable_free_servers

This setting allows for auto-enable of servers in the FREE state. After startup, it can be changed with the dbms.cluster.setAutomaticallyEnableFreeServers procedure.

server.cluster.system_database_mode

Every cluster member hosts the system database. This config controls what mode a given instance hosts the system database in: PRIMARY or SECONDARY.

Example: server.cluster.system_database_mode=SECONDARY means that this instance holds only a secondary copy of the system database.

There should be a relatively high number (5-7) of system primaries, spread across availability zones. However, if enabling more than 10 servers, it is recommended to start making the later ones secondaries.

dbms.cluster.minimum_initial_system_primaries_count

Minimum number of servers configured with server.cluster.system_database_mode=PRIMARY required to form a cluster.

Example: dbms.cluster.minimum_initial_system_primaries_count=3 specifies that the cluster is considered bootstrapped and the DBMS online when at least 3 system database primaries have discovered one another.

dbms.cluster.discovery.resolver_type

This setting specifies the strategy that the instance uses to determine the addresses for other instances in the cluster to contact for bootstrapping. Possible values are:

LIST

Treats dbms.cluster.discovery.endpoints (or dbms.cluster.discovery.v2.endpoints, if you use discovery service v2 available as of Neo4j 5.23) as a list of addresses of servers to contact for discovery.

DNS

Treats dbms.cluster.discovery.endpoints (or dbms.cluster.discovery.v2.endpoints, if you use discovery service v2 available as of Neo4j 5.23) as a domain name to resolve via DNS. Expect DNS resolution to provide A records with hostnames or IP addresses of servers to contact for discovery, on the port specified by dbms.cluster.discovery.endpoints.

SRV

Treats dbms.cluster.discovery.endpoints (or dbms.cluster.discovery.v2.endpoints, if you use discovery service v2 available as of Neo4j 5.23) as a domain name to resolve via DNS. Expect DNS resolution to provide SRV records with hostnames or IP addresses and ports, of servers to contact for discovery.

K8S

Accesses the Kubernetes list service API to derive addresses of servers to contact for discovery. Requires dbms.kubernetes.label_selector to be a Kubernetes label selector for Kubernetes services running a server each and dbms.kubernetes.service_port_name to be a service port name identifying the discovery port of cluster servers services. The value of dbms.cluster.discovery.endpoints (or dbms.cluster.discovery.v2.endpoints, if you use discovery service v2 available as of Neo4j 5.23) is ignored for this option. For more details, see Discovery in Kubernetes.

From Neo4j 5.23, depending on which version of the discovery service you are using, you need to set either dbms.cluster.discovery.endpoints or dbms.cluster.discovery.v2.endpoints in the neo4j.conf file. Detailed information about discovery and discovery configuration options is given in Methods for server discovery.

dbms.cluster.discovery.endpoints Deprecated in 5.23

One or more network addresses used to discover other servers in the cluster. The exact method by which endpoints are resolved to other cluster members is determined by the value of dbms.cluster.discovery.resolver_type. In the default case, the initial discovery members are given as a comma-separated list of address/port pairs, and the default port for the discovery service is :5000.

It is good practice to set this parameter to the same value on all servers in the cluster.

Example: dbms.cluster.discovery.resolver_type=LIST combined with server01.example.com:5000,server02.example.com:5000,server03.example.com:5000 attempt to reach Neo4j instances listening on server01.example.com, server02.example.com and server03.example.com; all on port 5000.

dbms.cluster.discovery.v2.endpoints Introduced in 5.22

A comma-separated list of endpoints that a server should contact in order to discover other cluster members. Typically, all cluster members, including the current server, must be specified in this list. The setting configures the endpoints for discovery service v2.

Example: dbms.cluster.discovery.resolver_type=LIST combined with server01.example.com:6000,server02.example.com:6000,server03.example.com:6000 attempt to reach Neo4j instances listening on server01.example.com, server02.example.com and server03.example.com; all on port 6000.

dbms.cluster.discovery.version Introduced in 5.22

This setting allows you to select which discovery service should be started. Possible values are:

  • V1_ONLY -— it runs only discovery service v1.

  • V1_OVER_V2 -— it runs both discovery service v1 and discovery service v2, where v1 is the main service and v2 runs in the background.

  • V2_OVER_V1 -— it runs both discovery service v1 and discovery service v2, where v2 is the main service and v1 runs in the background.

  • V2_ONLY — it runs only discovery service v2.

The default value is V1_ONLY.

Discovery services v1 and v2 are designed to run in parallel. They are completely independent of each other, thus allowing you to keep the cluster functioning while switching over from v1 to v2. For details on how to move from discovery service v1 to v2, see Moving from discovery service v1 to v2.

server.discovery.advertised_address Deprecated in 5.23

The address/port setting that specifies where the instance advertises that it listens for discovery protocol messages from other members of the cluster. If this server is included in the discovery.endpoints of other cluster members, the value there must exactly match this advertised address.

Example: server.discovery.advertised_address=192.168.33.21:5001 indicates that other cluster members can communicate with this server using the discovery protocol at host 192.168.33.20 and port 5001.

server.cluster.raft.advertised_address

The address/port setting that specifies where the Neo4j server advertises to other members of the cluster that it listens for Raft messages within the cluster.

Example: server.cluster.raft.advertised_address=192.168.33.20:7000 listens for cluster communication in the network interface bound to 192.168.33.20 on port 7000.

server.cluster.advertised_address

The address/port setting that specifies where the instance advertises it listens for requests for transactions in the transaction-shipping catch-up protocol.

Example: causal_clustering.transaction_advertised_address=192.168.33.20:6001 listens for transactions from cluster members on the network interface bound to 192.168.33.20 on port 6001.

server.discovery.listen_address Deprecated in 5.23

The address/port setting that specifies which network interface and port the Neo4j instance binds to for the cluster discovery protocol.

Example: server.discovery.listen_address=0.0.0.0:5001 listens for cluster membership communication on any network interface at port 5001.

server.cluster.raft.listen_address

The address/port setting that specifies which network interface and port the Neo4j instance binds to for cluster communication. This setting must be set in coordination with the address this instance advertises it listens at in the setting server.cluster.raft.advertised_address.

Example: server.cluster.raft.listen_address=0.0.0.0:7000 listens for cluster communication on any network interface at port 7000.

server.cluster.listen_address

The address/port setting that specifies which network interface and port the Neo4j instance binds to for cluster communication. This setting must be set in coordination with the address this instance advertises it listens at in the setting server.cluster.advertised_address.

Example: server.cluster.listen_address=0.0.0.0:6001 listens for cluster communication on any network interface at port 6001.