Skip to main content

Environment Variable

The meanings of the environment variables used in the HAP Server container are as follows:

Environment VariableDescription
ENV_SERVERIDInstance number. Each instance cannot be the same, starting from 1 (lite/standard clusters only)
ENV_MINGDAO_PROTOProtocol. Support setting http or https
ENV_MINGDAO_HOSTAccess address, such as hap.domain.com (if you want to use a domain name, please configure a proxy first)
ENV_MINGDAO_PORTPort, such as 80
ENV_MINGDAO_SUBPATHSubpath, such as https://www.domain.com/hap, then set to /hap
ENV_MINGDAO_INTRANET_ENDPOINTThe corresponding intranet address of ENV_MINGDAO_HOST:ENV_MINGDAO_PORT, such as 192.168.1.1:8880, which needs to be configured in cluster mode
ENV_MINGDAO_WORKWXAPIWeCom API interface host. It defaults to https://qyapi.weixin.qq.com. If you are using the private deployment version of WeCom, you can modify this parameter
ENV_MINGDAO_FEISHUAPIFeiShu API interface host. It defaults to https://open.feishu.cn/open-apis. If you are using the private deployment version of FeiShu, you can modify this parameter
ENV_DOCPREVIRE_ENDPOINTSThe address of the file preview service. It defaults to doc:8000. If there are multiple instances in cluster mode, separate them with English commas
ENV_WEB_ENDPOINTSWeb front-end site address (required in secondary development scenarios), such as 192.168.1.1:81,192.168.1.1:82
ENV_MONGODB_URIMongoDB connection address, such as mongodb://192.168.1.1:27017,192.168.1.2:27017,192.168.1.3:27017
ENV_MONGODB_OPTIONSMongoDB uri parameters, starting with [?]
ENV_MONGODB_CACHEGBMongoDB's allowed maximum memory usage
ENV_MYSQL_HOSTMySQL address, such as 192.168.2.1 [VIP]
ENV_MYSQL_PORTThe MySQL port. It defaults to 3306
ENV_MYSQL_USERNAMEMySQL username. It defaults to root
ENV_MYSQL_PASSWORDMySQL password. It can be empty and defaults to 123456
ENV_REDIS_HOST[Redis master-slave or standalone mode] Redis address, e.g., 192.168.3.1 [VIP]
ENV_REDIS_PORT[Redis master-slave or standalone mode] Redis port, default: 6379
ENV_REDIS_PASSWORD[Redis master-slave or standalone mode] Redis password, can be empty, default: 123456
ENV_REDIS_MAXMEMORY[Redis Standalone Mode] Maximum allowed memory usage, e.g. 5gb. If it is over that, use the LRU algorithm to clean it up. No limit by default
ENV_REDIS_SENTINEL_ENDPOINTS[Redis Sentinel mode] Sentinel addresses. If there are more than one, separate them with English commas.
ENV_REDIS_SENTINEL_MASTER[Redis Sentinel Mode] Master name
ENV_REDIS_SENTINEL_PASSWORD[Redis Sentinel Mode] Connection password
ENV_KAFKA_ENDPOINTSKafka connection addresses, such as 192.168.1.4:9092,192.168.1.5:9092,192.168.1.6:9092
ENV_KAFKA_SECURITY_PROTOCOLKafka security protocol, supports Plaintext(default) and SaslPlaintext
ENV_KAFKA_SASL_MECHANISMOnly used when ENV_KAFKA_SECURITY_PROTOCOL is SaslPlaintext, fixed value:PLAIN
ENV_KAFKA_SASL_USERNAMEOnly used when ENV_KAFKA_SECURITY_PROTOCOL is SaslPlaintext, Authentication username
ENV_KAFKA_SASL_PASSWORDOnly used when ENV_KAFKA_SECURITY_PROTOCOL is SaslPlaintext, Authentication password
ENV_ELASTICSEARCH_ENDPOINTSElasticsearch connection addresses, such as 192.168.1.4:9200,192.168.1.5:9200,192.168.1.6:9200
ENV_ELASTICSEARCH_PASSWORDElasticsearch connection authentication. It can be empty with the format of username:password
ENV_FILE_ENDPOINTSFile storage service addresses, such as 192.168.1.12:9000,192.168.1.13:9000,192.168.1.14:9000,192.168.1.15:9000
ENV_FILE_ACCESSKEYFile Storage Service ACCESSKEY
ENV_FILE_SECRETKEYFile Storage Service SECRETKEY
ENV_FILECACHE_EXPIREService of thumbnail cache, expired or not. It defaults to true
ENV_FILE_DELETE_ENABLE_PHYSICALIs file physical deletion enabled? Default: false
ENV_FILE_DELETE_BEFORE_DAYSOnly used when ENV_FILE_DELETE_ENABLE_PHYSICAL is true, How many days ago were files physically deleted, default: 7
ENV_FILE_DELETE_TASK_CRONOnly used when ENV_FILE_DELETE_ENABLE_PHYSICAL is true, Timed authentication execution time, default: 0 0 1 * * ? Every day at 1am
ENV_FILE_UPLOAD_TOKEN_EXPIRE_MINUTESExpiration time of token for file uploading, in minutes, default: 120
ENV_FILE_DOWNLOAD_TOKEN_EXPIRE_MINUTESExpiration time of token for file downloading, in minutes, default: 60
ENV_FLINK_URLFlink connection address
ENV_FRAME_OPTIONSIFrame referencing policy. It supports ALLOWALL, SAMEORIGIN [default], DENY and ALLOW-FROM uri
ENV_WEB_ENDPOINTSFront-end service address. If there are more than one, separate them with English commas
ENV_CDN_URICDN address, such as http://hapcdn.domain.com
ENV_WORKFLOW_CONSUMER_THREADSThe consuming thread of the message queue in the workflow. It defaults to 3
ENV_WORKFLOW_ROUTER_CONSUMER_THREADSThe consuming thread of the slow message queue in the workflow. It defaults to 3
ENV_WORKFLOW_WEBHOOK_TIMEOUTThe timeout for the Webhook execution interface in the workflow, in seconds. It defaults to 10
ENV_WORKFLOW_COMMAND_TIMEOUTThe timeout for the execution of the code block in the workflow, in seconds. It defaults to 10
ENV_WORKFLOW_COMMAND_MAXMEMORYThe maximum memory for the code block execution in the workflow, in M. It defaults to 64
ENV_WORKFLOW_GRPC_TIMEOUTThe timeout duration for calling other service interfaces in the workflow service, default: 180, unit: seconds
ENV_WORKFLOW_PARALLELISM_THREADSThe size of the parallel consumption thread pool in the workflow, in seconds. It defaults to 10
ENV_WORKFLOW_TRIGER_DELAY_SECONDSThe delay of the workflow triggered by the worksheet event, in seconds. It defaults to 5
ENV_WORKFLOW_IP_BLOCKLISTWorkflow sending custom requests, Data integration API calling external interfaces, IP blacklisting, if more than one, separated by English commas
ENV_WORKSHEET_EXCEL_IMPORT_THREADSProcessing threads for importing Excel into worksheet, default: 3
ENV_WORKSHEET_REFRESH_ROWS_MINUTESCalibration interval for data in worksheet, default: 120
ENV_WORKSHEET_CONSUMER_THREADSConsumer threads of worksheet, default: 2
ENV_SESSION_TIMEOUT_MINUTESExpiration time of session, in minutes, default: 10080
ENV_SESSION_DISABLE_REFRESHWhether to automatically refresh the session's expiration time when active, default: ENV_SESSION_TIMEOUT_MINUTES
ENV_SESSION_PORTAL_TIMEOUT_MINUTESExpiration time of sessions in external portal, in minutes, default: 10080
ENV_WPS_CONVERT_APPIDWPS PDF Conversion Service appId
ENV_WPS_CONVERT_APPSECRETWPS PDF Conversion Service appSecret
ENV_WPS_PREVIEW_APPIDWPS Document Preview Service appId
ENV_WPS_PREVIEW_APPSECRETWPS Document Preview Service appSecret
ENV_OCR_SECRETIDTencent Cloud General OCR Service secretId
ENV_OCR_SECRETKEYTencent Cloud General OCR Service secretKey
ENV_OCR_SENDFILEWhether to send files in base64 encoding. Default: false. Tencent Cloud reads files via file address of HAP
ENV_OCR_API_PROXYWhether to enable forward proxy calls to the interface of Tencent Cloud General OCR Service
ENV_SOCKET_POLLINGWhether to use polling mode for socket connections, default: false (long connections)