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

ChrisHelmsC's avatar

How exactly does Laravel Sail work on Windows?

I was looking at adding Sail to my existing project so a dev that's using Windows can join me. He has Ubuntu as his WSL2 OS. He was able to run the command to generate an example project:

curl -s https://laravel.build/example-app | bash

And a Laravel project containing Sail (within the vendor folder) is created. He can then run sail up and everything to run the example project and get the default Laravel launch screen.

When I try and convert my existing project, it works on my machine, but on his it won't. the vendor folder is gitignored by laravel and for a good reason since it houses dependencies. I can't find anything mentioning any modifications needed here. To pull down all the dependencies, including Sail, he would need PHP and Composer installed. Isnt the point of Sail to not have to do this on Windows? What is the benefit of using this approach over Homestead? I'm most likely very confused here.

0 likes
2 replies
CorvS's avatar
CorvS
Best Answer
Level 27

@chrishelmsc

To pull down all the dependencies, including Sail, he would need PHP and Composer installed. Isnt the point of Sail to not have to do this on Windows?

Actually you still have to do it, but it's happening inside the docker container.

What is the benefit of using this approach over Homestead? I'm most likely very confused here.

The benefit is, that you "only" have to install Docker, which is widely used for deploying applications. Still, IMO it's only worth using when you have Docker installed anyway.

When I try and convert my existing project, it works on my machine, but on his it won't

I assume he just pulled the repository on his Windows machine and that's it? He has to create a docker container, which then allows him to install the rest: https://laravel.com/docs/8.x/sail#installing-composer-dependencies-for-existing-projects

ChrisHelmsC's avatar

Really appreciate this. He's not well versed in docker or in Laravel and I was in a rush, so I didn't scan that far down the page. Honestly I think that text is a little poorly placed.

I appreciate the help!

1 like

Please or to participate in this conversation.