VPS on rails - Hosting SilverStripe on CloudWays

I recently went on a quest to find high performance (VPS-like) hosting, without the headache of managing a VPS.

After researching a lot of companies, I tried supposed ‘managed VPS’ products from Dreamhost and Liquid and found them both lacking. I eventually gave CloudWays a try and haven’t looked back. I thought I would share my experience and configuration in case it helps others.

What’s different about CloudWays

Cloudways seems to be unique as a hosting provider, because they let you choose off-the-shelf VPS configurations from providers like Digital Ocean, AWS or Vultr, but you don’t get direct (root) access to the VPS. CloudWays spins up their own software stack on ‘your’ VPS and handles OS security and performance optimisations, and gives you very limited access to configure certain settings and packages through their control panel. It’s a highly opinionated setup and it won’t work for everyone, but for me, I’m finding it to be the perfect balance. The control panel is far cleaner than something like cPanel because there are so few options and it seems perfect for a modern hosting environment.

Some advantages of CloudWays

There are lots of nice features in CloudWays but these are the things that stood out to me:

  • Automated incremental backups as often as you like (I do daily)
  • CloudWays margins aren’t huge, so you don’t pay all that much more to CloudWays than you would pay a service provider (e.g. Digital Ocean) directly for an unmanaged VPS
  • Choose from 5 providers and many data centres around the world (I host websites for North American clients on Digital Ocean and Australian clients on Vultr)
  • Easily host multiple websites on each server if you want
  • One click SSL with Let’s Encrypt
  • Try for free
  • Easily clone applications (e.g. for staging purposes)

Some limitations of CloudWays

These things don’t matter for my purposes, but could be a drawback in some cases

  • No root SSH access (you have SSH access, but not root)
    • This means you can’t install new packages, but popular web development packages (git, composer, npm etc.) are already installed
  • Invoicing is in USD only (I think)
  • Phone support costs extra
  • You can’t limit an application’s bandwidth or disk space (but you can monitor it)

My CloudWays configuration for SilverStripe hosting

This isn’t necessarily best for everyone but it’s working well for me so far, with a 2GB Digital Ocean droplet.

Getting started

When you first create a server you’ll be asked to create your first application as well. Choose ‘PHP Custom App’ for Application type.

Server configuration

I can’t quite remember now what I changed from the default but I think this is most of it:

  • Manage Services
    • Disable Varnish
  • Settings & Packages
    • Basic > Memory Limit 512mb
    • Basic > Set appropriate timezone
    • Packages > PHP: PHP 7.3
    • Packages > MySQL: MariaDB 10.3
    • Maintenance > Schedule regular server maintenance for a time that will have minimal impact on your audience
  • Backups
    • I back up once a day, around 2am of my target audience, and retain for 4 weeks.
      • Backups are incremental so it shouldn’t cost a lot more to increase the frequency, but the backup process uses server resources so doing more than daily might impact performance.
    • I have local backups enabled, and download them to my dev computer once a week using this script, as an extra precaution.
  • SMTP
    • I use Postmark and really like it, but there are lots of alternatives. MailGun could be free or very cheap for apps with low email volume.

Application configuration

  • Access Details
    • Application Credentials
      • I create a user for each application and upload my dev machine’s public SSH key for password-less SSH access.
  • Domain Management
    • Enter any domains this application should be accessible at
  • SSL Certificate
    • Install a Let’s Encrypt certificate with auto renewal. You need to do this after you’ve pointed your DNS A records to CloudWays.
  • Application Settings
    • General > Change webroot to public if using SS4 with the public folder, or current/public if using Deployer.
    • General > Enable application-level SSH access (may not be necessary for everyone)
    • General > Enable https redirection if you like (easier than editing .htaccess file)
    • PHP FPM > If using Deployer, add php_admin_value[opcache.revalidate_path] = 1 ; for recognising when symlinks change after deployment.

Tip: You could create a boilerplate application with all your basic settings in place as a starting point, and clone that application each time you need to host another SilverStripe website.

Give it a try

I’m really liking CloudWays so far, and combined with Deployer for atomic deployments, and local backups, I feel a lot more confident about my hosting setup now.

You can try CloudWays free for 3 days (no credit card needed), and here’s a referral link you can use to get a bonus $25 USD credit as well. Disclaimer: If you use that link and end up loving CloudWays and staying on then I will get a little credit too :wink:.

If you notice any additional configuration settings that could be tweaked for optimal SilverStripe performance, or pros or cons that I didn’t list please leave a comment.

2 Likes

Is the offer with a free trial for 3 days still active?