Closed bcdennis closed 1 month ago
Note for anyone who might stumble upon this looking for a solution for running Horizon with a Herd for Windows.
1.) To install Horizon from Windows, you'll need to get composer to ignore two platform php extensions that Horizon relies upon (ext-pcntl and ext-posix). The simplest way is to update your composer.json with:
"platform": {
"ext-pcntl": "7.1",
"ext-posix": "7.1"
},
2.) As Horizon will be running on your WSL instance, you'll have to ensure the php version that is installed in your WSL has those extensions.
Once those two things are done and your redis.conf is updated, update your .env with the IP address of your host machine for redis and, for now, open up a Windows command prompt (not powershell), navigate to the redis executables installed by Herd and launch redis with:
redis-server.exe redis.conf
Redis (and all other services) now automatically write and use a default configuration file.
Platform
Windows
Operating system version
Windows 11
System architecture
Windows
Herd Version
1.6.1
PHP Version
Php 8.3
Bug description
My objective was to be able to run Horizon from WSL and connect to the redis that's running on the windows host.
Redis' default configuration is to run in "protected mode" when no password is set and forbids any connections that aren't sourced from the loopback interface.
However, redis.conf can be modified to disable this: protected-mode no
When launching redis from the Herd GUI, any changes to redis.conf are not honored. When launching redis from Windows command prompt and passing the config file as an argument, redis does honor the config, e.g. C:[your herd install location]\bin\services\redis\7.0.0>redis-server.exe redis.conf
Having redis to listen on multiple interfaces and removing protected mode allows a windows herd user to run Horizon from WSL as easily as pointing redis to the IP of the host machine (not the loopback ip), which can be obtained by running ipconfig from a windows prompt.
Steps to reproduce
Stop Redis in the Herd gui. Modify redis.conf that's co-located with the redis-server.exe executable. Start Redis in the Herd gui.
Relevant log output
No response