Run Appium tests on remote machine where devices connected but Appium server installed and running locally

Hi Appium guys,

Is there any way that I can run Appium server locally but test should run on remote machine where iOS/Android devices are connected.

Ex:
I have a scenario where Appium server and my test scripts hosted locally on my Mac machine, but i need to run test on remote windows machine where my actual devices(iOS and android) are connected.Can we do this, if it is can somebody suggest me or guide me on how to do this.

Thanks in advance.