WHMCS getting error when tries to create hosting account

Hey guys - wondering if anybody’s ever seen this:

I’ve got WHMCS and Virtualmin Pro both set up based off their appropriate docs. I’ve configured the Virtualmin server in WHMCS, set up templates and plans in Virtualmin and defined a product in WHMCS that should use those.

But…when I bring up a new order that has yet to be provisioned and click the “Create” module command button, the response I get is…

“Module Command Error
Unknown option SecureHosting”

(SecureHosting is the name of the Template I defined on both sides)

Has anybody seen something like this, or any suggestions on how I can debug it? I’ve tried turning on debug logs in Virtualmin, but the output didn’t give any errors or secrets away. I’m able to call the API with wget on the server running WHMCS, although it does complain about the self-signed certificate that Virtualmin is using…

Any thoughts appreciated. I’ve opened a ticket with WHMCS but figured it’d be worth asking on this side as well.


WHMCS support figured it out - I’ll put it here as well just in case anybody else runs into this. I had configured WHMCS so that a hosting order didn’t have to specify the domain name. Virtualmin can’t create a virtual domain without a domain name, go fig. :wink: So this was fixed by deleting the order with no domain name, then modified the product definition to require domain name with order.


Cool, I’m glad you got it worked out… thanks for posting the solution here!


Don’t you think it’s a bug that has to be issued?
For example if i plan to sell just sell postgresql hosting, and define my template and plans as is, customer doesn’t need to give a domain, just a username? am i wrong?


Virtualmin can only have accounts that are associated with a domain name.

So if you had a customer that just wanted database hosting – their account would still need to be associated with some sort of domain name (even if it’s a sub-domain of the main server domain name).

If you figured out a way to create new accounts within Virtualmin that aren’t associated with a domain name, let me know how you did that so I can look into it further :slight_smile:


The “domain name” doesn’t even need to be or look like an actual domain name. It can be any dummy name that consists of domain-name-valid characters. You can e.g. use “customer1”, “customer2” etc., or use the same name as for the administrative user.

If you don’t turn on the BIND or Apache or Mail feature, the domain name is merely used to determine paths where to store the user’s home directory.

For the automation systems, writing a domain name for sql hosting seems pretty ugly, isn’t there anyway that we can give username’s as parameter?

As I said, you can enter anything you’d like as domain name, also “customer1”, “customer2” etc. As long as you don’t use BIND or Apache, the domain name doesn’t matter.