This note is my experience in installing Neo4j graph database on my virtual private server (VPS). My aim is accessing Neo4j browser from the internet, so I can access my graph data anywhere, from my own application.
My VPS runs Ubuntu 16.06 LTS (Xenial) with several restriction. You should consider several things before you start :
- You should know how to access your VPS address from browser.
- You should know how to configure mapping “private port” to “public port” on your server.
Here are several installation steps in my VPS Server :
Step 1 : Prepare the tools
My Ubuntu server had uncommon command so I start to add some common commands with :
# sudo apt-get install -y software-properties-common
Neo4j will run if Java is installed. I install Oracle Java 8, which is not in default repository. I run this command to install Oracle Java 8 correctly :
# sudo add-apt-repository ppa:webupd8team/java # sudo apt-get update # sudo apt-get install oracle-java8-installer
Step 2 : Install Neo4j
Follow all steps in this link. All those steps are working (at least for me).
Step 3 : Configure VPS
To access Neo4j from the internet you must map Neo4j private port to public port. Usually VPS provider use firewall to map those ports. You should find those configuration in your VPS manager or something like that. Neo4j default port number, you must now are bolt connector port (7687) , HTTP Connector (7474) and HTTPs Connector (7473). Those ports are private and you should make it public in your VPS firewall configuration.
This picture below, depicts my VPS server configuration :
Step 4 : Configure neo4j.conf
Configure your neo4j.conf in /etc/neo4j/neo4j.conf with this following configuration :
# Bolt connector dbms.connector.bolt.enabled=true dbms.connector.bolt.tls_level=OPTIONAL dbms.connector.bolt.listen_address=0.0.0.0:7687 # HTTP Connector. There must be exactly one HTTP connector. dbms.connector.http.enabled=true dbms.connector.http.listen_address=0.0.0.0:7474 # HTTPS Connector. There can be zero or one HTTPS connectors. dbms.connector.https.enabled=true dbms.connector.https.listen_address=0.0.0.0:7473
Step 5 : Access Neo4j from your browser
You can now access your Neo4j from your browser. Don’t forget to change bolt protocol port number into public port number as discussed in step 3.
— end of note —