Skip to main content

Configuration

AliveDB can be configured using command line args or env vars. Command line args takes precedence over env vars. Alternative to env vars, a .env file may also be specified.

General

ArgumentEnv VarDescriptionDefault
--data_dirALIVEDB_DATA_DIRDirectory for GunDB databaseradata
--peersALIVEDB_PEERSList of bootstrap peers (comma-seperated)
--http_portALIVEDB_HTTP_PORTHTTP port3006
--gun_portALIVEDB_GUN_PORTGun P2P port3007
--chat_listenerALIVEDB_CHAT_LISTENERStream link for AliveDB chat participant auto-authorization. Format: network/username/link
--login_idALIVEDB_LOGIN_IDUser ID for login on startup
--login_pubALIVEDB_LOGIN_PUBPublic key for login on startup
--login_passwordALIVEDB_LOGIN_PASSWORDPassword for login on startup
note

login_pub will be ignored if login_id is specified.

Token Auth

ArgumentEnv VarDescriptionDefault
--require_access_tokenALIVEDB_REQUIRE_ACCESS_TOKENRequire access token for push streams. Useful for public endpoints.false
--hive_apiALIVEDB_HIVE_APIHive API node used for token auth
--auth_timeout_blocksALIVEDB_AUTH_TIMEOUT_BLOCKSRequired recency (in blocks)20
--auth_identifierALIVEDB_AUTH_IDENTIFIERAuth identifier stringalivedb_login
--auth_token_expiryALIVEDB_AUTH_TOKEN_EXPIRYAccess token validity period (in seconds)86400
note

auth_identifier should ideally be unique to your service.