Remote connection to Neo4j server

前端 未结 6 1330
我寻月下人不归
我寻月下人不归 2021-02-13 01:09

I believe the way to creating a remote connection is by changing this line in conf/neo4j-server.properties, specifically by removing the comment and restarting the

相关标签:
6条回答
  • 2021-02-13 01:10

    Also if you have ssh access to remote server with neo4j you can setup ssh tunnel to access it via localhost:

    ssh -NfL localhost:7474:localhost:7474 -L localhost:7687:localhost:7687 yourname@yourhost
    

    then type in browser:

    localhost:7474
    
    0 讨论(0)
  • 2021-02-13 01:13

    I think there's some confusion here. That configuration property org.neo4j.server.webserver.address is about which IP address the server you're starting listens on for external connections. Relevant documentation is here.

    It seems you're asking how to configure your database to talk to a remote database. I don't think you can do that. Rather, by editing that file you're planning on running a database on the host where that file is. Your local database on that host will write files to wherever the org.neo4j.server.database.location configuration parameter points.

    A remote connection is something that the neo4j shell might establish, or that you browser might make to a foreign server running neo4j; but you don't establish that sort of remote connection by editing that file. Hopefully this helps.

    0 讨论(0)
  • 2021-02-13 01:22

    in 3.0:

    ##### To have HTTP accept non-local connections, uncomment this line
    dbms.connector.http.address=0.0.0.0:7474
    
    0 讨论(0)
  • 2021-02-13 01:26

    By setting

    org.neo4j.server.webserver.address=0.0.0.0
    

    enables Neo4j on all network interfaces.

    The remainder of that reply is not Neo4j related at all - it's regular networking. Double check if port 7473 (and/or 7474) are not blocked neither be a locally running firewall nor by your router. You local IP 192.168.0.14 indicates you're behind a router doing NAT. Therefore you have to setup a port forwarding in your router for the ports mentioned above.

    Please be aware that this is potentially dangerous since everyone knowing your external IP can access your Neo4j instance. Consider using either https://github.com/neo4j-contrib/authentication-extension or use a VPN in favour of port forwarding.

    0 讨论(0)
  • 2021-02-13 01:30
    With default configuration Neo4j only accepts local connections
    

    In neo4j-community-3.1.0 edit conf/neo4j.conf file and uncomment the following to accept non-local connections

    dbms.connectors.default_listen_address=0.0.0.0
    
    0 讨论(0)
  • 2021-02-13 01:33

    Confused myself with the setting. Anyone who has the same problem, 0.0.0.0 just means “this server isn’t local any more” and so to access it you use the public IP address of the computer that’s hosting the Neo4j server.

    Just make sure that the ports you set in the server properties (default are 7474 and 7473) are open for incoming connections on your router/firewall etc.

    0 讨论(0)
提交回复
热议问题