# How to Install OpenSRE on Windows: Complete Setup Guide

> Install OpenSRE on Windows easily using PowerShell. This guide provides a complete setup for the OpenSRE CLI, streamlining your cloud security operations.

- Repository: [Tracer/opensre](https://github.com/Tracer-Cloud/opensre)
- Tags: how-to-guide
- Published: 2026-04-18

---

**Run `irm https://raw.githubusercontent.com/Tracer-Cloud/opensre/main/install.ps1 | iex` in PowerShell to automatically download, extract, and configure the OpenSRE CLI on your Windows system.**

OpenSRE is an open-source Site Reliability Engineering toolkit maintained by the Tracer-Cloud organization. This guide covers the fastest method to install the `opensre` command-line tool on Windows using the official PowerShell installer script, along with verification steps and configuration details derived from the repository source code.

## Install OpenSRE Using the PowerShell One-Liner

The recommended way to install OpenSRE on Windows uses the automated installer hosted in the repository root. The `install.ps1` script handles OS detection, binary extraction, and `PATH` configuration automatically.

### Step 1: Launch PowerShell (Administrator Recommended)

Open a PowerShell terminal. Running as Administrator for the initial installation allows the script to write to protected system directories like `C:\Program Files\OpenSRE` that are already present in your system `PATH`. For per-user installations, standard user permissions are sufficient.

### Step 2: Execute the Installer Command

Copy and paste the following into your PowerShell window:

```powershell
irm https://raw.githubusercontent.com/Tracer-Cloud/opensre/main/install.ps1 | iex

```

This command uses `irm` (Invoke-RestMethod) to fetch the script content and pipes it to `iex` (Invoke-Expression) for immediate execution. According to the source code in `install.ps1`, the script performs these actions:
- Detects your Windows architecture (x86_64 or ARM64)
- Downloads the latest Windows release `.zip` from GitHub
- Extracts `opensre.exe` to your selected directory
- Updates your system or user `PATH` environment variable

### Step 3: Verify the Installation

Confirm the binary is accessible and check the installed version:

```powershell
opensre --version

```

You should see output matching the version defined in [`pyproject.toml`](https://github.com/Tracer-Cloud/opensre/blob/main/pyproject.toml), such as `opensre 0.9.0`. This verifies that the executable is correctly placed and your `PATH` is configured.

### Step 4: Select Installation Location (Optional)

During execution, the installer prompts you to choose between a system-wide installation or a per-user installation. You can accept the default system path (`C:\Program Files\OpenSRE`) or choose `%USERPROFILE%\.local\bin` for a user-specific setup. The script automatically handles `PATH` updates for your selection without manual registry edits.

## Configure OpenSRE After Installation

After the binary installation completes, initialize your environment using the built-in onboarding wizard. This step is required before running investigations.

Run the configuration command:

```powershell
opensre onboard

```

This command, implemented in [`app/webapp.py`](https://github.com/Tracer-Cloud/opensre/blob/main/app/webapp.py), creates a configuration directory at `%USERPROFILE%\.config\opensre\` and prompts you to configure your LLM provider and any necessary integrations. Your settings persist in this directory across terminal sessions.

## Alternative: Build from Source

If you prefer not to use the precompiled binary, you can build OpenSRE from source on Windows. Refer to [`SETUP.md`](https://github.com/Tracer-Cloud/opensre/blob/main/SETUP.md) in the repository root for Windows-specific developer prerequisites, including instructions for installing `make` via Chocolatey. This method requires manual compilation and `PATH` configuration rather than the automated setup provided by `install.ps1`.

## Summary

- **Run the one-liner**: Execute `irm https://raw.githubusercontent.com/Tracer-Cloud/opensre/main/install.ps1 | iex` in PowerShell to trigger the automated installer
- **Verify access**: Use `opensre --version` to confirm the binary is on your `PATH` and matches the release version in [`pyproject.toml`](https://github.com/Tracer-Cloud/opensre/blob/main/pyproject.toml)
- **Choose location**: Install system-wide to `C:\Program Files\OpenSRE` or per-user to `%USERPROFILE%\.local\bin` based on your permissions
- **Initialize**: Run `opensre onboard` to create `%USERPROFILE%\.config\opensre\` and configure your LLM settings

## Frequently Asked Questions

### Do I need Administrator privileges to install OpenSRE on Windows?

Administrator privileges are only required for system-wide installations to directories like `C:\Program Files\OpenSRE`. If you select a per-user path such as `%USERPROFILE%\.local\bin`, the `install.ps1` script runs without elevation and updates your user-level `PATH` instead of the system environment.

### Where does the OpenSRE installer place the binary files?

The `install.ps1` script offers two default locations: `C:\Program Files\OpenSRE` for system-wide access (requires Administrator privileges) or `%USERPROFILE%\.local\bin` for single-user installations. In both cases, the script automatically appends your chosen directory to the appropriate `PATH` variable so the `opensre` command is available in new PowerShell sessions.

### How do I update OpenSRE after the initial installation?

Re-run the same installation command: `irm https://raw.githubusercontent.com/Tracer-Cloud/opensre/main/install.ps1 | iex`. The script detects existing installations and replaces the binary with the latest release from the GitHub releases page while preserving your existing configurations in `%USERPROFILE%\.config\opensre\`.

### Can I install OpenSRE without using the PowerShell script?

Yes, though it requires manual steps. Download the Windows `.zip` file directly from the GitHub releases page, extract `opensre.exe` to a folder of your choice, and manually add that folder to your `PATH` environment variable. Alternatively, clone the `Tracer-Cloud/opensre` repository and follow the build instructions in [`SETUP.md`](https://github.com/Tracer-Cloud/opensre/blob/main/SETUP.md) to compile the binary from source using Windows development tools.