Sébastien M.
Sébastien M.

Reputation: 192

neo4j.conf custom location

When starting a neo4j server (version: 5.1.0) from the CLI, how to specify a neo4j.conf file, instead of having neo4j looking for configuration files in the default locations? (Default file locations).

neo4j start [relative_path]/neo4j.conf resulted in: Unmatched argument at index 1: '../../../config/neo4j.conf', while the expectation is that the specific neo4j.conf file is used.

Upvotes: 0

Views: 668

Answers (2)

Christophe Willemsen
Christophe Willemsen

Reputation: 20185

You can use the --help for the command to understand the arguments.

$ ./bin/neo4j --help
Usage: neo4j [-hV] [--expand-commands] [--verbose] [COMMAND]
A partial alias for 'neo4j-admin server'. Commands for working with DBMS process from 'neo4j-admin server' category can
be invoked using this command.
      --expand-commands   Allow command expansion in config value evaluation.
  -h, --help              Show this help message and exit.
  -V, --version           Print version information and exit.
      --verbose           Prints additional information.
Commands:
  version  Print version information and exit.
  help     Displays help information about the specified command
  console  Start server in console.
  restart  Restart the server daemon.
  start    Start server as a daemon.
  status   Get the status of the server.
  stop     Stop the server daemon.

Environment variables:
  NEO4J_CONF    Path to directory which contains neo4j.conf.
  NEO4J_DEBUG   Set to anything to enable debug output.
  NEO4J_HOME    Neo4j home directory.
  HEAP_SIZE     Set JVM maximum heap size during command execution. Takes a number and a unit, for example 512m.
  JAVA_OPTS     Used to pass custom setting to Java Virtual Machine executing the command. Refer to JVM documentation
about the exact format. This variable is incompatible with HEAP_SIZE and takes precedence over HEAP_SIZE.

So for providing a specific location for the neo4j.conf file you need to pass it as environment variable.

export NEO4J_CONF=/path/to/neo4j.conf && ./bin/neo4j start

Upvotes: 1

Ruturajsinh Rathod
Ruturajsinh Rathod

Reputation: 1

when you start database you can see right side 3 dots. inside that click on open folder > Configuration.

thanks

Upvotes: -1

Related Questions