Optimizely will be sunsetting Full Stack Experimentation on July 29, 2024. See the recommended Feature Experimentation migration timeline and documentation.

Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunitySumbit a ticketLog In
GitHubNuGetDev CommunitySumbit a ticket

Configure Optimizely Agent

This topic gives an overview of how to configure Optimizely Agent and includes a comprehensive list of available configuration properties.

By default Optimizely Agent uses the configuration file in the current active directory, e.g., ./config.yaml. You can override the default configuration by providing a yaml configuration file at runtime.

You can specify alternative configuration locations at runtime via an environment variable or command line flag:

OPTIMIZELY_CONFIG_FILENAME=config.yaml make run

Below is a comprehensive list of available configuration properties.

Property NameEnvironment VariableDescription
admin.auth.clientsN/ACredentials for requesting access tokens. See: Authorization Guide.
admin.auth.hmacSecretsOPTIMIZELY_ADMIN_AUTH_HMACSECRETSSigning secret for issued access tokens. See: Authorization Guide.
admin.auth.jwksUpdateIntervalOPTIMIZELY_ADMIN_AUTH_JWKSUPDATEINTERVALJWKS Update Interval for caching the keys in the background. See: Authorization Guide.
admin.auth.jwksURLOPTIMIZELY_ADMIN_AUTH_JWKSURLJWKS URL for validating access tokens. See: Authorization Guide.
admin.auth.ttlOPTIMIZELY_ADMIN_AUTH_TTLTime-to-live of issued access tokens. See: Authorization Guide.
admin.portOPTIMIZELY_ADMIN_PORTAdmin listener port. Default: 8088
api.auth.clientsN/ACredentials for requesting access tokens. See: Authorization Guide.
api.auth.hmacSecretsOPTIMIZELY_API_AUTH_HMACSECRETSSigning secret for issued access tokens. See: Authorization Guide.
api.auth.jwksUpdateIntervalOPTIMIZELY_API_AUTH_JWKSUPDATEINTERVALJWKS Update Interval for caching the keys in the background. See: Authorization Guide.
api.auth.jwksURLOPTIMIZELY_API_AUTH_JWKSURLJWKS URL for validating access tokens. See: Authorization Guide.
api.auth.ttlOPTIMIZELY_API_AUTH_TTLTime-to-live of issued access tokens. See: Authorization Guide.
api.maxConnsOPTIMIZELY_API_MAXCONNSMaximum number of concurrent requests
api.portOPTIMIZELY_API_PORTApi listener port. Default: 8080
authorOPTIMIZELY_AUTHORAgent author. Default: Optimizely Inc.
client.batchSizeOPTIMIZELY_CLIENT_BATCHSIZEThe number of events in a batch. Default: 10
client.flushIntervalOPTIMIZELY_CLIENT_FLUSHINTERVALThe maximum time between events being dispatched. Default: 30s
client.pollingIntervalOPTIMIZELY_CLIENT_POLLINGINTERVALThe time between successive polls for updated project configuration. Default: 1m
client.queueSizeOPTIMIZELY_CLIENT_QUEUESIZEThe max number of events pending dispatch. Default: 1000
config.filenameOPTIMIZELY_CONFIG_FILENAMELocation of the configuration YAML file. Default: ./config.yaml
disabledCiphersOPTIMIZELY_DISABLEDCIPHERSList of TLS ciphers to disable when accepting HTTPS connections
log.levelOPTIMIZELY_LOG_LEVELThe log level for the agent. Default: info
log.prettyOPTIMIZELY_LOG_PRETTYFlag used to set colorized console output as opposed to structured JSON logs. Default: false
nameOPTIMIZELY_NAMEAgent name. Default: optimizely
sdkKeysOPTIMIZELY_NAMEList of SDK keys used to initialize on startup
server.certfileOPTIMIZELY_SERVER_CERTFILEPath to a certificate file, used to run Agent with HTTPS
server.keyfileOPTIMIZELY_SERVER_KEYFILEPath to a key file, used to run Agent with HTTPS
server.readTimeoutOPTIMIZELY_SERVER_READTIMEOUTThe maximum duration for reading the entire body. Default: 5s
server.writeTimeoutOPTIMIZELY_SERVER_WRITETIMEOUTThe maximum duration before timing out writes of the response. Default: 10s
versionOPTIMIZELY_VERSIONAgent version. Default: git describe --tags
webhook.portOPTIMIZELY_WEBHOOK_PORTWebhook listener port: Default: 8085
webhook.projects.<projectId>.sdkKeysN/AComma delimited list of SDK keys applicable to the respective projectId
webhook.projects.<projectId>.secretN/AWebhook secret used to validate webhook requests originating from the respective projectId
webhook.projects.<projectId>.skipSignatureCheCkN/ABoolean to indicate whether the signature should be validated.

To use a PROXY Server, the following environment variables can be used:

Environment variableDescription
HTTP_PROXYHttp URL of the proxy server to use for every request.
HTTPS_PROXYHttps URL of the proxy server to use for every request. It takes precedence over HTTP_PROXY for https requests.
NO_PROXYDefines that no proxy should be used.

The environment values may be either a complete URL or a host[:port], in which case the http scheme is assumed. The schemes http, https, and socks5 are supported. To read more about proxy configurations, See Go's net/http.