Miguel FD
Miguel FD

Reputation: 15

Use a local Neo4j database

I'm developing an Android App using a local Neo4j database. I've connected them using the REST API with an HTTP connection. My problem is that it only works property if the device where the app is runnig and the computer where the database is hosted are in the same local network. If I disconnect the devide from the WiFi network, the connection doesn't work.

Is there any way to solve it?

What ip adress and port should I use? Now, I'm using the ip of the computer where the DB is hosted (cmd -> ipconfig).

I'm using Windows 10 and Neo4j Community Edition 3.2.2

Upvotes: 1

Views: 505

Answers (2)

Swapnil
Swapnil

Reputation: 131

If you are using private ip of neo4j server to connect from outside the local network, it will not work. If you want to access it from outside the network let say your server is in home network and your client is in office network then consider using Dynamic DNS. Other option is to find out the public IP assigned to your router by ISP and use port forwarding but beware that both public IP assigned by ISP to router and internal IP assigned to devices in that network can change if dynamic.

Upvotes: 1

Sergio La Rosa
Sergio La Rosa

Reputation: 495

You can access Neo4j remotely and Neo4j website explain this very well here.

The key is uncomment and change a single row in the neo4j.conf file:

dbms.connector.https.address=0.0.0.0:7473 

The '0.0.0.0' address will allow remote connections.

Also, be sure to check you router port-firewall setup: you must allow incoming connection to the port 7473 or use port-forwarding (if you decided to change default Neo4j port).

Upvotes: 2

Related Questions