Webform to create user account.

I purchased a Virtualmin Pro licence in the hopes of starting an ISP. Is there a webform my users can fill out that can be processed like a script to automatically set up their accounts? The thought of setting up hundreds of accounts manually is horrifying.



Out of the box, there is not. But, there's a few of options for you:

  1. Using the API, you could create a web app that enabled customers to sign up for an account. You can see what all is available to you here by typing "virtualmin" on the command line. There's more details here:



  2. If you happen to have a list of folks you wish to add, you can batch create Virtual Servers using Add Servers -> Batch Create Servers.

  3. The Virtualmin software doesn't getting into the user billing realm, but tools like WHMCS do. WHMCS provides a number of features, including the ability to have users sign up for any of the account plans you created, and will begin billing them whenever you specify. You can see more info about that here:


Also, by accounts do you mean domains or mailboxes? Because we do have a plugin that allows users to create their own mailboxes in some domain - you can install it with the command :

apt-get install webmin-virtualmin-signup

Then enable it as a feature for your domain on the Edit Virtual Server page. The mailbox signup form can then be accessed at https://yourserver:10000/virtualmin-signup/ , without needing to login.

What is the format for batch create? Can It import csv or mdb files? Does WHMCS interact with virtualmin pro at all?


Howdy -- well, the format for the import is described on the Batch Import page, but it essentially can import data in text files using this format:


There's a "Help" link on the page that goes into more detail on the formatting.

As far as WHMCS goes -- it works with both Virtualmin GPL and Pro. They offer a 15 day trial if you'd like to give it a shot.

Joe's picture
Submitted by Joe on Mon, 08/10/2009 - 15:39 Pro Licensee

And we've heard nothing but good things from WHMCS customers, so I we can definitely recommend it.

It would be pretty easy to write a script to take a csv and convert it into the batch format. Though, usually, when I have a lot of users to create and a file containing the data, I'll write a script to call the API directly.

You could wrap the following command up in a for loop in a perl or ruby or python script very easily:

virtualmin create-domain --domain $domainname --pass $random --desc "$description"

And you can add any other options you like...everything in the UI is accessible from the command line. Just use "virtualmin create-domain --help" to get a list of options, or check the API docs Jamie linked.

You'd just set the variables in each iteration of the loop. Most scripting languages have the ability to act on each line in a file as part of a loop, making this kind of thing doable in four or five lines of code. PHP might take ten lines of code, but it's still pretty easy, if you're more familiar with PHP.