Short Leash on Windows
Short Leash runs on Windows 10 and 11 (64-bit), with the same sites, services, sharing and pairing as on a Mac. If something doesn't work, report it. Download it from shortleash.dev and run the installer; it installs for your user account. The installer is signed through Azure Artifact Signing, so Windows can show who published it. Until the signature has built up a reputation, Windows may still show Windows protected your PC the first time: choose More info, check the publisher is Frank The Programmer LLC, then choose Run anyway.
Some things will differ: PHP comes from the official Windows builds, Garnet replaces Valkey and Redis as the Redis-compatible service, and Memcached, Typesense, Swoole and a few PHP extensions are Mac only (PHP). Short Leash starts with Windows from your user account, with no Windows service.
PHP, MySQL, PostgreSQL and MongoDB on Windows need Microsoft's Visual C++ runtime. If your PC doesn't have it, or has an older version than the one that comes with Short Leash, the installer adds it with Microsoft's own installer, which asks for administrator rights once. If you decline, Short Leash still installs and runs, but PHP sites and the databases say a Windows DLL is missing until you install the Visual C++ Redistributable (x64) yourself or reinstall Short Leash. The PHP 8.6 preview needs version 14.51 or later of the runtime: on an older one, installing it and its sites say so, and installing the latest Redistributable from Microsoft fixes it. Removing Short Leash leaves the runtime, because other programs use it too.
PHP on Windows is downloaded from windows.php.net and checked against the checksum published there. Windows has no php-fpm, so each PHP version runs four php-cgi workers on 127.0.0.1, and each worker is replaced after 500 requests. Besides the common extensions, Short Leash loads gettext, ldap, ffi, dba, odbc, pdo_odbc, tidy, enchant, shmop and sysvshm from the official build, and imap on PHP 8.3 and older, and adds Short Leash's own builds of redis, apcu, igbinary, msgpack, mongodb, opentelemetry, grpc, sqlsrv, pdo_sqlsrv and pcov (PHP). Xdebug uses the matching DLL from xdebug.org rather than being built on your computer. In the terminal, php and composer are small .cmd files in Short Leash's bin folder that run leash php and leash composer.
What setup changes
Setup makes two changes, and Settings › Remove › Remove system changes… undoes both.
| Change | How it's made | Asks for |
|---|---|---|
One name resolution rule that sends .test lookups to 127.0.0.1, with the comment Short Leash |
A PowerShell script Short Leash writes to its generated folder and runs once with administrator rights |
Windows's administrator prompt |
Short Leash Local CA in your user's trusted root certificates, limited to .test |
certutil -user -addstore Root, run as you |
Windows's certificate security warning |
Setup shows two prompts. The administrator prompt names Windows PowerShell, because a PowerShell script makes the change. The certificate security warning asks Do you want to install this certificate?; choose Yes. Windows always shows it for a new trusted root, and Short Leash can't skip it.
Nothing else runs as administrator. Short Leash's DNS server listens on 127.0.0.1:53, because the name resolution rule can't name another port. If another program holds port 53, 80 or 443, setup names it and its process id; close or stop that program and run setup again. Short Leash never stops it for you.
To check that .test names reach Short Leash, use Resolve-DnsName shop.test in PowerShell. nslookup ignores name resolution rules, so it can't find .test names even when they work. If your computer is managed by an organization whose Group Policy sets its own name resolution rules, Windows ignores Short Leash's rule; ask whoever manages the computer to add one for .test.
Your terminal
Settings › Terminal adds Short Leash's bin folder to the front of your user Path, so new terminal windows run Short Leash's php, composer and leash. Turning it off removes that one entry; every other entry stays as it was. A PHP in the system Path still comes first, because Windows reads the system Path before yours.
Undo it by hand
If Short Leash is already gone, you can remove its changes yourself. In PowerShell run as administrator:
Get-DnsClientNrptRule | Where-Object Comment -eq Short Leash | Remove-DnsClientNrptRule -Force
Then, in a normal PowerShell window:
certutil -user -delstore Root "Short Leash Local CA"
Remove Short Leash's bin folder from your user Path in Settings › System › About › Advanced system settings › Environment Variables if you turned the terminal option on.