You can now set up Varnish cache for your Magento site through the Nimbus Hosting platform. Varnish is supported on our platform for our Oxygen package and higher and for sites running Magento 2.4 and newer.


Before getting started with Varnish you will need to install Magento 2.4 through the Nimbus Hosting platform following our guide which can be found below:

Installing Magento 2

Steps

  1. Before you enable Varnish for your site you will need to log into the Magento 2 admin dashboard and export the sites Varnish config file. This can be found in:.

    Stores> Configuration> Advanced> System> Full Page Cache> Varnish Caching> Export VCL for Varnish 6

  2. Once you have the VCL file, enable the toggle button in the platform.
  3. You'll then be promoted to upload the VCL
  4. Either drag and drop your VCL file or click the "Upload custom VCL file" box and search for your on your local computer. Then click "Upload"

  5. If all goes smoothly then the sites will start loading through Varnish. If you find it’s not worked and you see a message such as “503 backend fetch failed” then simply un-toggle the Varnish button in the platform and it will revert back to normal.

  6. You can confirm that requests are going though Varnish by logging onto the server via SSH and running the "varnishlog" command. 

Summary

For further reading and help with using Varnish on your website please see the Magento 2 developer documentation below:

https://devdocs.magento.com/guides/v2.4/config-guide/varnish/config-varnish.html