Connecting neo4j database to structr

Hi, neo4j community,
I´d like to know if there is a procedure to connect a neo4j database to structr. Do you know if the user and password must have the default parameters (user:neo4j/password:neo4j) to avoid issues during the connection?

it should connect to any neo4j database that's reachable from the server running structr.

Just use the credentials (user e.g. neo4j and the configured password not "neo4j" !)

@pquiroga

you would typically see in /usr/lib/structr/structr.conf

database.driver.mode = remote
database.connection.url = bolt://192.168.1.1:7687
database.connection.password = football
1 Like

Hi Dana,

Thanks for your prompt reply.
I followed your instructions, but I got an error

2021-05-13 10:07:41.574 [main] ERROR org.structr.core.Services - Vital service NodeService failed to start, aborting. Vital service NodeService failed to start, aborting.

I had the following connection information in neo4j
user: neo4j
bolt://localhost:7687

Should I change localhost for my IP in the structr.conf file?
Do I need to configure something beforehand in neo4j to make the database accessible?

Thank you Dana

@pquiroga

does your structr.conf have the 3 similar lines to my last post?

@dana.canzano
No, my structr.conf file had the following lines:
setup.wizard.completed = true
database.available.connections =
database.result.fetchsize = 10000
application.encryption.secret =
superuser.password = admin

I added the lines to connect with neo4j

Structr had some changes made in recent versions with the database connection management.

With version >3.5 you can add more than one database configuration in your configuration file, so there are a few more entries you have to add.
database.available.connections = default
default.database.connection.name = default
default.database.driver = org.structr.bolt.BoltDatabaseService
default.database.connection.url = bolt://localhost:7687
default.database.connection.username = neo4j
default.database.connection.password = password

Here you can find a bit more information about the configuration https://docs.structr.com/docs/configuration-settings#database-connections

If you're connection to a new database, Structr will set the initial password to the value you set in the structr.conf file.

And you have to keep an eye on the Structr and Neo4j version. Structr 3.x is compatible to Neo4j <4.0. The new Structr release 4.0 will be able to connect to the latest Neo4j versions.

2 Likes