Install Seq locally for development

Oh, and it uses docker. So install docker desktop first.

Seq's container image is here:

Create container on the commandline

Note: Change 'A PASSWORD HERE' to be your own preferred value

$PasswordHash=$(echo 'A PASSWORD HERE' | docker run --rm -i datalust/seq config hash)
mkdir "c:\temp\seq" -force

docker run --name seq -d --restart always -e ACCEPT_EULA=Y -e SEQ_FIRSTRUN_ADMINPASSWORDHASH="$PasswordHash" -v c:\temp\seq:/data -p 8071:80 -p 5341:5341 datalust/seq

Now you'll have a local docker instance that:

Note on restart always

We use --restart always though the example at the official references has --restart unless-stopped

Verify it is running

Configure your app to log to that instance

Create a new api key, that your app will use when logging to the new endpoint. The only permission it needs is Ingest.

Visit http://localhost:8071/#/settings/api-keys/new to create the key. Copy the API key to use in your appsettings.Development.json.

New section in your appsettings.Development.json looks like this:

 "Serilog": {
	"LevelSwitches": { "controlSwitch": "Verbose" },
	"WriteTo": [
		"Name": "Seq",
		"Args": {
		  "serverUrl": "http://localhost:5341",
		  "apiKey": "(Generate it @ 'http://localhost:8071/#/settings/api-keys/' )",
		  "controlLevelSwitch": "$controlSwitch"

See also