DocumentationDiscussions
DocumentationDiscussions

Server Command Line

The seq.exe executable (Windows) and datalust/seq container (Docker) have an extensive command line for performing administration tasks. Many of these commands modify Seq's configuration and require the Seq process to be restarted for the change to take effect.

Usage

Syntax:

seq <command> [<args>]

Available commands are:

CommandDescription
auth reset Switch to local username/password authentication and set new credentials for an administrative account
auth show Describe the current authentication provider and list active user accounts
backup Write a backup of the Seq configuration and metadata
bind-ssl Bind an installed SSL certificate to an HTTPS port served by Seq
browse Open a web browser on the Seq user interface
config clear Clear fields in the Seq.json file
config create Create a default Seq.json file, if none exists
config get View a field from the Seq.json file
config hash Read a password from STDIN and print a salted, Base64 encoded cryptographic hash of the password that is suitable for storing in configuration fields (leading and trailing whitespace will be trimmed)
config list View all fields in the Seq.json file
config set Set a field in the Seq.json file
help Show information about available commands
metastore to-mssql Reconfigure and move the internal metastore to a Microsoft SQL Server/Azure SQL Database
metastore to-postgresql Reconfigure and move the internal metastore to a PostgreSQL database
node describe Describe the cluster role of this node
node follow Put this node into the follower role
node lead Put this node into the leader role
node reset Reset the current node to standalone state
node setup Set up this node as a member of a Seq cluster; the node will be configured in the follower role
restore Restore from a backup of the Seq configuration and metadata
run Run the server process
secret clear Remove a configuration field override from the secret store
secret set Override a configuration field by adding a value to the secret store
service install Install the Seq server as a Windows service
service list List Seq Windows services installed on the machine
service restart Restart the Seq Windows service
service start Start the Seq server as a Windows service
service status Show the status of the Seq Windows service
service stop Stop the Seq Windows service
service uninstall Uninstall the Seq Windows service
show-key Print the encryption key ('secret key') used to protect sensitive fields and backup files
version Print the current executable version

Type seq help <command> for detailed help.

Commands

auth reset

Switch to local username/password authentication and set new credentials for an administrative account.

OptionDescription
-n, --name=VALUEIf multiple Seq instances are in use, the name of the instance
-p, --password=VALUEThe password for the user account
--password-stdinRead the new password from STDIN
-s, --storage=VALUESpecify the folder where data for this instance is stored; C:\ProgramData\Seq(\Instance[Name]) is used by default.
-u, --username=VALUEThe name of the user account

auth show

Describe the current authentication provider and list active user accounts.

OptionDescription
-n, --name=VALUEIf multiple Seq instances are in use, the name of the instance
-s, --storage=VALUESpecify the folder where data for this instance is stored; C:\ProgramData\Seq(\Instance[Name]) is used by default.

backup

Write a backup of the Seq configuration and metadata.

OptionDescription
-n, --name=VALUEIf multiple Seq instances are in use, the name of the instance
-p, --path=VALUEThe folder path where the backup file should be stored (default: current directory)
-s, --storage=VALUESpecify the folder where data for this instance is stored; C:\ProgramData\Seq(\Instance[Name]) is used by default.

bind-ssl

Bind an installed SSL certificate to an HTTPS port served by Seq. Windows only.

OptionDescription
--hostname=VALUEIf SNI is used, the specific host name to bind to (default is to bind to all hostnames via the IP address)
--port=VALUEThe port on which the Seq server is listening (default is 443)
--thumbprint=VALUEThe thumbprint of the SSL certificate to bind; this can be found with the Manage computer certificates program

browse

Open a web browser on the Seq user interface.

OptionDescription
-n, --name=VALUEIf multiple Seq instances are in use, the name of the instance
-s, --storage=VALUESpecify the folder where data for this instance is stored; C:\ProgramData\Seq(\Instance[Name]) is used by default.

config clear

Clear fields in the Seq.json file.

OptionDescription
-k, --key=VALUEThe field, for example api.listenUris
-n, --name=VALUEIf multiple Seq instances are in use, the name of the instance
-s, --storage=VALUESpecify the folder where data for this instance is stored; C:\ProgramData\Seq(\Instance[Name]) is used by default.

config create

Create a default Seq.json file, if none exists.

OptionDescription
-n, --name=VALUEIf multiple Seq instances are in use, the name of the instance
-s, --storage=VALUESpecify the folder where data for this instance is stored; C:\ProgramData\Seq(\Instance[Name]) is used by default.

config get

View a field from the Seq.json file.

OptionDescription
-k, --key=VALUEThe field, for example api.listenUris
-n, --name=VALUEIf multiple Seq instances are in use, the name of the instance
-s, --storage=VALUESpecify the folder where data for this instance is stored; C:\ProgramData\Seq(\Instance[Name]) is used by default.

config hash

Read a password from STDIN and print a salted, Base64 encoded cryptographic hash of the password that is suitable for storing in configuration fields (leading and trailing whitespace will be trimmed).

config list

View all fields in the Seq.json file.

OptionDescription
-n, --name=VALUEIf multiple Seq instances are in use, the name of the instance
-s, --storage=VALUESpecify the folder where data for this instance is stored; C:\ProgramData\Seq(\Instance[Name]) is used by default.

config set

Set a field in the Seq.json file.

OptionDescription
-k, --key=VALUEThe field, for example api.listenUris
-n, --name=VALUEIf multiple Seq instances are in use, the name of the instance
-s, --storage=VALUESpecify the folder where data for this instance is stored; C:\ProgramData\Seq(\Instance[Name]) is used by default.
-v, --value=VALUEThe field value, comma-separated if multiple values are accepted
--value-stdinRead the value from STDIN

help

Show information about available commands.

Example:

seq seq help config set
OptionDescription
--preShow preview commands

metastore to-mssql

Reconfigure and move the internal metastore to a Microsoft SQL Server/Azure SQL Database.

OptionDescription
-c, --connection-string=VALUEThe connection string for the target database
--msi-resource=VALUEIf 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
--msi-tenant-id=VALUEIf 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
-n, --name=VALUEIf multiple Seq instances are in use, the name of the instance
-s, --storage=VALUESpecify the folder where data for this instance is stored; C:\ProgramData\Seq(\Instance[Name]) is used by default.
--schema=VALUEThe schema under which to store metadata; the default is dbo
--skip-configDon't save connection information (useful if the connection string will be supplied in an environment variable once the metastore is moved)

metastore to-postgresql

Reconfigure and move the internal metastore to a PostgreSQL database.

OptionDescription
-c, --connection-string=VALUEThe connection string for the target database
-n, --name=VALUEIf multiple Seq instances are in use, the name of the instance
-s, --storage=VALUESpecify the folder where data for this instance is stored; C:\ProgramData\Seq(\Instance[Name]) is used by default.
--schema=VALUEThe schema under which to store metadata; the default is seq
--skip-configDon't save connection information (useful if the connection string and schema will be supplied an environment variables once the metastore is moved)

node describe

Describe the cluster role of this node.

OptionDescription
-n, --name=VALUEIf multiple Seq instances are in use, the name of the instance
-s, --storage=VALUESpecify the folder where data for this instance is stored; C:\ProgramData\Seq(\Instance[Name]) is used by default.

node follow

Put this node into the follower role.

OptionDescription
-n, --name=VALUEIf multiple Seq instances are in use, the name of the instance
-s, --storage=VALUESpecify the folder where data for this instance is stored; C:\ProgramData\Seq(\Instance[Name]) is used by default.

node lead

Put this node into the leader role.

OptionDescription
-n, --name=VALUEIf multiple Seq instances are in use, the name of the instance
-s, --storage=VALUESpecify the folder where data for this instance is stored; C:\ProgramData\Seq(\Instance[Name]) is used by default.

node reset

Reset the current node to standalone state.

OptionDescription
-n, --name=VALUEIf multiple Seq instances are in use, the name of the instance
-s, --storage=VALUESpecify the folder where data for this instance is stored; C:\ProgramData\Seq(\Instance[Name]) is used by default.

node setup

Set up this node as a member of a Seq cluster; the node will be configured in the follower role.

OptionDescription
--authentication-key-stdinRead the cluster authentication key from STDIN; either this or -k must be specified
--cluster-listen=VALUEThe URI of the current node's cluster endpoint; when the current node is leader, it will listen for cluster traffic at this address
--internal-api=VALUEThe cluster-internal URI of this node's web API endpoint; this information will be available to other nodes in the cluster
-k, --authentication-key=VALUEThe cluster authentication key; either this or --authentication-key-stdin must be specified
-n, --name=VALUEIf multiple Seq instances are in use, the name of the instance
--node-name=VALUEThe informational name associated with the current node. If not specified, a default name will be used.
--peer-cluster=VALUEThe URI of the next peer node's cluster endpoint; when the current node is not leader, it will attempt to connect to the leader node at this address
--peer-internal-api=VALUEThe cluster-internal URI of the next peer node's web API endpoint; when the node is not leader, it will proxy incoming API traffic to this address
-s, --storage=VALUESpecify the folder where data for this instance is stored; C:\ProgramData\Seq(\Instance[Name]) is used by default.

restore

Restore from a backup of the Seq configuration and metadata.

OptionDescription
-b, --backup=VALUEThe .seqbac file to restore from; this must have been created with the exact Seq version in use
--enable-appsEnable streaming events to plug-in Seq apps; by default, apps must be manually re-enabled after restoring
--from-latestRestore the most recent nightly backup on this instance, using the current secret key, and re-enable all apps
-k, --secret-key=VALUEThe Base64 encoded encryption key (enclose in double quotes to escape embedded equals signs)
-n, --name=VALUEIf multiple Seq instances are in use, the name of the instance
-s, --storage=VALUESpecify the folder where data for this instance is stored; C:\ProgramData\Seq(\Instance[Name]) is used by default.
-y, --confirmAssume y for any confirmations

run

Run the server process.

OptionDescription
--default-admin-password-stdinRead a default password for the first administrator account from STDIN; the password will be requested, but ignored, after the first time Seq is run
-n, --name=VALUEIf multiple Seq instances are in use, the name of the instance
--nologo
-s, --storage=VALUESpecify the folder where data for this instance is stored; C:\ProgramData\Seq(\Instance[Name]) is used by default.

secret clear

Remove a configuration field override from the secret store.

OptionDescription
-k, --key=VALUEThe field, for example api.listenUris
-n, --name=VALUEIf multiple Seq instances are in use, the name of the instance
-s, --storage=VALUESpecify the folder where data for this instance is stored; C:\ProgramData\Seq(\Instance[Name]) is used by default.

secret set

Override a configuration field by adding a value to the secret store.

OptionDescription
-k, --key=VALUEThe field, for example api.listenUris
-n, --name=VALUEIf multiple Seq instances are in use, the name of the instance
-s, --storage=VALUESpecify the folder where data for this instance is stored; C:\ProgramData\Seq(\Instance[Name]) is used by default.
-v, --value=VALUEThe field value, comma-separated if multiple values are accepted
--value-stdinRead the value from STDIN

service install

Install the Seq server as a Windows service. Windows only.

OptionDescription
-l, --listen=VALUESet the URL(s) to listen on; the default is 'http://localhost:5341'
-n, --name=VALUEIf multiple Seq instances are in use, the name of the instance
-p, --password=VALUEThe password for the Windows account to run the service under
-s, --storage=VALUESpecify the folder where data for this instance is stored; C:\ProgramData\Seq(\Instance[Name]) is used by default.
--setupInstall and start the service only if it does not exist; otherwise reconfigure the binary location
-u, --username=VALUEThe name of a Windows account to run the service under; if not specified the Local System account will be used

service list

List Seq Windows services installed on the machine. Windows only.

service restart

Restart the Seq Windows service. Windows only.

OptionDescription
-n, --name=VALUEIf multiple Seq instances are in use, the name of the instance

service start

Start the Seq server as a Windows service. Windows only.

OptionDescription
-n, --name=VALUEIf multiple Seq instances are in use, the name of the instance

service status

Show the status of the Seq Windows service. Windows only.

OptionDescription
-n, --name=VALUEIf multiple Seq instances are in use, the name of the instance

service stop

Stop the Seq Windows service. Windows only.

OptionDescription
-n, --name=VALUEIf multiple Seq instances are in use, the name of the instance

service uninstall

Uninstall the Seq Windows service. Windows only.

OptionDescription
-n, --name=VALUEIf multiple Seq instances are in use, the name of the instance

show-key

Print the encryption key ('secret key') used to protect sensitive fields and backup files.

OptionDescription
--generateGenerate and print a new key to use with another Seq instance
-n, --name=VALUEIf multiple Seq instances are in use, the name of the instance
-s, --storage=VALUESpecify the folder where data for this instance is stored; C:\ProgramData\Seq(\Instance[Name]) is used by default.

version

Print the current executable version.


Did this page help you?