Configuration File

HarperDB is configured through a settings file located at HDB_HOME/config/settings.js. Any modifications to this file will not take effect until HarperDB is restarted. Note, null or empty values will be ignored or interpreted as false where appropriate.

settings.js Values

KeywordDefault ValueExample ValueDescription
HDB_ROOT$HOME/hdb/home/user_name/hdbThe directory selected during install where the database files reside.
SERVER_PORT99259925The port the HarperDB REST interface will listen on.
CERTIFICATE$HOME/hdb/keys/certificate.pem/home/user_name/hdb/keys/certificate.pemThe path to the SSL certificate used when running with HTTPS enabled.
PRIVATE_KEY$HOME/hdb/keys/privateKey.pem/home/user_name/hdb/keys/privateKey.pemThe path to the SSL private key used when running with HTTPS enabled.
HTTPS_ONfalsefalseSet to true to enable HTTPS on the HarperDB REST endpoint. Requires a valid certificate and key. If false, HarperDB will run using standard HTTP.
CORS_ONtruetrueSet to true to enable Cross Origin Resource Sharing, which allows requests across a domain.,,google.comAllows for setting allowable domains with CORS. Comma separated list.
SERVER_TIMEOUT_MS120000120000Length of time in milliseconds after which a request will timeout. Defaults to 120,000 ms (2 minutes).
SERVER_KEEP_ALIVE_TIMEOUT50005000The number of milliseconds of inactivity a server needs to wait for additional incoming data, after it has finished writing the last response. Defaults to 5,000 ms (5 seconds).
SERVER_HEADERS_TIMEOUT6000060000Limit the amount of time the parser will wait to receive the complete HTTP headers.. Defaults to 60,000 ms (1 minute).
LOG_TO_FILEtruetrueDefine whether to log to a file or not.
LOG_TO_STDSTREAMSfalsefalseDefine whether to log to stdout/stderr or not. NOTE HarperDB must run in foreground in order to receive the std stream from HarperDB.
LOG_LEVELerrorwarnSet to control amount of logging generated. Accepted levels are trace, debug, warn, error, fatal.
LOG_PATH$HOME/hdb/log/hdb_log.log/home/user_name/hdb/log/hdb_log.logThe path where log files will be written. If there is no file name included in the path, the log file will be created by default as 'hdb_log.log'
LOG_DAILY_ROTATEfalseSet to true to enable daily log file rotations - each log file name will be prepended with YYYY-MM-DD.
LOG_MAX_DAILY_FILES7Set the number of daily log files to maintain when LOG_DAILY_ROTATE is enabled. If no integer value is set, no limit will be set for daily log files which may consume a large amount of storage depending on your log settings.
NODE_ENVproductionproductionThe environment used by NodeJS. Setting to production will be the most performant, settings to development will generate more logging.
ALLOW_SELF_SIGNED_SSL_CERTSfalsefalseThis allows self signed certificates to be used in clustering. This is a security risk as clustering will not validate the cert, so should only be used internally. The HDB install creates a self signed certificate, if you use that cert this must be set to true.
MAX_HDB_PROCESSES(The number of cores available on your machine)8Set the max number of processes HarperDB will start. This can also be limited by number of cores and licenses.
CLUSTERINGfalsetrueSet to true to enable clustering. Requires a valid enterprise license.
CLUSTERING_PORT111112345The port that will be used for HarperDB clustering.
NODE_NAMEedge_node_5The name of this node in your HarperDB cluster topology. This must be a value unique from the rest of your cluster node names.
CLUSTERING_USERcluster_userThe user used to connect to other instances of HarperDB, this user must have a role of cluster_user.
DISABLE_TRANSACTION_LOGfalsefalseDefines if this instance does not record transactions. Note, if Clustering is enabled and Transaction Log is disabled your nodes will not catch up.
OPERATION_TOKEN_TIMEOUT1d1dDefines the length of time an operation token will be valid until it expires. Example values:
REFRESH_TOKEN_TIMEOUT30d30dDefines the length of time a refresh token will be valid until it expires. Example values:
IPC_SERVER_PORT93839383The port the IPC server will run on.
RUN_IN_FOREGROUNDfalsefalseRun HDB in the foreground.
CUSTOM_FUNCTIONSfalsetrueSet to true to enable custom API endpoints. Requires a valid enterprise license.
CUSTOM_FUNCTIONS_PORT99269926The port used to access the custom functions server.
CUSTOM_FUNCTIONS_DIRECTORY$HOME/hdb/custom_functions/home/user_name/hdb/custom_functionsThe path to the folder containing HarperDB custom function files.
MAX_CUSTOM_FUNCTION_PROCESSES(The number of cores available on your machine)12Set the max number of processes HarperDB will start for the Custom Functions server.
MAX_CLUSTERING_PROCESSES11Set the max number of processes HarperDB will start for the Clustering Server.
LOCAL_STUDIO_ONfalsetrueEnable the route which allows for accessing the Studio from this instance of HarperDB (true) or not (false).
STORAGE_WRITE_ASYNCfalsetrueEnable the LMDB asynchonous writes. This will have faster write performance at the expense of not being crash safe. The default for this setting is false, which results in HarperDB being crash safe.