Skip to main content

Configuration file

The Infrahub containers have a number of environmental variables available at runtime to affect their behavior.

Usage

Here are a few common methods of setting environmental variables:

  • Exporting in a shell, example: export INFRAHUB_ADDRESS="http://localhost:8000"
  • Using a .env file
  • Using direnv
note

infrahubctl has it's own environmental variables. See the infrahubctl documentation for more information.

Infrahub environmental variables

NameDescriptionExampleAlias
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
DB_TYPE
INFRAHUB_ADDRESS"HTTP endpoint of the API Server, used by the git agent for internal communication"http://infrahub-server:8000
INFRAHUB_ALLOW_ANONYMOUS_ACCESSIndicates if the system allows anonymous read accessTRUE
INFRAHUB_ANALYTICS_ADDRESS
INFRAHUB_ANALYTICS_API_KEY
INFRAHUB_ANALYTICS_ENABLE
INFRAHUB_API_CORS_ALLOW_CREDENTIALS"If True, cookies will be allowed to be included in cross-site HTTP requests"
INFRAHUB_API_CORS_ALLOW_HEADERSThe list of non-standard HTTP headers allowed in requests from the browser
INFRAHUB_API_CORS_ALLOW_METHODSA list of HTTP verbs that are allowed for the actual request
INFRAHUB_API_CORS_ALLOW_ORIGINSA list of origins that are authorized to make cross-site HTTP requests
INFRAHUB_BROKER_ADDRESSmessage-queue
INFRAHUB_BROKER_DRIVER
INFRAHUB_BROKER_ENABLE
INFRAHUB_BROKER_MAXIMUM_CONCURRENT_MESSAGESThe maximum number of concurrent messages fetched by each worker
INFRAHUB_BROKER_MAXIMUM_MESSAGE_RETRIESThe maximum number of retries that are attempted for failed messages
INFRAHUB_BROKER_NAMESPACE
INFRAHUB_BROKER_PASSWORDinfrahub
INFRAHUB_BROKER_PORTSpecified if running on a non default port.
INFRAHUB_BROKER_TLS_CA_FILEFile path to CA cert or bundle in PEM format
INFRAHUB_BROKER_TLS_ENABLEDIndicates if TLS is enabled for the connection
INFRAHUB_BROKER_TLS_INSECUREIndicates if TLS certificates are verified
INFRAHUB_BROKER_USERNAME
INFRAHUB_BROKER_VIRTUALHOSTThe virtual host to connect to
INFRAHUB_CACHE_ADDRESScache
INFRAHUB_CACHE_DATABASEId of the database to use
INFRAHUB_CACHE_DRIVER
INFRAHUB_CACHE_ENABLE
INFRAHUB_CACHE_PASSWORD
INFRAHUB_CACHE_PORTSpecified if running on a non default port (6379)6379
INFRAHUB_CACHE_TLS_CA_FILEFile path to CA cert or bundle in PEM format
INFRAHUB_CACHE_TLS_ENABLEDIndicates if TLS is enabled for the connection
INFRAHUB_CACHE_TLS_INSECUREIndicates if TLS certificates are verified
INFRAHUB_CACHE_USERNAME
INFRAHUB_CONFIGLocation of the configuration file for Infrahubinfrahub.toml
INFRAHUB_DB_ADDRESSdatabase
INFRAHUB_DB_DATABASEName of the database
INFRAHUB_DB_MAX_DEPTH_SEARCH_HIERARCHYMaximum number of level to search in a hierarchy.
INFRAHUB_DB_PASSWORD
INFRAHUB_DB_PORT
INFRAHUB_DB_PROTOCOL
INFRAHUB_DB_QUERY_SIZE_LIMITThe max number of records to fetch in a single query before performing internal pagination.
INFRAHUB_DB_RETRY_LIMITMaximum number of times a transient issue in a transaction should be retried.
INFRAHUB_DB_TLS_CA_FILEFile path to CA cert or bundle in PEM format
INFRAHUB_DB_TLS_ENABLEDIndicates if TLS is enabled for the connection
INFRAHUB_DB_TLS_INSECUREIndicates if TLS certificates are verified
INFRAHUB_DB_TYPEneo4j
INFRAHUB_DB_USERNAME
INFRAHUB_DOCS_INDEX_PATHFull path of saved json containing pre-indexed documentation
INFRAHUB_EXPERIMENTAL_GRAPHQL_ENUMS
INFRAHUB_EXPERIMENTAL_PULL_REQUEST
INFRAHUB_INITIAL_ADMIN_PASSWORDThe initial password for the admin user
INFRAHUB_INITIAL_ADMIN_TOKENThe initial password for the admin user
INFRAHUB_INITIAL_AGENT_PASSWORDThe initial password for the agent user
INFRAHUB_INITIAL_AGENT_TOKENThe initial password for the agent user
INFRAHUB_INITIAL_DEFAULT_BRANCH"Defines the name of the default branch within Infrahub, can only be set once during initialization of the system."
INFRAHUB_INTERNAL_ADDRESShttp://infrahub-server:8000
INFRAHUB_LOG_LEVEL"Set the level of the log to print in the console: info, debug, warning"INFO
INFRAHUB_LOGGING_REMOTE_API_SERVER_DSN
INFRAHUB_LOGGING_REMOTE_ENABLE
INFRAHUB_LOGGING_REMOTE_FRONTEND_DSN
INFRAHUB_LOGGING_REMOTE_GIT_AGENT_DSN
INFRAHUB_MISC_MAXIMUM_VALIDATOR_EXECUTION_TIMEThe maximum allowed time (in seconds) for a validator to run.
INFRAHUB_MISC_PRINT_QUERY_DETAILS
INFRAHUB_MISC_START_BACKGROUND_RUNNER
INFRAHUB_PRODUCTION"Enable or disable the production mode, in production mode the logs are generated in JSON format"FALSE
INFRAHUB_SECURITY_ACCESS_TOKEN_LIFETIMELifetime of access token in seconds
INFRAHUB_SECURITY_REFRESH_TOKEN_LIFETIMELifetime of refresh token in seconds
INFRAHUB_STORAGE_BUCKET_NAMEinfrahub-dataAWS_S3_BUCKET_NAME
INFRAHUB_STORAGE_CUSTOM_DOMAINAWS_S3_CUSTOM_DOMAIN
INFRAHUB_STORAGE_DEFAULT_ACLAWS_DEFAULT_ACL
INFRAHUB_STORAGE_ENDPOINT_URLAWS_S3_ENDPOINT_URL
INFRAHUB_STORAGE_LOCAL_PATH/opt/infrahub/storage
INFRAHUB_STORAGE_QUERYTSTRING_AUTHAWS_QUERYSTRING_AUTH
INFRAHUB_STORAGE_USE_SSLAWS_S3_USE_SSL
INFRAHUB_STORAGE_DRIVERlocal
INFRAHUB_TRACE_ENABLEFALSE
INFRAHUB_TRACE_EXPORTER_ENDPOINTOTLP endpoint for exporting traces
INFRAHUB_TRACE_EXPORTER_PROTOCOLProtocol to be used for exporting traces
INFRAHUB_TRACE_EXPORTER_TYPEType of exporter to be used for tracing
INFRAHUB_TRACE_INSECURE"Use insecure connection (HTTP) if True, otherwise use secure connection (HTTPS)"
REPOSITORIES_DIRECTORY
SYNC_INTERVALTime (in seconds) between git repositories synchronizations