Installation Config

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.

settings.js Values

KeywordExample ValueDescription
HDB_ROOT/Users/user_name/hdbThe directory selected during install where the database files reside.
SERVER_PORT9925The port the HarperDB REST interface will listen on.
CERTIFICATE/Users/user_name/hdb/keys/certificate.pemThe path to the SSL certificate used when running with HTTPS enabled.
PRIVATE_KEY/Users/user_name/hdb/keys/privateKey.pemThe path to the SSL private key used when running with HTTPS enabled.
HTTPS_ONFALSESet to true to enable HTTPS on the HarperDB REST endpoint. Requires a valid certificate and key. If false, HarperDB will run using standard HTTP.
HTTP_ONTRUESet to true to have HarperDB run using standard HTTP.
CORS_ONTRUESet to true to enable Cross Origin Resource Sharing, which allows requests across a domain.
CORS_WHITELISTharperdb.io,postman.com,google.comAllows for setting allowable domains with CORS. Comma separated list.
SERVER_TIMEOUT_MS120000Length of time in milliseconds after which a request will timeout. Defaults to 120,000 ms (2 minutes).
SERVER_KEEP_ALIVE_TIMEOUT5000The 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_TIMEOUT60000Limit the amount of time the parser will wait to receive the complete HTTP headers.. Defaults to 60,000 ms (1 minute).
LOG_LEVELwarnSet to control amount of logging generated. Accepted levels are trace, debug, warn, error, fatal.
LOGGER1Setting LOGGER to 1 uses the WINSTON logger.
2 Uses the more performant PINO logger.
LOG_PATH/Users/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 (for WINSTON logger only).
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_ENVproductionThe environment used by NodeJS. Setting to production will be the most performant, settings to development will generate more logging.
ALLOW_SELF_SIGNED_SSL_CERTSfalseThis 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_PROCESSES8Set the max number of processes HarperDB will start. This can also be limited by number of cores and licenses.
CLUSTERINGtrueSet to true to enable clustering. Requires a valid enterprise license.
CLUSTERING_PORT12345The 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_LOGfalseDefines 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_TIMEOUT1dDefines the length of time an operation token will be valid until it expires. Example values: https://github.com/vercel/ms
REFRESH_TOKEN_TIMEOUT30dDefines the length of time a refresh token will be valid until it expires. Example values: https://github.com/vercel/ms