Install StackRegent on Windows Server
StackRegent installs from one elevated PowerShell window, either with a one-line command that fetches and verifies the newest release or from the zip package with install.ps1. Both end with a panel on port 9443.
- Get a license key from the store (or the free trial): it is on your service page.
- Prepare the server: Windows updates installed, a host name, a static IP address, signed in as an administrator.
- Run the installer in an elevated PowerShell, with your key in place of the Xs:
[Net.ServicePointManager]::SecurityProtocol='Tls12'; & ([scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://panel.stackregent.com/get/stackregent.ps1'))) -LicenseKey SR-XXXXX-XXXXX-XXXXX-XXXXXThe installer activates the license, downloads the newest release, checks its size, SHA-256 and signature, installs IIS and the panel, then opens it at https://SERVER:9443/. Every installer parameter.
Two ways to install StackRegent on Windows Server#
| One-line installer | Zip package with install.ps1 | |
|---|---|---|
| Best for | A fresh server with internet access | Inspecting the package first, or choosing ports and folders |
| Gets the release | Downloads the newest stable release from the license server | You copy the zip to the server |
| Checks | Size, SHA-256 and the release signature before anything runs | Runs the package you already have |
| Parameters | -LicenseKey, -AdminEmail, -Hostname, -Components, -DownloadOnly, -Server | All install.ps1 parameters, including ports and folders |
Both paths run the same install.ps1 in the end. Check the requirements first, and read the page for your Windows release for what differs on it: 2025, 2022, 2019 or 2016.
Install with the one-line installer#
Open PowerShell with Run as administrator and run, with your own key:
[Net.ServicePointManager]::SecurityProtocol='Tls12'; & ([scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://panel.stackregent.com/get/stackregent.ps1'))) -LicenseKey SR-XXXXX-XXXXX-XXXXX-XXXXXThe first statement makes Windows PowerShell 5.1 use TLS 1.2 for the download; older defaults can fail to connect. The script then:
- reads the server's Windows machine ID and activates the license for this server,
- asks the license server for the newest stable release offered to your license,
- downloads it and checks the size, the SHA-256 hash and the signature against the StackRegent release key (key ID
4kybuaOI7rGnp0qC), whose public half is written into the script, - unpacks it, refusing any path that would leave the target folder,
- runs
install.ps1from the release.
If any check fails, it stops with an error and nothing is installed.
One-line installer parameters#
| Parameter | Default | What it does |
|---|---|---|
-LicenseKey | asked | Your SR-XXXXX-XXXXX-XXXXX-XXXXX key. If you leave it out, the script asks for it. |
-AdminEmail | empty | Email address of the admin account; passed to install.ps1. |
-Hostname | empty | The panel's host name, used for its certificate and mail; passed to install.ps1. |
-Components | recommended | Which hosting components to set up; passed to install.ps1 (see below). |
-DownloadOnly | off | Stops after the checks and leaves the verified, unpacked release in a temporary folder. |
-Server | https://panel.stackregent.com | The license server. Leave it as it is; only https addresses are accepted. |
The one-line installer does not pass port or folder options. To install on another port or into another folder, either change the port afterwards with stackregent panel-port, or run with -DownloadOnly and start install.ps1 from the folder it prints, with the options you need. The developer site documents the install script for automation.
Install from the zip package#
- Copy the StackRegent zip to the server and extract all of it.
install.ps1expectsbin\stackregent.exenext to it. - Open PowerShell with Run as administrator in the extracted folder.
- Run:
powershell -ExecutionPolicy Bypass -File .\install.ps1 -AdminEmail you@example.com -LicenseKey SR-XXXXX-XXXXX-XXXXX-XXXXXWithout -LicenseKey, the installer asks for the key before its log starts, so a typed key never lands in the log. Press Enter to skip and enter it in the panel later.
install.ps1 parameters#
| Parameter | Default | What it does |
|---|---|---|
-AdminEmail | empty | Email address of the admin account. |
-LicenseKey | asked | The license key. It is checked once the panel runs and replaced with SR-***** in the install log. |
-Hostname | empty | The panel's host name, used for its Let's Encrypt certificate and for mail. |
-Components | recommended | recommended, none, or a comma-separated list of component IDs. |
-HttpsPort | 9443 | The panel's HTTPS port. |
-HttpPort | 9080 | The panel's HTTP port; it only redirects to HTTPS. |
-InstallDir | C:\Program Files\StackRegent | Where StackRegent is installed. |
-DbPort | 8306 | Port of the panel's own database, bound to 127.0.0.1. |
-MariaDBSeries | 11.4 | MariaDB series used for the panel's own database. |
-MariaDBZip | empty | Path to a MariaDB Windows x64 zip, for servers where the download fails. |
Component IDs for -Components#
recommended stands for urlrewrite, dns, ftp, webdeploy, php, mailenable, roundcube, mariadb-hosting, phpmyadmin. You can also list IDs yourself, for example -Components "urlrewrite,php,mariadb-hosting,mssql,aspnetcore". Other IDs are vcredist, aspnetcore, nodejs, iisnode, git, composer, wpcli, mssql, spamassassin and modsecurity. Use none to install only the panel and add components later under Tools & Settings › Server Components. Components that need others (PHP needs the Visual C++ runtime, iisnode needs URL Rewrite, phpMyAdmin and Roundcube need PHP) say so in the panel.
What the installer sets up#
On a fresh server, install.ps1 works through these stages and prints each one as it goes:
- IIS. Adds the IIS web server role with the features StackRegent uses (ASP.NET 4.x, CGI for FastCGI, URL authorization, IP and domain restrictions, WebSockets, request tracing and others). On Server Core it skips IIS Manager.
- Windows baseline. Turns off SSL 2.0, SSL 3.0, TLS 1.0 and TLS 1.1 on the server side, sets strong cryptography for .NET Framework, requires SMB signing and turns off SMB 1, stops and disables the Print Spooler, requires Network Level Authentication for Remote Desktop, sets an account lockout policy when none exists, disables the remote management firewall rules for WinRM and WMI, and raises a fixed page file that is smaller than the RAM. Some of this takes effect after a restart.
- Panel database. Installs the Visual C++ runtime if missing, downloads MariaDB and creates the private panel database StackRegent SQL Server on
127.0.0.1:8306. - Files. Copies the program to
C:\Program Files\StackRegentand locksetcto SYSTEM and Administrators. - Configuration and services. Writes the configuration, creates the
adminlogin and registers the services StackRegent (web panel), StackRegentTask (task runner) and StackRegentGuard (brute-force guard). It also makes sure Microsoft Defender is present and excludes database files from real-time scanning. - Firewall. Opens TCP 9443 and 9080 for the panel, 80 and 443 for websites and 9444 for Website Preview in Windows Defender Firewall.
- Service Monitor. Adds the StackRegent Service Monitor tray app at administrator logon and Start menu shortcuts (skipped on Server Core).
- Check and components. Waits for the panel to answer, then installs the chosen components one by one.
The log is in C:\Program Files\StackRegent\var\log, in a file named install- followed by the date and time.
Ports to open in your provider's firewall#
Windows Firewall rules are created for you, but a cloud security group or a hardware firewall in front of the server must be opened separately. At minimum:
| Port | Protocol | For |
|---|---|---|
| 9443 | TCP | The panel (HTTPS) |
| 80, 443 | TCP | Websites and Let's Encrypt validation |
| 3389 | TCP | Remote Desktop, ideally only from your own addresses |
Add mail, DNS, FTP and the others as you install those components. The full table is on the requirements page.
First login#
At the end, the installer prints:
StackRegent is installed.
Panel: https://203.0.113.10:9443/
Login: admin
Password: ...Save the password at once; it is not stored anywhere in plain text. Open the address, accept the self-signed certificate warning, and log in. Then follow getting started. If you lose the password, run & "C:\Program Files\StackRegent\bin\stackregent.exe" admin-password to print a new one.
Re-running install.ps1 and uninstalling#
Running install.ps1 from a newer package on an installed server upgrades in place: it stops the panel services, copies the new binaries, updates the panel database and starts them again. Websites keep running. Usually you update from the panel instead; see updating StackRegent.
To remove the panel, run powershell -ExecutionPolicy Bypass -File "C:\Program Files\StackRegent\uninstall.ps1". It keeps the panel data unless you add -RemoveData, and it leaves IIS, MailEnable, MariaDB and other components in place. The installation chapter of the administrator guide has the details.
Frequently asked questions
How long does a StackRegent installation take?
Most of the time goes into adding the IIS role and downloading the components, so it depends on the server and its connection. The installer prints each stage and each component as it finishes, so you can see where it is.
Can I install StackRegent without a license key?
Yes, with the zip package: press Enter when install.ps1 asks for the key. The panel installs but stays restricted, showing only the License Information page, until you enter a key there. The one-line installer needs a key, because it downloads the release for your license.
Can I install StackRegent on a server that already runs IIS websites?
Install on a fresh server where possible. StackRegent manages the IIS sites it creates for subscriptions; sites that already exist are not turned into subscriptions. Bring existing sites in through a subscription with Website Importing, or with a migration from Plesk for Windows.
How do I install StackRegent on a different port?
Use the zip package with -HttpsPort and -HttpPort, or install normally and run stackregent panel-port 8443 afterwards. Open the new port in any firewall in front of the server.
Where is the install log?
In C:\Program Files\StackRegent\var\log, named install- followed by the date and time. The license key is masked in it and the admin password is never written to it.
Does the installer restart the server?
No. Windows sometimes asks for a restart after adding IIS, and some baseline settings such as the page file and protocol changes take effect only after the next restart. Restart when it suits you after the first login.