Thanks for the post! You would be able to use the trigger example/approach with a TestRail Cloud account. You would simply place the server-side trigger script on the server where you would like to execute/run the tests on (usually on your private network). TestRail would not need to be able to connect to your server, as the connection/glue is made via the UI script in TestRail and via your web browser. You can also write the server-side script in any other programming language and our script is only an example.
That said, triggering tests from TestRail is optional as you can also trigger your automation outside of TestRail either manually, scheduled, or via a CI system and then use TestRail’s API to submit the test results to TestRail.
Hope this helps!