Skip to content

Install the agent on Windows ​

The agent runs as the Logcore Agent Windows service.

Requirements ​

  • Windows Server 2016 or later, or Windows 10/11, on x64 or arm64.
  • PowerShell 5.1 or later, run as Administrator.
  • Outbound HTTPS (port 443) to logcore.lsofito.com.
  • A Logcore API key, found under Settings → Agent API keys.

One-line install ​

In the dashboard, open Add server → Windows, pick an API key and copy the command. Run it in PowerShell as Administrator:

powershell
$env:LOGCORE_API_KEY="lc_xxxxxxxx"; $env:LOGCORE_TAGS="env:prod,role:web"; iwr -useb https://logcore.lsofito.com/install.ps1 | iex

The installer:

  1. Downloads the agent for your CPU and verifies its SHA-256 checksum.
  2. Installs it to C:\Program Files\Logcore\logcore-agent.exe and adds that folder to the system PATH.
  3. Writes C:\ProgramData\Logcore\logcore.yaml, with optional settings commented out.
  4. Creates C:\ProgramData\Logcore\services\ with app.yaml.example and iis.yaml.example.
  5. Installs and starts the Logcore Agent service, which starts automatically at boot.

Run as Administrator

If PowerShell isn't elevated, the installer stops with an error. Right-click PowerShell and choose Run as administrator.

Verify the installation ​

powershell
logcore-agent status
Get-Service "Logcore Agent"
Get-Content C:\ProgramData\Logcore\logs\agent.log -Tail 50 -Wait

Open a new PowerShell window after installing, so that the updated PATH is picked up.

Collect logs ​

Create a service file, for example C:\ProgramData\Logcore\services\myapp.yaml:

yaml
name: myapp
path: 'C:\myapp\logs\*.log'

IIS logs:

yaml
name: iis
path: 'C:\inetpub\logs\LogFiles\**\*.log'

Quote Windows paths

Write Windows paths in single quotes, so that YAML keeps the backslashes as they are.

Then apply the change:

powershell
logcore-agent configcheck
logcore-agent service restart

The service runs as LocalSystem, so it can read files anywhere on the machine.

Proxy and TLS inspection ​

If outbound traffic goes through a proxy, set the machine-wide HTTPS_PROXY environment variable and restart the service. If a TLS-inspecting proxy re-signs traffic, install its root certificate in the machine's Trusted Root store. Use tls_skip_verify: true in logcore.yaml only as a short-term test.