speedy1034
speedy1034

Reputation: 302

Start neo4j server with other configuration file

I try to start neo4j on OSX and change the chosen configuration file. I'd like to start a test server for unit tests with a different port and a database, which shall be deleted while startup (I will solve the deletion part in a shell script, which should stop and start the server).

My problem is neo4j ignores the configuration file from the parameter. My call looks like this (from the terminal and the current folder is bin:

./neo4j start -server -Dorg.neo4j.server.properties=conf/neo4j-server-test.properties

The default configuration file is still chosen.

Thanks for your help

Upvotes: 1

Views: 1374

Answers (3)

Quentin
Quentin

Reputation: 1037

You can specify the path to a folder containing a customized configuration file with an environment variable:

NEO4J_CONF=../conf neo4j start

Upvotes: 1

Carlos Forero
Carlos Forero

Reputation: 411

You can use ineo to manage two or more Neo4j instances:

https://github.com/cohesivestack/ineo

Upvotes: 1

Jim Biard
Jim Biard

Reputation: 2272

There are no 'ad hoc' arguments to the neo4j command script, so your arguments after start are ignored. You need to either make a modified version of the neo4j command script, or swap out neo4j-server.properties files.

Upvotes: 2

Related Questions