Skip to main content

Environment Variables

Server environment variables override the config file and are overridden by CLI flags. A variable set to an empty string is ignored.

Only the variables on this page are read. Config keys without a variable (marked in the Keys Without a Variable section) can be set only in the config file or, where one exists, with a server flag. lynxdb config lists the effective value and source of every key.

Client Variables​

VariableDefaultDescription
LYNXDB_SERVERhttp://localhost:3100Server URL for CLI commands (--server).
LYNXDB_TOKENemptyAPI key (--token). Takes precedence over saved credentials.
LYNXDB_PROFILEemptyConnection profile (--profile).
LYNXDB_TLS_SKIP_VERIFYfalseSkip TLS verification when true, 1 or yes (--tls-skip-verify).
LYNXDB_CONFIGemptyConfig file path, overriding the search order. Used by the server, the config command and profile lookups.
NO_COLORemptyAny value turns off colored output.
EDITOR, VISUALEditor for lynxdb config edit.
export LYNXDB_SERVER=https://lynxdb.example.com
export LYNXDB_TOKEN=lynx_ak_a1b2c3d4e5f6...
lynxdb query 'source=main level=ERROR | stats count() by host'

Server Variables​

Top Level​

VariableKeyDefault
LYNXDB_LISTENlistenlocalhost:3100
LYNXDB_DATA_DIRdata_dir~/.local/share/lynxdb
LYNXDB_RETENTIONretention7d
LYNXDB_LOG_LEVELlog_levelinfo

Storage​

VariableKeyDefault
LYNXDB_STORAGE_PARTITIONstorage.partition24h
LYNXDB_STORAGE_FLUSH_INTERVALstorage.flush_interval0s (one second)
LYNXDB_STORAGE_TIME_FIELDSstorage.time_fields_time,timestamp,@timestamp,time,ts
LYNXDB_STORAGE_SORT_KEYstorage.sort_keyempty

Query​

VariableKeyDefault
LYNXDB_QUERY_SYNC_TIMEOUTquery.sync_timeout30s
LYNXDB_QUERY_JOB_TTLquery.job_ttl5m
LYNXDB_QUERY_MAX_CONCURRENTquery.max_concurrent32
LYNXDB_QUERY_DEFAULT_RESULT_LIMITquery.default_result_limit1000
LYNXDB_QUERY_MAX_RESULT_LIMITquery.max_result_limit50000

Ingest​

VariableKeyDefault
LYNXDB_INGEST_MAX_BODY_SIZEingest.max_body_size100mb
LYNXDB_INGEST_MAX_BATCH_SIZEingest.max_batch_size1000
LYNXDB_INGEST_MAX_LINE_BYTESingest.max_line_bytes1048576
LYNXDB_INGEST_MODEingest.modeempty (full)
LYNXDB_INGEST_LIMITS_MAX_COMPRESSED_BODY_BYTESingest.limits.max_compressed_body_bytes32mb
LYNXDB_INGEST_LIMITS_MAX_DECOMPRESSED_BODY_BYTESingest.limits.max_decompressed_body_bytes256mb
LYNXDB_INGEST_ES_COMPAT_ENABLEDingest.es_compat.enabledtrue
LYNXDB_INGEST_ES_COMPAT_ADVERTISED_VERSIONingest.es_compat.advertised_version8.15.0
LYNXDB_INGEST_ES_COMPAT_CLUSTER_NAMEingest.es_compat.cluster_namelynxdb
LYNXDB_INGEST_OTLP_HTTP_LISTENingest.otlp.http_listen0.0.0.0:4318
LYNXDB_INGEST_OTLP_GRPC_LISTENingest.otlp.grpc_listenempty
LYNXDB_INGEST_OTLP_GRPC_MAX_RECV_BYTESingest.otlp.grpc_max_recv_bytes16mb
LYNXDB_INGEST_SPLUNK_HEC_ENABLEDingest.splunk_hec.enabledtrue
LYNXDB_INGEST_SPLUNK_HEC_REQUIRE_TOKENingest.splunk_hec.require_tokenfalse

HTTP, TLS, Auth​

VariableKeyDefault
LYNXDB_HTTP_IDLE_TIMEOUThttp.idle_timeout120s
LYNXDB_HTTP_SHUTDOWN_TIMEOUThttp.shutdown_timeout30s
LYNXDB_HTTP_RATE_LIMIThttp.rate_limit0
LYNXDB_TLS_ENABLEDtls.enabledfalse
LYNXDB_TLS_CERT_FILEtls.cert_fileempty
LYNXDB_TLS_KEY_FILEtls.key_fileempty
LYNXDB_AUTH_ENABLEDauth.enabledfalse

Syslog​

VariableKeyDefault
LYNXDB_SYSLOG_UDPsyslog.udpempty
LYNXDB_SYSLOG_TCPsyslog.tcpempty
LYNXDB_SYSLOG_TLSsyslog.tlsfalse
LYNXDB_SYSLOG_PARSERsyslog.parserauto
LYNXDB_SYSLOG_FRAMINGsyslog.framingauto
LYNXDB_SYSLOG_TRAILERsyslog.trailerauto
LYNXDB_SYSLOG_DEFAULT_TIMEZONEsyslog.default_timezoneLocal
LYNXDB_SYSLOG_DEFAULT_HOSTNAMEsyslog.default_hostnameempty
LYNXDB_SYSLOG_INDEXsyslog.indexmain
LYNXDB_SYSLOG_SOURCETYPEsyslog.sourcetypesyslog
LYNXDB_SYSLOG_USE_PEER_AS_SOURCEsyslog.use_peer_as_sourcetrue
LYNXDB_SYSLOG_MAX_MESSAGE_BYTESsyslog.max_message_bytes65536
LYNXDB_SYSLOG_UDP_READ_BUFFERsyslog.udp_read_buffer2mb
LYNXDB_SYSLOG_TCP_IDLE_TIMEOUTsyslog.tcp_idle_timeout5m
LYNXDB_SYSLOG_TCP_MAX_CONNECTIONSsyslog.tcp_max_connections1000
LYNXDB_SYSLOG_BATCH_SIZEsyslog.batch_size1000
LYNXDB_SYSLOG_BATCH_TIMEOUTsyslog.batch_timeout200ms

Keys Without a Variable​

These keys are read from the config file only:

  • query.max_query_length
  • http.read_header_timeout
  • profiles.*

Install Script Variables​

https://lynxdb.org/install.sh reads these variables; the lynxdb binary does not:

VariableDefaultDescription
LYNXDB_VERSIONlatestVersion to install
LYNXDB_CHANNELstablestable or nightly
LYNXDB_ALLOW_PRERELEASEemptyRequired for nightly and other prerelease versions
LYNXDB_INSTALL_DIRauto-detectedInstallation directory
LYNXDB_BASE_URLhttps://dl.lynxdb.orgDownload base URL
LYNXDB_NO_MODIFY_PATHemptyDo not edit shell profiles to add the directory to PATH
LYNXDB_VERBOSE, LYNXDB_QUIETemptyMore or less output
LYNXDB_FORCEemptySkip confirmation prompts

Examples​

systemd drop-in:

# /etc/systemd/system/lynxdb.service.d/env.conf
[Service]
Environment=LYNXDB_LISTEN=0.0.0.0:3100
Environment=LYNXDB_DATA_DIR=/var/lib/lynxdb
Environment=LYNXDB_RETENTION=30d
Environment=LYNXDB_AUTH_ENABLED=true

Kubernetes container:

env:
- name: LYNXDB_LISTEN
value: "0.0.0.0:3100"
- name: LYNXDB_DATA_DIR
value: "/data"