Installing Coaster CMS on Windows

Happy New Year! Recently, we’ve noticed quite a few issues crop up on Github citing installation problems when trying to configure Coaster CMS on Windows. This mostly affects cURL when running various Composer commands. Here are a few steps you can take which will help prevent any potential issues:

  • Temporarily disable the Windows Firewall whilst running Composer commands.
  • Install a .pem certificate (more on this below).
  • Use a virtualised solution such as Docker or Laravel Homestead.

For some reason or another the Windows Firewall can sometimes interfere with outgoing connections made by cURL. Momentarily disabling the firewall can often help when running Composer commands – just remember to re-enable it once you’re done.

The main issue with cURL on Windows is that it uses Microsoft’s own SSL library, rather than OpenSSL (commonly used on macOS and Linux). The solution to this is to install a certificate and reference it within the PHP.ini file. We’ve detailed the steps on how to do this below.

Configuring cURL

Download the cacert.pem file from (http://curl.haxx.se/ca/cacert.pem) and place it within your WAMP or XAMPP directory. Then reference it in your PHP’s .ini file, by copying and pasting the following line into your file. Change this directory to the location of your cacert.pem file.

curl.cainfo = “C:\xampp\php\extras\ssl\cacert.pem”

Make sure this line isn’t duplicated anywhere else within the file, and remove any semicolons from the start of the line. Save this, and restart WAMP. This ensures the new configuration is loaded correctly.

If all has gone well, Composer will now be able to download files over HTTPS. If not, check to see whether your antivirus program or firewall could be interfering with the connection. As a last resort, we do recommend trying Docker or Laravel Homestead, we’ve found it to make our lives much easier when developing under Windows. It also works great when developing other projects, not just Coaster.

A Last Resort

Alternatively you can try commenting out the offending lines within the updateAssets file, and instead download the files manually. To finish you will need to create your own version of the assets.json file located inside storage/app/coaster, paste in the following code and save:

{“app”:”v5.3.24″,”bootstrap”:”3.3.6″,”filemanager”:”v9.10.1″,”jquery”:”1.12.0″,”jquery-ui”:”1.11.4″,”securimage”:”3.6.3″,”ace”:”1.2.5″}

This tricks Coaster into thinking it has downloaded the packages through Composer.

We hope this post has helped those of you who develop their websites on Windows. Feel free to comment below if you run into any issues and we’ll be sure to help.