Configure connectors
Neo4j provides support for Bolt, HTTP, and HTTPS protocols using connectors. Connectors are configured in the neo4j.conf file.
Available connectors
The table below lists the available Neo4j connectors:
Connector name | Protocol | Default port number |
---|---|---|
|
Bolt |
|
|
HTTP |
|
|
HTTPS |
|
When configuring the HTTPS or Bolt connector, see also SSL framework for details on how to work with SSL certificates.
Configuration options
The connectors are configured by settings on the format server.<connector-name>.<setting-suffix>>
.
The available suffixes are described in the table below:
Option name | Default | Setting(s) | Description |
---|---|---|---|
|
|
|
This setting allows the client connector to be enabled or disabled. When disabled, Neo4j does not listen for incoming connections on the relevant port. |
|
|
|
This setting specifies how Neo4j listens for incoming connections.
It consists of two parts; an IP address (e.g. 127.0.0.1 or 0.0.0.0) and a port number (e.g. 7687), and is expressed in the format |
|
|
|
This setting specifies the address that clients should use for this connector.
This is useful in a cluster as it allows each server to correctly advertise addresses of the other servers in the cluster.
The advertised address consists of two parts; an address (fully qualified domain name, hostname, or IP address) and a port number (e.g. 7687), and is expressed in the format |
|
|
This setting is only applicable to the Bolt connector.
It allows the connector to accept encrypted and/or unencrypted connections.
The default value is Other values are |
|
1. When Neo4j is used in embedded mode, the default value is
2. The default value for |
listen_address
for the Bolt connectorTo listen for Bolt connections on all network interfaces (0.0.0.0) and on port 7000, set the listen_address
for the Bolt connector:
server.bolt.listen_address=0.0.0.0:7000
advertised_address
for the Bolt connectorIf routing traffic via a proxy, or if port mappings are in use, it is possible to specify advertised_address
for each connector individually.
For example, if port 7687 on the Neo4j Server is mapped from port 9000 on the external network, specify the advertised_address
for the Bolt connector:
server.bolt.advertised_address=<server-name>:9000
Options for Bolt thread pooling
See Bolt thread pool configuration to learn more about Bolt thread pooling and how to configure it on the connector level.
Defaults for addresses
It is possible to specify defaults for the configuration options with listen_address
and advertised_address
suffixes, as described below.
Setting a default value will apply to all the connectors, unless specifically configured for a certain connector.
server.default_listen_address
-
This configuration option defines a default IP address of the settings with the
listen_address
suffix for all connectors. If the IP address part of thelisten_address
is not specified, it is inherited from the shared settingserver.default_listen_address
.Example 3. Specifylisten_address
for the Bolt connectorTo listen for Bolt connections on all network interfaces (0.0.0.0) and on port 7000, set the
listen_address
for the Bolt connector:server.bolt.listen_address=0.0.0.0:7000
This is equivalent to specifying the IP address by using the
server.default_listen_address
setting, and then specifying the port number for the Bolt connector.server.default_listen_address=0.0.0.0 server.bolt.listen_address=:7000
server.default_advertised_address
-
This configuration option defines a default address of the settings with the
advertised_address
suffix for all connectors. If the address part of theadvertised_address
is not specified, it is inherited from the shared settingserver.default_advertised_address
.Example 4. Specifyadvertised_address
for the Bolt connectorSpecify the address that clients should use for the Bolt connector:
server.bolt.advertised_address=server1:9000
This is equivalent to specifying the address by using the
server.default_advertised_address
setting, and then specifying the port number for the Bolt connector.server.default_advertised_address=server1 server.bolt.advertised_address=:9000
The default address settings can only accept the hostname or IP address portion of the full socket address. Port numbers are protocol-specific, and can only be added by the protocol-specific connector configuration. For example, if you configure the default address value to be |
Was this page helpful?