Advanced connection information
Connection URI
The driver supports connection to URIs of the form
<SCHEME>://<HOST>[:<PORT>[?policy=<POLICY-NAME>]]
-
<SCHEME>is one amongneo4j,neo4j+s,neo4j+ssc,bolt,bolt+s,bolt+ssc. -
<HOST>is the host name where the Neo4j server is located. -
<PORT>is optional, and denotes the port the Bolt protocol is available at. -
<POLICY-NAME>is an optional server policy name. Server policies need to be set up prior to usage.
The driver does not support connection to a nested path, such as example.com/neo4j/.
The server must be reachable from the domain root.
|
Connection protocols and security
Communication between the driver and the server is mediated by Bolt. The scheme of the server URI determines whether the connection is encrypted and, if so, what type of certificates are accepted.
| URL scheme | Encryption | Comment |
|---|---|---|
neo4j |
Default for local setups |
|
neo4j+s |
(only CA-signed certificates) |
Default for Aura |
neo4j+ssc |
(CA- and self-signed certificates) |
The driver receives a routing table from the server upon successful connection, regardless of whether the instance is a proper cluster environment or a single-machine environment.
The driver’s routing behavior works in tandem with Neo4j’s clustering by directing read/write transactions to appropriate cluster members.
If you want to target a specific machine, use the bolt, bolt+s, or bolt+ssc URI schemes instead.
|
The connection scheme to use is not your choice, but is rather determined by the server requirements. You must know the right server scheme upfront, as no metadata is exposed prior to connection. The connection scheme is part of the instance URI. If you are unsure, ask the database administrator.