Dedicated web server

The Neo4j Browser is a client-side single-page application (SPA), which uses an HTTP server for its static content. It is possible to host a dedicated web server to serve Neo4j Browser as a web application. Download Neo4j Browser from Maven.

Here are some use cases of why this deployment mode could be useful.

Neo4j Browser local hosted

This case is valid if you have access to a Neo4j instance and do not want to install Neo4j Desktop or do not want to use a hosted Neo4j Browser web application. It is a simple solution, start a local hosted Neo4j Browser web application on your machine with a simple one-line command. It is also easy to run a specific version of Neo4j Browser, download the preferred version from Maven.

Neo4j Browser deployed web application

If you want to have specific network configurations within your network and host Neo4j Browser for quick access within your organization, you can host Neo4j Browser with an HTTP web server. This allows for full control of configuring the HTTP web server as needed. For example you way want to add a layer of access control to access the Neo4j Browser web application and configure the HTTP web server connection to use TLS.

Extend or improve the source code

Neo4j Browser is open source (GNU General Public License v3.0), and the source code can be found at https://github.com/neo4j/neo4j-browser. If you want to extend or contribute to the project, you can alter the code. This allows you to run a modified version of Neo4j Browser.

If you have installed Neo4j on your system, then disable the browser module (BROWSER) from running.
For more information, see dbms.http_enabled_modules configuration setting.

HTTP web servers

Here is a list of suggestions for simple HTTP web servers that can be used to host Neo4j Browser.

Python3 — http.server

A simple HTTP server that is bundled with Python 3. Do not use in production environment.

python -m http.server --directory neo4j-browser/ 8080
Node.js — http-server

A simple, zero-configuration command-line HTTP server.

npx http-server -p 8080 neo4j-browser/

For more information, see https://www.npmjs.com/package/http-server.

Node.js — serve

A simple HTTP server is ideal for serving a static site, single page application or just a static file.

npx serve -l 8080 neo4j-browser/

For more information, see https://www.npmjs.com/package/serve.

HTTP servers suitable for production use:

Nginx

A web server that can also be used as a reverse proxy and a load balancer.
For more information, see https://www.nginx.com/.

Apache HTTP Server

For more information, see https://httpd.apache.org/.

Internet Information Services (IIS)

For more information, see https://www.iis.net/.

Pre-built Neo4j Browser

You can download Neo4j Browser from Maven (https://search.maven.org/artifact/org.neo4j.client/neo4j-browser) and serve the web application with an HTTP server.

Example 1. Get pre-built Neo4j Browser and run an HTTP web server
  1. Download Neo4j Browser from Maven.

    wget https://repo1.maven.org/maven2/org/neo4j/client/neo4j-browser/5.13.0/neo4j-browser-5.13.0.jar

    Alternatively, manually go to https://search.maven.org/artifact/org.neo4j.client/neo4j-browser and download Neo4j Browser.

  2. Unzip the .jar file.

    unzip neo4j-browser-5.13.0.jar
  3. Host Neo4j Browser with an HTTP server.

    Start a web server to serve the content. In this example, you start a web server with Python 3.

    python -m http.server --directory browser/ 8080

    Point your web browser to http://localhost:8080.

  4. Test the connection to a Neo4j database instance.

    If you have the Neo4j tarball, you can start the database instance with the command (assuming that the current working directory is <neo4j-home>):

    bin/neo4j start

    In Neo4j Browser, connect to the Neo4j database instance with the URI:

    neo4j://localhost:7687

For details on how to set up a connection to Neo4j in Neo4j Browser, see Connect to a Neo4j DBMS.

Build Neo4j Browser

You can build the source code and host Neo4j Browser.

The source code can be found at https://github.com/neo4j/neo4j-browser.

Example 2. Build Neo4j Browser and run an HTTP web server
  1. Get the source code from Github

    Clone the Neo4j Browser Git repository. The command gets only the master branch to save bandwidth and file space.

    git clone --single-branch --branch=master https://github.com/neo4j/neo4j-browser/

    Change the current working directory to the root of the Git repository.

    cd neo4j-browser
  2. Build with Node.js.

    1. Install Node.js dependencies.

      npm install
    2. Build the project.

      npm build
  3. Host web application with an HTTP server.

    Start a web server to serve the content. In this example you, start a web server with Python 3.

    python -m http.server --directory dist/ 8080

    Point your web browser to http://localhost:8080.

For details on how to set up a connection to Neo4j in Neo4j Browser, see Connect to a Neo4j DBMS.