Why Neo4J docker authentication doesn't work
Neo4j docker developer here.
The reason this is happening is that the NEO4J_AUTH
environment variable doesn't set the database password, it sets the INITIAL password only.
If you're mounting a data volume with an existing database inside, then NEO4J_AUTH
has no effect because that database already has a password. It sounds like that's what you're experiencing here.
The documentation around this feature was not great and I've updated it! See: Neo4j docker authentication documentation
define Neo4j password with docker-compose
neo4j: image: 'neo4j:4.1' environment: NEO4J_AUTH: 'neo4j/your_password' ports: - "7474:7474" volumes: ...