Install a syslog server on Windows
When to use this: You want to receive syslog on a Windows machine, for example because there is no Linux host.
Before you start
Steps
-
Pick an application
Common choices: Visual Syslog Server (free, simple viewer), Kiwi Syslog Server from SolarWinds (commercial, runs as a service, alerts and actions), or a log platform such as Graylog on a Linux VM. Download only from the vendor's official site and check the current licence and price.
-
Install it and set it to run as a service
Prefer the service/daemon option so it starts at boot without a user logged in. Run it as a normal service account, not as your own admin user.
-
Allow the port in Windows Defender Firewall
PowerShellGit BashNew-NetFirewallRule -DisplayName "Syslog UDP 514" -Direction Inbound -Protocol UDP -LocalPort 514 -RemoteAddress 192.168.1.1 -Action Allow New-NetFirewallRule -DisplayName "Syslog TCP 514" -Direction Inbound -Protocol TCP -LocalPort 514 -RemoteAddress 192.168.1.1 -Action Allow# Run this in PowerShell, not Git Bash. powershell.exe -Command "New-NetFirewallRule -DisplayName 'Syslog UDP 514' -Direction Inbound -Protocol UDP -LocalPort 514 -RemoteAddress 192.168.1.1 -Action Allow"Replace
192.168.1.1with your firewall's IP.-RemoteAddressrestricts who may send. -
Confirm it is listening
terminalnetstat -ano | findstr :514You should see a line for UDP
0.0.0.0:514owned by the syslog application's process ID. -
Choose where logs are stored
Point the application's log folder at a disk with enough space, and configure its retention or archive rule (most tools have a 'delete after N days' option).
-
Point your device at this PC and watch the messages arrive
Set the device's syslog server to this PC's IP and port 514. New messages should appear in the application's live view.
How to verify it worked
netstatshows port 514 listening, and the application's live view shows a test message from your device.
How to undo it
Remove the firewall rules:
Remove-NetFirewallRule -DisplayName "Syslog UDP 514" Remove-NetFirewallRule -DisplayName "Syslog TCP 514"powershell.exe -Command "Remove-NetFirewallRule -DisplayName 'Syslog UDP 514'; Remove-NetFirewallRule -DisplayName 'Syslog TCP 514'"
Common errors and fixes
netstat shows 514 listening The firewall rule is missing or the wrong profile (Public vs Private). Check the rule, and check the device's source IP matches -RemoteAddress. New-NetFirewallRule says access denied Open PowerShell as Administrator. Q&A
Can Windows itself send its event log by syslog?
Not natively. You need an agent such as NXLog, or you collect with Windows Event Forwarding. See the Windows events scenario.
Is a Windows syslog server a good production choice?
It can work for small setups if the host is always on and patched. For scale, search and low cost, a Linux VM is usually better.