Server Configuration
Many Seq options can be configured through the Settings section of the web user interface. Lower-level settings, especially those that control the HTTP endpoint, or require a restart to be applied, are stored in the Seq.json configuration file, and manipulated using the seq config
command-line.
The seq config
command-line
seq config
command-lineFrom an administrative command prompt on the Seq server, running seq config list
will list the available settings and their values:
seq config list
Setting values can be changed with seq config set
by specifying the setting name and value:
seq config set -k api.listenUris -v https://example.com,https://example.com:45341
seq config set -k cache.systemRamTarget -v 0.8
seq config clear -k storage.prefferedEngine
seq service restart
Settings that accept multiple values can be specified by listing values separated by a comma ,
.
Values can be reset to their defaults using seq config clear
and the setting name.
Seq reads settings Seq.json at startup, so the Seq service must be restarted before changes will take effect.
Environment variable overrides
Each setting value can be overridden at runtime by specifying an environment variable of the form SEQ_<setting path>
, where <setting path>
contains one element for each dotted segment of the setting name, separated by underscores.
For example the setting api.listenUris
can overridden with the SEQ_API_LISTENURIS
variable.
Settings
Settings can be viewed and updated from the command-line using the seq config
command. Settings also support overrides in environment variables. The matching environment variable name for each setting is shown in the detailed documentation below.
api.assumeHttps
api.assumeHttps
If True
, cookies will carry the secure
attribute even when served over HTTP.
The value can be overridden using the SEQ_API_ASSUMEHTTPS
environment variable.
api.avoidLdap
api.avoidLdap
If True
, the Windows local security authority will be used instead of LDAP in some features (experimental).
The value can be overridden using the SEQ_API_AVOIDLDAP
environment variable.
api.canonicalUri
api.canonicalUri
The address that the server can be accessed on externally.
The value can be overridden using the SEQ_API_CANONICALURI
environment variable.
api.corsAllowedOrigins
api.corsAllowedOrigins
Origins from which the full API will be accessible using CORS. Note that this is not necessary for ingestion - events can always be sent to the ingestion endpoint using CORS.
The value can be overridden using the SEQ_API_CORSALLOWEDORIGINS
environment variable.
api.frameAllowFrom
api.frameAllowFrom
Origins that may embed the Seq UI within an <iframe>
.
The value can be overridden using the SEQ_API_FRAMEALLOWFROM
environment variable.
api.hardSessionExpirySeconds
api.hardSessionExpirySeconds
If non-null, this will override the various session expiry timeouts used by the different authentication providers. The initial value is null (no additional hard session expiry override).
The value can be overridden using the SEQ_API_HARDSESSIONEXPIRYSECONDS
environment variable.
api.hstsIncludeSubDomains
api.hstsIncludeSubDomains
The includeSubdomains
field set in the HSTS header, if enabled.
The value can be overridden using the SEQ_API_HSTSINCLUDESUBDOMAINS
environment variable.
api.hstsMaxAge
api.hstsMaxAge
The max-age
specified in the HSTS header in seconds, if enabled. The initial value is 31536000 (365 days).
The value can be overridden using the SEQ_API_HSTSMAXAGE
environment variable.
api.idleSessionExpirySeconds
api.idleSessionExpirySeconds
If non-null, this will set an expiry timeout that will revoke user sessions after a period of inactivity. The initial value is 172800 (48 hours).
The value can be overridden using the SEQ_API_IDLESESSIONEXPIRYSECONDS
environment variable.
api.ingestionPort
api.ingestionPort
If non-null, only event ingestion will be allowed on the specified port. Note that a corresponding entry must exist in api.listenUris
.
The value can be overridden using the SEQ_API_INGESTIONPORT
environment variable.
Make sure that an entry for the port, including the protocol and hostname to listen on, is present in
api.listenUris
in addition to theingestionPort
setting.
api.integratedAuthenticationScheme
api.integratedAuthenticationScheme
The authentication scheme used for Windows authentication. IntegratedWindowsAuthentication
(the default) and Negotiate
are supported.
The value can be overridden using the SEQ_API_INTEGRATEDAUTHENTICATIONSCHEME
environment variable.
api.listenUris
api.listenUris
The addresses that the server will listen on. The first entry listed will be used as the default when generating URIs for apps and notifications.
The value can be overridden using the SEQ_API_LISTENURIS
environment variable.
api.redirectHttpToHttps
api.redirectHttpToHttps
Whether to redirect HTTP requests to the first HTTPS endpoint listed in api.listenUris
. If set to True
, the HSTS header will also be set.
The value can be overridden using the SEQ_API_REDIRECTHTTPTOHTTPS
environment variable.
cache.largeObjectHeapCompaction
cache.largeObjectHeapCompaction
Specify how the .NET large object heap is compacted. Allowed values are Periodic
, Never
, and Default
(a version-specific value, currently equivalent to Periodic
). Compaction can prevent out-of-memory errors in some circumstances, but may result in short availability pauses while compaction takes place.
The value can be overridden using the SEQ_CACHE_LARGEOBJECTHEAPCOMPACTION
environment variable.
cache.systemRamTarget
cache.systemRamTarget
Seq uses RAM heavily to speed up query processing. On shared machines (or local developer workstations) it may be desirable to limit this behavior. Specifying a smaller fractional value here (e.g. 0.5
) will cause Seq to release memory once system memory usage surpasses the threshold (e.g. 50%). If the value specified is greater than 1.0, it will betreated as an absolute byte value. The value may be set to zero to completelydisable caching - this may have significant performance impact.
The value can be overridden using the SEQ_CACHE_SYSTEMRAMTARGET
environment variable.
diagnostics.internalLoggingLevel
diagnostics.internalLoggingLevel
Seq's own internal logging level. Modifying this value may cause significantly higher I/O load and is not recommended. The default is Information
.
The value can be overridden using the SEQ_DIAGNOSTICS_INTERNALLOGGINGLEVEL
environment variable.
diagnostics.internalLogPath
diagnostics.internalLogPath
The location for Seq's own internal log files.
The value can be overridden using the SEQ_DIAGNOSTICS_INTERNALLOGPATH
environment variable.
diagnostics.internalLogServerUrl
diagnostics.internalLogServerUrl
Send Seq's internal logs to another Seq server.
The value can be overridden using the SEQ_DIAGNOSTICS_INTERNALLOGSERVERURL
environment variable.
diagnostics.metricsSamplingIntervalSeconds
diagnostics.metricsSamplingIntervalSeconds
Interval (seconds) at which Seq will write metrics information to its internal log file.
The value can be overridden using the SEQ_DIAGNOSTICS_METRICSSAMPLINGINTERVALSECONDS
environment variable.
diagnostics.nativeStorageMetricsSamplingIntervalMinutes
diagnostics.nativeStorageMetricsSamplingIntervalMinutes
Interval (minutes) at which Seq will write native storage metrics to its internal log file.
The value can be overridden using the SEQ_DIAGNOSTICS_NATIVESTORAGEMETRICSSAMPLINGINTERVALMINUTES
environment variable.
diagnostics.telemetryServerUrl
diagnostics.telemetryServerUrl
Send Seq's error telemetry (if enabled) to another Seq server.
The value can be overridden using the SEQ_DIAGNOSTICS_TELEMETRYSERVERURL
environment variable.
firstRun.adminPasswordHash
firstRun.adminPasswordHash
A salted, cryptographically-hashed, base-64 encoded default password for the administrator account, ignored after the first time Seq is run. Use seq config hash
to compute a value that can be stored in this setting. Alternatively, consider using the --default-admin-password-stdin
argument to the seq run
command. The default when no password is supplied is to not enable authentication.
The value can be overridden using the SEQ_FIRSTRUN_ADMINPASSWORDHASH
environment variable.
firstRun.adminUsername
firstRun.adminUsername
A default username for the administrator account, ignored after the first time Seq is run. The default is admin
.
The value can be overridden using the SEQ_FIRSTRUN_ADMINUSERNAME
environment variable.
firstRun.requireAuthenticationForHttpIngestion
firstRun.requireAuthenticationForHttpIngestion
If true
, API keys or user authentication will be required for HTTP/S ingestion; ignored after thefirst time Seq is run.
The value can be overridden using the SEQ_FIRSTRUN_REQUIREAUTHENTICATIONFORHTTPINGESTION
environment variable.
metastore.mSSql.connectionString
metastore.mSSql.connectionString
A connection string for the Microsoft SQL Server/Azure SQL instance into which metadata will be stored. If null
,local metadata storage will be used. The default is null
.
The value can be overridden using the SEQ_METASTORE_MSSQL_CONNECTIONSTRING
environment variable.
metastore.mSSql.msiResource
metastore.mSSql.msiResource
If the connection must use an Azure Managed Service Identity, the resource for which to request an access token; normally this will be https://database.windows.net/
; the default is to not use an Azure MSI.
The value can be overridden using the SEQ_METASTORE_MSSQL_MSIRESOURCE
environment variable.
metastore.mSSql.msiTenantId
metastore.mSSql.msiTenantId
If using an Azure Managed Service Identity and the identity has access to multiple tenants, the tenant id; the default is to not specify a tenant id.
The value can be overridden using the SEQ_METASTORE_MSSQL_MSITENANTID
environment variable.
metastore.mSSql.schema
metastore.mSSql.schema
The name of the schema under which Seq should store metadata. The default is dbo
.
The value can be overridden using the SEQ_METASTORE_MSSQL_SCHEMA
environment variable.
services.servicesBaseUri
services.servicesBaseUri
The base URL Seq uses for service discovery, if enabled. The default is https://datalust.co
.
The value can be overridden using the SEQ_SERVICES_SERVICESBASEURI
environment variable.
storage.flare.diskReaderLimit
storage.flare.diskReaderLimit
The maximum number of storage threads that will be allowed to concurrently read from the disk. Increasing this value can improve throughput, at the expense of additional risk of stampedes causingservice instability.
The value can be overridden using the SEQ_STORAGE_FLARE_DISKREADERLIMIT
environment variable.
storage.flare.indexerPriority
storage.flare.indexerPriority
The priority assigned to storage management and indexing; the default value 0 will cause all required management tasks to proceed normally. Higher values represent the fraction of maintenance time during which these tasks should yield.
The value can be overridden using the SEQ_STORAGE_FLARE_INDEXERPRIORITY
environment variable.
storage.flare.queryParallelism
storage.flare.queryParallelism
The default number of threads assigned to execution of each parallel query. Increasing this limit can result in higher service resource usage.
The value can be overridden using the SEQ_STORAGE_FLARE_QUERYPARALLELISM
environment variable.
storage.masterKey
storage.masterKey
The master encryption key used to protect sensitive values in the Seq document store.
Windows: this value is itself encrypted and must be retrieved using the seq show-key
command for secure backup.
Linux/macOS: this value is stored unencrypted in Seq.json
; use the SEQ_STORAGE_MASTERKEY
variable for secure key management.
The value can be overridden using the SEQ_STORAGE_MASTERKEY
environment variable.
On Windows, this value cannot be manipulated directly as DPAPI is used to protect the value stored in Seq.json. Use the
seq.exe show-key
command to retrieve the cleartext key for backup purposes.
storage.masterKeyEnvironmentVariableName
storage.masterKeyEnvironmentVariableName
Obsolete; use the SEQ_STORAGE_MASTERKEY
environment variable to supply the master encryption key.
The value can be overridden using the SEQ_STORAGE_MASTERKEYENVIRONMENTVARIABLENAME
environment variable.
Seq.json
Example
Seq.json
ExampleAn example Seq.json
configuration file is shown below.
{
"cache": {
"systemRamTarget": 0.9,
"largeObjectHeapCompaction": "Default"
},
"diagnostics": {
"internalLogPath": null,
"internalLoggingLevel": "Information",
"internalLogServerUrl": null,
"telemetryServerUrl": null,
"metricsSamplingIntervalSeconds": 300,
"nativeStorageMetricsSamplingIntervalMinutes": 60
},
"api": {
"listenUris": [
"https://seq.example.com",
"https://seq.example.com:45341"
],
"canonicalUri": null,
"ingestionPort": 45341,
"corsAllowedOrigins": [],
"frameAllowFrom": [],
"integratedAuthenticationScheme": null,
"avoidLdap": false,
"assumeHttps": false,
"redirectHttpToHttps": false,
"hstsMaxAge": 31536000,
"hstsIncludeSubDomains": false,
"hardSessionExpirySeconds": null,
"idleSessionExpirySeconds": 172800
},
"storage": {
"masterKey": "pmk.STAail8VPUq2dgjKAVnAsw==",
"masterKeyEnvironmentVariableName": null,
"useEnvironmentForMasterKey": false,
"flare": {
"indexerPriority": 0.0,
"queryParallelism": 4,
"diskReaderLimit": 5
}
},
"metastore": {
"msSql": {
"connectionString": null,
"schema": null,
"msiResource": null,
"msiTenantId": null
}
},
"firstRun": {
"adminUsername": null,
"adminPasswordHash": null,
"requireAuthenticationForHttpIngestion": false
},
"services": {
"servicesBaseUri": null
}
}
Updated almost 4 years ago