Sevalla is the all-in-one PaaS for your web projects. Host and deploy your applications, databases, object storage, and static sites. Enjoy advanced deployment pipelines, a complete database studio, instant preview apps, and one-click templates. The pricing is simple: no hidden fees, no seat-based pricing, and you pay only for what you use. Get real human support from developers.

Get started now with a $50 credit at Sevalla.com.

Fixing Laravel Valet on macOS Sierra

Link –

I'm one of those people who runs beta software. A short time after the keynote is finished I'll update (or wreck) my phone with the beta version of iOS. My Mac generally gets the beta treatment not much later. Of course there are some risks involved. There's no guarantee that your applications will still work. Though your mileage may vary, it's my experience however that those betas are pretty stable.

With macOS Sierra there was one piece of software that didn't work properly: Laravel Valet. For some obscure reason Valet just stopped working after a couple minutes. The requests just hang. After some time an ERR_CONNECTION_REFUSED was displayed in Chrome. After running valet restart it ran fine for some more minutes. After poking around in the configuration of caddy, the webserver that powers Valet, and the php.ini file I found no solution. A complete reinstall of Laravel Valet did not solve the issue. I learned to live with the problem, regularly running valet restart. I even set up an alias for it.

But luckily Bryce Adams found the solution (Martin Bastien notified me about it). It's very simple: you just have to update the caddy server to the latest version manually. Here are the steps involved:

  1. Download `caddy_darwin_amd64.zip` from Caddy's releases page on GitHub.
  2. Extract the files and rename the main executable `caddy_darwin_amd64.zip` to `caddy`
  3. Copy it over and replace the old `caddy` file in this directory: `~/.composer/vendor/laravel/valet/bin/`
  4. Run `valet restart`
  5. Profit!

I hope this post can help all the crazy ones running beta software.


EDIT on 2016-09-21: alternatively, you could use the dev-sierra branch to get a working version of Valet on macOS Sierra.

EDIT on 2016-09-24: Adam has published a list of common problems and solutions for running Valet on Sierra.

Stay up to date with all things Laravel, PHP, and JavaScript.

You can follow me on these platforms:

On all these platforms, regularly share programming tips, and what I myself have learned in ongoing projects.

Every month I send out a newsletter containing lots of interesting stuff for the modern PHP developer.

Expect quick tips & tricks, interesting tutorials, opinions and packages. Because I work with Laravel every day there is an emphasis on that framework.

Rest assured that I will only use your email address to send you the newsletter and will not use it for any other purposes.