Skip to main content

Configuration Files

taosX configuration is distributed across command-line arguments, environment variables, and TOML files for each process. A setting may be overridden at several layers. If a change does not take effect, first check which process actually started and which file it reads. Log and monitoring merges have their own exceptions.

Where to operate: configuration files, service startup arguments, and process environments on the hosts actually running the components.

Determine which process a setting affects before changing its entry point. Task parameters are not TOML configuration shared by every process. Changing environment variables in a terminal does not affect system services already running.

1. File Ownership​

ProcessDefault Linux fileDefault Windows fileScope
taosX/etc/taos/taosx.tomlC:\TDengine\cfg\taosx.tomlListeners, plugins, data and log paths, monitoring, backup directory policy, and resource budgets
taosX-Agent/etc/taos/agent.tomlC:\TDengine\cfg\agent.tomlProxy endpoints, token, proxy cache, and resource budgets
taosExplorer/etc/taos/explorer.tomlC:\TDengine\cfg\explorer.tomlWeb entry point and backend connections; does not replace taosX listener configuration
taosd/etc/taos/taos.cfgC:\TDengine\cfg\taos.cfgDatabase, management, and corresponding security parameters
taosKeeper/etc/taos/taoskeeper.tomlC:\TDengine\cfg\taoskeeper.tomlReceiving reports, target monitoring cluster, and database name

For custom installation paths, container mounts, or -c/--config, use the service's actual startup settings. In TOML, use single-quoted literals for Windows paths or escape backslashes in double-quoted strings. Do not copy C:\TDengine directly into an unescaped double-quoted string.

2. taosX Override Order​

note

A setting is generally resolved in this order: explicit command-line argument, corresponding process environment, TOML, then program default. However, log and monitoring merges have the exceptions below. Compare only mappings of the same parameter; do not treat different compatibility keys or settings for different processes as the same layer. Prefer [log] and avoid mixing legacy log keys.

Log merging has an exception: after defining log.loggers module rules in TOML, explicitly using command-line log parameters such as --log.level or --log.path may discard those module rules. Do not assume that only the specified fields are overridden. If module-level logging is required, keep all log settings in TOML and avoid command-line log overrides. After a change, check actual output as described in Logs and Performance, not just the file contents.

Monitoring configuration is another exception. The general order above does not mean the command line always overrides file configuration. After command-line parsing, monitoring values from layered configuration are merged again. A configured fqdn, a nonzero port, and an interval in the range 1–10 override earlier results at this stage. Keep all three monitoring settings in one entry point, remove conflicting values elsewhere, and inspect the startup log's global config for monitor.fqdn, monitor.port, and monitor.interval. To disable reporting, ensure that no entry point sets fqdn; an empty string is not equivalent to leaving it unset.

On Linux, an authorized account can run systemctl cat taosx and systemctl show taosx -p ExecStart -p Environment to inspect actual service startup arguments and environment. On Windows, inspect service properties and their actual configuration sources. Output may contain secrets; redact it before sharing. Do not assume the current PowerShell/Bash environment is the service environment.

3. Common Configuration and Environment Mappings​

note

The following tables identify the main operational entry points. For complete command-line syntax, see CLI. For component background, see taosX Reference. Program defaults differ from values written into installation templates: explicit template values override program defaults, for example monitor.fqdn. Commented template entries are not active configuration.

3.1 Paths and Process​

TOML keyCorresponding environment variable or CLI optionDefault or conditions
plugins_homePLUGINS_HOME; --plugins-homePlugin root readable by the collection process; check the actual installation and legacy compatible directories
data_dirTAOSX_DATA_DIR; --data-dirUsually /var/lib/taos/taosx on Linux or C:\TDengine\data\taosx on Windows; contains state that must be preserved
instanceIdINSTANCE_ID; --instance-idUnique instance identifier on the same host, default 16; not the Xnode ID
jobs--jobsDefault 0 calculates automatically; applies separately from the three service thread settings below
otelENABLE_OTEL; --otelDisabled by default; depends on OpenTelemetry support in the package and does not replace taosKeeper reporting

logs_home (LOGS_HOME, --logs-home), log_level (LOG_LEVEL), and log_keep_days (LOG_KEEP_DAYS, --log-keep-days) are compatibility entry points. Use log.path, log.level, and log.keepDays respectively for new configuration. Do not set both forms and rely on override order. For temporary troubleshooting options such as -v/-q, see the CLI reference.

--no-log-to-files is a command-line logging control, not a TOML setting of the same name. It redirects logs to standard error; configure service output collection separately. The program accepts --debug and --no-async-log, but these do not guarantee additional log locations, a changed log level, or disabled asynchronous writing. See the CLI reference for limits.

3.2 Service Listeners and Threads​

TOML keyCorresponding environment variable or CLI optionDefault or conditions
serve.listenLISTEN; serve --listenAll IPv4 interfaces on port 6050 by default; also listens on [::]:6050 when IPv6 binding is supported
serve.grpcTAOSX_GRPC; serve --grpcAll IPv4 interfaces on port 6055 by default; also listens on [::]:6055 when IPv6 binding is supported
serve.ssl_cert, serve.ssl_key, serve.ssl_caserve --ssl-cert, --ssl-key, --ssl-caTLS disabled by default; prepare as a set
serve.grpc_ssl_cert, serve.grpc_ssl_key, serve.grpc_ssl_caGRPC_SSL_CERT, GRPC_SSL_KEY, GRPC_SSL_CA; corresponding serve --grpc-ssl-*Separate gRPC TLS configuration; certificates can fall back to the HTTP configuration
serve.request_timeoutTAOSX_REQUEST_TIMEOUT; serve --request-timeoutDefault 30 seconds; applies only to interfaces using this setting
serve.xnode_dsn_private_key_fileTOML entry, no public CLI option of the same nameEmpty by default; Linux DSN protection private key path, requiring coordination with other components
serve.rest_api_threadsTOML configurationREST service thread count; calculated automatically if unset or 0
serve.grpc_threadsTOML configurationgRPC service thread count; calculated automatically if unset or 0
serve.scheduler_threadsTOML configurationTask scheduling service thread count; calculated automatically if unset or 0

Separate listening addresses with commas. Every address in a field must use the same nonzero port. Use [地址]:端口 for IPv6. Default listeners may be dual-stack, so check IPv6 firewall rules as well. Explicitly configure allowed addresses to restrict exposed interfaces. A listening address is not the address other hosts should access; do not give proxies 0.0.0.0 or [::] as a destination.

The automatic values for jobs and all three service thread settings are twice the available parallelism, with a minimum of 8. Explicit values from 1–7 are also raised to 8 first. If resource budgets are enabled and resource.maxCpuCores is positive, that limit is then applied separately, so the final value can be below 8. These settings are not connector concurrency, a process-wide thread count limit, or a hard CPU quota. Restart the relevant taosX service in a maintenance window after changes, then check effective values in the startup configuration summary. For tuning steps, see Tuning and Resource Control.

3.3 Monitoring and Logs​

TOML keyCorresponding environment variable or CLI optionDefault or conditions
monitor.fqdnMONITOR_FQDN; main command --monitor-fqdnNo reporting when unset; localhost works only when Keeper and the reporting process share the same environment
monitor.portMONITOR_PORT; --monitor-portDefault 6043
monitor.intervalMONITOR_INTERVAL; --monitor-intervalSeconds, default 10; the CLI validates integers from 1–10. Do not assume all configuration entry points use the same validation
log.path, log.levelLOG_PATH, LOG_LEVEL; --log.path, --log.levelDefault path /var/log/taos on Linux or C:\TDengine\log on Windows, default level info; still check actual service settings
log.compressLOG_COMPRESS; --log.compressDefault false; controls compression of rotated logs
log.rotationCount, log.keepDaysLOG_ROTATION_COUNT, LOG_KEEP_DAYS; --log.rotationCount, --log.keepDaystaosX program defaults are 3 files and 3 days respectively; do not apply taosX-Agent defaults to taosX
log.rotationSize, log.reservedDiskSizeLOG_ROTATION_SIZE, LOG_RESERVED_DISK_SIZEBoth default to 1GB, for rotation and low-disk logging degradation respectively
log.watching, log.loggersLOG_WATCHING maps to the watch switch; module rules are set in the configuration fileWatching enabled by default; reloads only the global log level and module filters, not all TOML. See the CLI reference for auxiliary CLI entry points

3.4 Backup Directory​

TOML keyCorresponding environment variable or CLI optionDefault or conditions
backup.autoCreateDirTAOSX_BACKUP_AUTO_CREATE_DIR; --backup.autoCreateDirDefault false; controls only automatic creation of user-specified backup directories

3.5 Temporarily Adjust the Log Level​

  1. Confirm the actual configuration file and log location on the taosX service host, save the old file, and agree on a diagnostic duration. Keep log.watching = true if log reloading is needed. The file must already exist at startup; do not put configuration in the file system root.
  2. Change level in the existing [log] section and, if needed, set module rules in [log.loggers]. Do not append a second section with the same name. For example, keep the global level = "info" and set only the confirmed module requiring diagnosis to "debug". Obtain module names from logs or support recommendations; do not leave trace enabled for every module.
  3. After saving, look for received config file change event and reload tracing filter successfully, and check actual logs from the relevant module. File watching depends on modification events; atomic replacement saves from some editors may not trigger it. Without evidence of effect, do not treat a saved file as success. Schedule a restart under the maintenance plan.
  4. After diagnosis, restore the original global level and module rules and recheck logs and disk usage. If the filter itself suppresses info, success messages may be hidden; judge using both actual filtering results and error logs.

Reloading rereads log.level and log.loggers from the file. If the global level is omitted, info is used; startup adjustments from --log.level, LOG_LEVEL, or -v/-q are not merged again. Existing RUST_LOG filter directives in the process may still affect results, so mixing multiple filter entry points is not recommended. Paths, rotation, retention days, listeners, threads, and resource budgets are not updated by this reload. For complete log location and compressed log search procedures, see Logs and Performance.

3.6 Telemetry Destination​

TOML keyType and defaultScope
telemetry.serverString, telemetry.taosdata.comDestination host for service-mode telemetry reports, not a taosKeeper or Grafana address
telemetry.portUnsigned 16-bit integer, 80Destination HTTP port for telemetry; use an integer in TOML, not a quoted port string

These settings do not control monitoring metric ingestion or change source and target connections. The deployment owner must confirm telemetry policy in restricted networks according to organizational requirements. Do not arbitrarily change destinations to solve missing business task data.

3.7 Target Table Metadata Cache​

This setting applies to taosX distributions that support the capability. It is documented in the v3.4.4.2 configuration changes. For older versions, confirm whether the delivered version includes this capability.

Environment variableType and defaultScope and limits
TAOSX_TABLE_NAME_EXISTS_CACHE_TTL_SECSUnsigned integer seconds, default 0; empty, negative, unit-suffixed, or other invalid values produce a warning and fall back to 0Controls the target table metadata cache for each task run. 0 does not retain query results across batches. A positive integer caches successfully queried table types, parent super tables, and table-not-found results. The TTL starts when the query finishes; cache hits do not extend it. Query failures and table identity conflicts are not cached.

The variable name is case-sensitive. Set it in the environment of the taosX process that actually writes to the target, not as a TOML key or task DSN parameter. Restart that process under the maintenance plan after changes. Restarting a task clears its cache; IPC reconnections within the same run retain it. Local table creation and missing-table write errors invalidate related entries. Schema changes or table creation by other clients may remain invisible to the task until the cache expires. Assess this delay before increasing the TTL, and check target schema, write errors, and data in the same window.

4. Oracle Source Process Environment​

Oracle connection pool settings min_connections, max_connections, and connection_timeout use explicit source DSN values first, then the corresponding environment variables of the actual source process, then defaults. For variable names, defaults, and the actual idle-reclamation meaning of “connection timeout,” see Oracle read parameters. These are not TOML settings for every connector.

Environment variableType and defaultScope and limits
TAOSX_ORACLE_READ_CALL_TIMEOUTPositive integer seconds; valid range 1–4294967. No call timeout is explicitly set when unset, 0, empty, or not parseable as an unsigned 64-bit integerSets the Oracle client's timeout for a single database round trip during production reads, not a complete SQL statement, task run, connection establishment, or sample request. Requires Oracle Client 18.1 or later. A parseable value above 4294967 seconds fails when set on the client; it does not fall back to unlimited.

For example, 60 allows at most 60 seconds per database round trip. 60s and 5m are not valid integer formats for this variable. One SQL statement can involve multiple round trips, so exceeding 60 seconds in total does not necessarily trigger the timeout. Client cleanup can take additional time. A DBA must choose the value based on actual load; an extremely small value does not replace work on indexes, execution plans, or read windows.

Set the variable in the startup environment of the actual Oracle reader process. Preserve the old configuration and apply the new environment through the maintenance procedure. A temporary setting in another terminal does not change an existing service. After the change, check source read errors, window progress, and target data in the same window. A running process or absence of timeout logs is not verification. This variable is not counted among the 13 source DSN query keys.

5. KingHistorian SDK Environment​

This applies only to the taosX or taosX-Agent process actually collecting data on Windows, not the taosExplorer browser, a Linux management process, or shared configuration for every node.

Environment variableBehavior when unset and lookup orderScope and limits
KINGHISTORIAN_SDK_DLL_PATHFirst tries the path specified by the variable; if unset, first tries KRTDBAPIx64.dll. After the first load fails, tries C:\Program Files\KingHistorian\SDK\C\KRTDBAPIx64.dllMain Windows vendor SDK DLL. Use a controlled absolute path and grant the service identity loading permission. The first initialization result is retained within the process; changing the variable does not guarantee an immediate retry by an existing process. Not a source connection address or CSV configuration file path.

An administrator must install the SDK and dependencies matching the package bitness and review the service startup environment. After changes, follow maintenance procedures so the corresponding collection process loads the new environment. Restarting the browser or running only RESTART XNODE does not replace that process environment change. File existence does not prove successful loading. For connection, point table download, and source/target data checks, see KingHistorian.

6. Resource Configuration Mappings​

taosX and taosX-Agent configure [resource] in their own TOML files. Budgets are independent, not cluster-wide totals. Resource control is disabled if the entire section is absent; enabled defaults to on when the section exists. All-zero values do not simply mean no restrictions on every platform: the Linux memory budget may also come from cgroup.

KeytaosX environment variableDefaultUnit and purpose
resource.enabledTAOSX_RESOURCE_ENABLEDtrue when section existsMain boolean switch; disabled if the entire section is absent.
resource.maxWriteMBpsTAOSX_RESOURCE_MAX_WRITE_MBPS0Units of 1048576 bytes per second; 0 is unlimited. Allows short bursts and does not count all protocol and control traffic.
resource.maxMemoryMBTAOSX_RESOURCE_MAX_MEMORY_MB0Soft MiB budget. With 0, attempts to use the Linux process cgroup limit; no memory budget is enabled if no limit is obtained. Windows requires an explicit budget, not one inferred from Linux paths.
resource.maxPauseSecsTAOSX_RESOURCE_MAX_PAUSE_SECS10Maximum pause in seconds; 0 uses the default. Resuming at expiry does not mean resources are back within budget.
resource.cgroupPathTAOSX_RESOURCE_CGROUP_PATHUnsetAdvanced Linux directory. If unset, attempts to resolve the current process cgroup; not used on Windows.
resource.maxCpuPercentTAOSX_RESOURCE_MAX_CPU_PERCENT0High watermark as a percentage of total CPU capacity; 0 is unlimited, not a single-core utilization percentage.
resource.cpuResumePercentTAOSX_RESOURCE_CPU_RESUME_PERCENT0Must be below the high watermark; 0 uses 80% of that watermark.
resource.maxCpuCoresTAOSX_RESOURCE_MAX_CPU_CORES0Limit for each runtime thread pool; 0 imposes no limit. Not a hard CPU quota.
resource.cpuPriorityTAOSX_RESOURCE_CPU_PRIORITY0Linux nice 1–19, lowering priority only; 0 makes no change. Warned and ignored on other platforms.

The table uses full key names. Inside [resource], omit the resource. prefix, for example maxMemoryMB = 512. Corresponding taosX CLI options add -- to the full name, for example --resource.maxMemoryMB 512. taosX-Agent resource options also explicitly accept the TAOSX_RESOURCE_* environment variables above, but they must be set in the proxy process's service environment. The processes do not share live configuration or budgets. For environment mappings of other proxy parameters, consult Agent Configuration; do not infer them from variable prefixes. For actual trigger logs, metrics, and fallback checks after configuration, see Tuning and Resource Control.

7. Agent-Specific Configuration​

EntryType, default, and conditions
endpoint, tokenRequired, from proxy creation; separate multiple endpoints with commas and keep the token secret
instanceIdDefault 48; unique instance ID on the same host, not the registered Agent ID
caCA file path readable on the proxy host or direct PEM content. HTTPS management connections skip server certificate verification when unset; online status does not prove authenticated identity
compressionDefault false; controls gRPC compression, not a replacement for TLS
in_memory_cache_capacityPositive integer, default 64 batches, not a memory byte limit. AGENT_CACHE_CAPACITY provides an environment fallback if a positive configuration value is not set successfully
keep_onlineDefault true. Setting false exits the endpoint loop before the first connection; it cannot mean “connect once without reconnecting”
min, max in [client_port_range]If both are unset, the system chooses ports. If at least one is set, the other is filled with 49152 or 65535 and the range is constrained to 49152–65535. Applies to management connection client source ports, not inbound listeners or all data connections
TAOSX_AGENT_DELIVERY_MAX_BATCHESEnvironment variable, not a TOML key; defaults to the in-memory cache batch count
TAOSX_AGENT_DELIVERY_MAX_BYTESEnvironment variable, default 67108864 bytes; in-flight data window, not an RSS limit
TAOSX_AGENT_DELIVERY_TIMEOUT_SECSEnvironment variable, default 120 seconds; timeout for sent but unacknowledged data, not source idle timeout

With a client port range enabled, endpoints for HTTP management connections or management connections with a CA configured must use numeric IPv4 addresses and explicit ports. Do not copy the taosx-host placeholder directly. For HTTPS, also ensure the certificate is valid for that IP. Do not remove CA verification to use a hostname. Check this restriction during network planning and retain system-assigned client ports if necessary.

All three TAOSX_AGENT_DELIVERY_* variables require positive integers. Zero, empty strings, or invalid integers cause delivery configuration to fail rather than falling back to defaults. For full windows, oversized batches, log verification, and Linux systemd environment configuration, see Delivery Window and Timeout. Do not copy these variables into task configuration. Before and after service environment changes, also check affected tasks as described in Agent Maintenance.

8. Safe Changes and Verification​

Save the old configuration, startup arguments, and current state. Confirm the host and process affected, then check syntax with a TOML tool and schedule restarts per setting. Do not start a second service to validate production configuration. Except for the explicitly described log filter reload, saving a file does not mean the configuration has taken effect.

After startup, check actual listeners, version, paths, new monitoring samples, and resource logs, then test data with the same known business sample. On failure, use logs to roll back the relevant setting; do not clear caches or old state to bypass errors. For coordination requirements when changing TLS and keys, see TLS, DSNs, and Sensitive Files.