crowdsec/windows
Manuel Sabban c707b72b03
fix lapi credentials creation for debian package (#2646)
* fix lapi credentials creation for package s
---------

Co-authored-by: mmetc <92726601+mmetc@users.noreply.github.com>
2023-12-08 12:10:23 +01:00
..
Chocolatey/crowdsec Update chocolatey spec file and publish nupkg in github releases (#1826) 2022-10-20 11:12:54 +02:00
installer fix lapi credentials creation for debian package (#2646) 2023-12-08 12:10:23 +01:00
install_dev_windows.ps1 don't install jq to build windows, docker (not required anymore) (#1800) 2022-10-11 13:32:23 +02:00
install_installer_windows.ps1 Windows Support (#1159) 2022-05-17 12:14:59 +02:00
README.md updated windows/README.md (#1785) 2022-10-07 13:39:29 +02:00

Building Crowdsec for Windows

We provide scripts for PowerShell Core (>=v7.0). You can install it from The latest GitHub releases. Download the appropriate .msi file and execute it.

Now, run PowerShell as Administrator, go in the crowdsec repository (if you already cloned it) and run:

PS C:\Users\johndoe\src\crowdsec> powershell .\windows\install_dev_windows.ps1
[...]

If you don't have git you can download the script and execute it, it will install git for you.

Now you should have the right dependencies (go, gcc, git). You can verify with choco list --localonly. This is enough to build from sources, but if you want to also build the choco or MSI packages, you need more dependencies:

PS C:\Users\johndoe\src\crowdsec> powershell .\windows\install_installer_windows.ps1
[...]

You can now use

  • make to build cmd\crowdsec\crowdsec.exe and cmd\crowdsec-cli\cscli.exe

  • make test to run unit tests. Some tests requiring localstack are disabled. Functional tests are also only available on unix systems.

  • make windows_installer to build a crowdsec_x.y.z.msi installer

  • make chocolatey to build a package under .\windows\Chocolatey\crowdsec\crowdsec_x.y.z.nupkg which you can test using choco install <filename>

After installing CrowdSec, the binaries are in C:\Program Files\CrowdSec\:

PS C:\Users\johndoe\src\crowdsec> & 'C:\Program Files\CrowdSec\cscli.exe' metrics
[...]
PS C:\Users\johndoe\src\crowdsec> & 'C:\Program Files\CrowdSec\cscli.exe' parsers install crowdsecurity/syslog-logs
[...]

To start/stop the service:

PS C:\Users\johndoe\src\crowdsec> net stop crowdsec
The CrowdSec service is stopping..
The CrowdSec service was stopped successfully.
PS C:\Users\johndoe\src\crowdsec> net start crowdsec
The CrowdSec service is starting.
The CrowdSec service was started successfully.