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

jwh's avatar
Level 2

Laravel Homestead on Windows / Linux

Hi all,

Sorry if this is a silly question. I have a lot of experience building PHP apps on Linux / Mac OS X, and recently installed and configured Homestead on my Mac without much difficulty at all. Homestead is great!

I am about to embark on a new project for a client in which I'd like to use Laravel. However, the client mandates that for security and compliance reasons, we host the app on their server. Their server is a Windows/IIS machine. They do, however, state we can run the app in a virtual machine within their server.

My understanding of virtual machines is a bit fuzzy. Which of the following options does this mean?

  1. On the Windows server, we will run a virtualised Linux installation which has Homestead installed within it - so from a code point of view, it will be just like developing on a Linux box?

  2. On the Windows server, we will install Homestead directly on to Windows, so my Laravel app will use Windows-based file paths and features etc?

  3. Something else entirely...?

If it's Option 2, how much does this change things when I'm coding the site day-to-day?

Thanks for clarifying this folks!

0 likes
3 replies
taijuten's avatar

My workplace hosts on IIS / Windows machines, but I think you may be misunderstanding one point.

Homestead is for development, not for production hosting.

You should be able to host a regular Laravel install on IIS, the only things to consider are as follows:

  • Storage and Bootstrap/cache folders will need file permissions changing to be writable by the IIS user (normally IUSR).
  • You will need to import the .htaccess files to web.config. IIS has a feature to do this, under URL Rewrites module.

Other than that, there's nothing special you need to do to run Laravel on a Windows hosting environment.

It may be worth getting the host to install composer however, if you're wanting to install packages on production rather than FTPing everything up.

jwh's avatar
Level 2

Thanks for clarifying @taijuten , much appreciated. What specifically about Homestead prevents its use for production hosting, especially with things like Forge out there which seem to offer this? I am familiar with Nginx and Apache but have never used IIS before so being able to run it in a familiar environment appeals more to me, but I want to do what's right.

The client has specifically requested we host it in a Virtual Machine to keep our code clear of the other stuff running on their server. Again, sorry this is a silly question... so I presume this will mean a clean installation of PHP/MySQL/etc. within the VM - just Windows copies of those packages? And the PHP/MySQL installed inside the VM won't be accessible or interfere with their existing software running outside the VM?

taijuten's avatar
Level 10

Forge doesn't use Homestead as such, but uses many of the same packages.

Homestead is simply a set of configurations for Virtualbox / VMWare, which tells it which packages to use, and how to map things for local development. Many of the default settings in Homestead aren't appropriate for a production environment, since it's assumed it's being used for local purposes only, therefore security is not a concern.

There are two options, depending on what your client is requesting.

They may be wanting you to host on their windows machine, but you can use whatever on the virtual machine. In this case, using what you're used to such as a Linux distro, will likely be the best option.

However, if they're to be managing / running the server for the application, it's more likely that they'll want it running on Windows / IIS, even if on a virtual machine. I imagine this to be the case, so that they can troubleshoot and monitor with their usual tools. In this instance, you'd install IIS(7?), and IIS has an application manager with which to install things such as PHP / MySQL. You can also install manually, and things such as the windows installer for MySQL are pretty easy to use.

Once again, if the Windows hosting is something that they're used to, then it could be worth asking them to set up the Virtual Machine for you, with IIS etc as they like to have it, and then you add your application as a new site in IIS.

Please or to participate in this conversation.