Skip to content

Configuration Management

Neuron supports modifying Neuron's configuration parameters through command line, environment variables, and configuration files, which can provide a more flexible way of starting and running. If command line, environment variable, and configuration file are configured at the same time, the priority relationship between the three is: command line > environment variable > configuration file

Command Line

cli_info

Environment Variables

Neuron supports reading environment variables during the startup process to configure startup parameters. The currently supported environment variables are as follows:

Configuration nameConfiguration function
NEURON_DAEMONSet to 1, the Neuron daemon runs; set to 0, Neuron runs normally
NEURON_LOGSet to 1, Neuron Log outputs to standard output stdout; set to 0, Neuron Log does not output to standard output stdout;
NEURON_LOG_LEVELNeuron log output level, can be set to DEBUG or NOTICE
NEURON_RESTARTNeuron restart settings, which can be set to never, always, on-failure or NUMBER (1, 2, 3, 4)
NEURON_DISABLE_AUTHSet to 1, Neuron turns off Token authentication and authentication; set to 0, Neuron turns on Token authentication and authentication
NNEURON_CONFIG_DIRNeuron configuration file directory
NEURON_PLUGIN_DIRNeuron plug-in file directory

Configuration File

Neuron provides json format configuration files to configure Neuron-related personalized parameters. Currently, it supports three configuration items: ip, port and disable_auth. The configuration file path is the neuron installation directory config/neuron.json. The default configuration content is as follows:

json
{
    "ip": "0.0.0.0",
    "port": 7000,
    "disable_auth": 0
}