Neo4j Server

type access

  • Operating System:

  • Terminal:

  • Shell:

  • Editor:

  • Package Manager:

  • Programming Language:

type access

  • Operating System:

  • Terminal:

  • Shell:

  • Editor:

  • Package Manager:

  • Programming Language:

type access

  • Operating System:

  • Terminal:

  • Shell:

  • Editor:

  • Package Manager:

  • Programming Language:

type access

  • Operating System:

  • Terminal:

  • Shell:

  • Editor:

  • Package Manager:

  • Programming Language:

type access

  • Operating System:

  • Terminal:

  • Shell:

  • Editor:

  • Package Manager:

  • Programming Language:

type access

  • Operating System:

  • Terminal:

  • Shell:

  • Editor:

  • Package Manager:

  • Programming Language:

type access

  • Operating System:

  • Terminal:

  • Shell:

  • Editor:

  • Package Manager:

  • Programming Language:

type access

  • Operating System:

  • Terminal:

  • Shell:

  • Editor:

  • Package Manager:

  • Programming Language:

type access

  • Operating System:

  • Terminal:

  • Shell:

  • Editor:

  • Package Manager:

  • Programming Language:

type access

  • Operating System:

  • Terminal:

  • Shell:

  • Editor:

  • Package Manager:

  • Programming Language:

type access

  • Operating System:

  • Terminal:

  • Shell:

  • Editor:

  • Package Manager:

  • Programming Language:

type access

  • Operating System:

  • Terminal:

  • Shell:

  • Editor:

  • Package Manager:

  • Programming Language:

type access

  • Operating System:

  • Terminal:

  • Shell:

  • Editor:

  • Package Manager:

  • Programming Language:

Neo4j Server is an implementation of the server side of the community version of the Neo4j Graph Database Management System (DBMS).

The official Neo4j documentation is available here.

Initialization

An initialization Bash (.sh) script can be passed to the job. This script is executed before the Neo4j server starts.

Details on the usage of the Initialization parameter are provided in the Initialization - Bash script section of the documentation.

Start a Server Instance

When a job is started, the Database data parameter must be specified to either launch an existing database or create a new one.

To launch an existing database, the Database data parameter must point to the top-level folder of a Neo4j DBMS instance. This folder contains the subdirectories /databases, /dbms, /transactions, and the file server_id. One of the databases located in /databases must then be selected as the Default database.

To create a new, empty database, an empty folder must be mounted as the Database data. The new default database is created with the name specified in the Default database parameter.

Note

Only one database can be created within a running server instance.

Credentials

Credentials can be provided either directly through the Authentication parameter or indirectly via an Authentication file.

When an existing database is mounted, the corresponding credentials must be used to connect to the server.

When a new database is created, default credentials are applied if none are specified:

  • Username: neo4j

  • Password: neo4j

The password can be changed using a Cypher query such as:

ALTER USER neo4j SET PASSWORD '<new-password>'

Important

Changed credentials must be retained for future use of the database.

Import Files

Data files can be made available for import into a Neo4j database by mounting the folder that contains them through the optional Import files parameter.

Multiple file formats are supported:

  • .csv files can be imported using Cypher.

  • Other, common file formats can be imported using the APOC core plugin.

Data Dumps

Neo4j databases can be exported and imported using data dumps.

  • To export a database, the neo4j-admin dump command can be used. This creates a dump file containing the full contents of the selected database.

  • To import a database, the neo4j-admin load command can be used with a previously created dump file. This operation requires an empty target database.

Note

Dump and load operations must be executed while the server is offline.

Plugins

Neo4j’s built-in functionality can be extended through plugins.

Plugins are distributed as standalone .jar files. To make them available in a job, a folder containing the .jar files must be mounted using the optional Plugins parameter.

The APOC core plugin is included by default.

Some plugins require additional configuration of the Neo4j server instance. Such configuration can be applied either through an initialization script or with a custom configuration file.

Note

The main configuration file is located at /var/lib/neo4j/conf/neo4j.conf.

Custom Configuration

A custom configuration directory can be provided through the optional Config directory parameter. If specified, this directory fully replaces the default configuration directory (/var/lib/neo4j/conf).

When preparing custom configuration files, the following considerations apply:

  • The server must be configured to listen on 0.0.0.0.

  • The mount point for folders is /work, which must be taken into account when defining server directories.

A custom configuration directory takes precedence over all other optional parameters. As a result, parameters such as Default database or Authentication, even if set through the job submission page, may be ignored.

Before the server starts, the validity of the provided configuration files is tested. If validation fails, the job is terminated. Apart from this validation step, fewer correctness checks are applied compared to when the default configuration is used.

Cypher Shell

A Cypher Shell can be used to access the database from inside a running Neo4j job. To open the terminal, click the Open terminal button in the job interface.

From the job terminal, run:

$ cypher-shell

The shell will prompt for the credentials of the DBMS. After successful authentication, Cypher Shell starts and allows interaction with the DBMS through Cypher queries.

Connect to a Server Instance

If a Neo4j client application runs within another app available on UCloud, a direct connection to the Neo4j server can be established as described here. In this case, the server hostname is configured as an external parameter via the optional Connect to other jobs parameter.

If the Neo4j client is a third-party application not running on UCloud, a static IP address must be assigned to the server using the related option

Note

By default, remote access to the Neo4j server is provided through a TCP/IP connection on port 7687. The static IP address must expose the same port to enable the connection.

Examples of client access

  • Neo4j Desktop or other standalone Neo4j client applications can connect using the bolt://<static-ip>:7687 connection string (adjust the port if a different one is configured).

  • Neo4j Browser can be accessed directly from a web browser if the HTTP port is exposed (default: 7474). In this case, open: http://<static-ip>:7474

Note

By default, the server runs with Bolt TLS set to OPTIONAL. If SSL certificates are required, the same certificates must also be configured on the client side to establish a secure connection.