Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

bionary's avatar

Valet Longer Working (dnsmasq troubles)

I've had a local Valet setup on MacOS Big Sur serving php 8 for over a year now with no problems. I just attempted to install mailhog via brew. Things didn't work so I tried reinstalling Valet and now things really stopped working.

I am horrible at sys-admin stuff so I'm not quite sure how to get things back.

I've run brew doctor, valet install, etc.

None of my local sites work with Valet anymore. I get browser error: "This site can’t be reached"

running valet parked shows all the correct test sites

I run valet restart then check brew with brew services list and get this:

Name   | Status | User | Plist
dnsmasq | error | root | /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
httpd  | stopped      
mailhog | stopped      
mysql   | started | me | /Users/me/Library/LaunchAgents/homebrew.mxcl.mysql.plist
php     | started | me | /usr/local/Cellar/php/8.0.8_1/homebrew.mxcl.php.plist
[email protected] | stopped

So it looks like dnsmasq is causing some trouble here. Any ideas how to fix this? ALSO: I noticed that dnsmasq user is root (as reported via brew services) and not me so I tried: sudo chown $USER /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist but then discovered....

that inspecting the file: /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist via command line claims I am the owner. (not sure what is going on here and if this has anything to do with valet not working)

0 likes
1 reply
bionary's avatar
bionary
OP
Best Answer
Level 6

Well I eventually fixed the problem by doing a full Valet removal and install. valet uninstall --force Then I followed all the guidance given that comes up on the screen after running that command.

Finally did valet install and I was off to the races!

Note running brew services list reports status errors for: dnsmasq and nginx. Not sure why that is and I'm sure there is some super long-winded nerdy-ass command line answer to that, but valet seems to working fine so I'll just ignore those brew errors for now

1 like

Please or to participate in this conversation.