neo4j-browser change bolt port for docker container

Viewed 1504

I trying to startup a neo4j container for test data and use a separate bolt port.

docker run --env=NEO4J_AUTH=none
--env=NEO4J_dbms_security_procedures_unrestricted=apoc.\\\*
--publish=7475:7474 --publish=7688:7687
--volume=$HOME/neo4j/conf-test:/conf
--volume=$HOME/neo4j/test-data:/data
--volume=$HOME/neo4j/plugins:/plugins
--name=neo4j-test neo4j

In $HOME/neo4j/conf-test/neo4j.conf file I have tried:

dbms.connector.bolt.listen_address=:7688 # doesn't do anything
dbms.connector.bolt=:7688 # error also error with =7688
dbms.connector.bolt.address=0.0.0.0:7688 # does nothing

When I open my browser to http://localhost:7475/browser/ it tries to connect to 7687 enter image description here

I use :server connect command to connect but it doesn't save the setting; though it connects fine. Everytime I refresh I have to enter them again.

Any thoughts?

2 Answers

I couldn't get this working with a config file since the docker container kept overwriting the file with its own settings.

Trick for me was to note that the listen_address and advertised_address variables require a double underscore:-

docker run \ -e NEO4J_dbms_connector_bolt_listen__address=:7688 \ -e NEO4J_dbms_connector_bolt_advertised__address=:7688 \ --rm \ --name neo4j \ --publish=7575:7474 \ --publish=7688:7687 \ neo4j

2018-02-07 11:33:34.593+0000 INFO Bolt enabled on 0.0.0.0:7688.

This got me running on the correct port!

Related