Appearance
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 | iexThe installer:
- Downloads the agent for your CPU and verifies its SHA-256 checksum.
- Installs it to
C:\Program Files\Logcore\logcore-agent.exeand adds that folder to the systemPATH. - Writes
C:\ProgramData\Logcore\logcore.yaml, with optional settings commented out. - Creates
C:\ProgramData\Logcore\services\withapp.yaml.exampleandiis.yaml.example. - 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 -WaitOpen 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 restartThe 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.