Directions for automating

Hello,

I am trying to automate the setup of a host which will act as a reverse proxy. The default server template adds www. admin. webmail. etc to the directives, which are useless for my case and also makes the automatic Let’sEncrypt to fail as those subdomains do not exist.

I can create a new server template that excludes those, and then use that template. Now the question is, what is the best way to automate adding a server template to Virtualmin? I would like to use this on many servers and avoid manually going through creating templates on each one. I couldn’t find in the documentation a way to use CLI to add a new Server Template, so I wonder what would you suggest in my case.

Any help in directing me to the right way is highly appreciated.