Roots Discourse

How to: 1 virtual machine (VM) for multiple clients Kinsta hosted sites

Summary: Each client has its own Trellis stack, which has its own VM, which takes up 5GB/vm

When working with a new client I have them sign up for their own Kinsta account. This allows them to maintain ownership of the account while allowing us the to use the Roots stack to build and deploy their site.

However this means every new client stack requires its own Ubuntu virtual machine (VM) which takes up a lot of space and seems redundant since Kinsta doesn’t use the provisioning aspect of Trellis and the configuration will not vary much if at all between clients.

This also requires spinning up and down the different VMs in order to switch projects adding time and friction.

Does anyone know how to use one VM for multiple Trellis configurations so I don’t have a 1-to-1 relationship between clients and virtual machines and can save time and space?

I’m not sure you could do that with multiple Trellis stacks, although you could might be able to make one Trellis with multiple sites and deployments?

You also don’t have to use Trellis’s VMs, and to some extent there’s less reason to if you’re not using Trellis to provision/manage remote servers, since you’ve already lost the dev/prod parity advantage. We also host on Kinsta and use Trellis to deploy, but I haven’t used Trellis local VMs in a long time–as you say, if you have a lot, they take up a lot of space. Instead you can just use whatever you like that fits your needs better. I used Laravel Homestead for a while, but for the last year or so I’ve been using Devilbox. Homestead is definitely more familiar if you’re used to Trellis, but IME Devilbox has been a better experience once I got the hang of it–less restarting the machine, and quite a bit faster. I don’t know what platform you’re on, but I’ve used both on Linux and Windows, and my co-workers run them on MacOS too.

1 Like