How to implement licencing to prevent piracy?

I have built a small app to be used for a very small niche market but the customers are not tech savvy and having very limited budget to avail it on cloud.

Most of them wants to install on premise and they all have Windows!

Any suggestions on how to reliably install Rails app on windows and prevent from copy theft?