Virtualmin automatic postinstall wizard


I need to create fully automated virtualmin install so I have to skip manual post installation wizard, I don’t see any CLI tool for this so I’m wondering how can I make workaround for this. I made a list of post-installation wizard steps and how I can do them manually. Could someone look at this and check if it’s complete and should work fine? I’m afraid that post-install script making something in background and I don’t know about it.

  • Preload Virtualmin libraries? - /etc/webmin/virtual-server/config: preload_mode=
  • Run email domain lookup server? config-system
  • Run ClamAV server scanner? config-system
  • Run SpamAssassin server filter? config-system
  • Run MySQL database server? config-system
  • Run PostgreSQL database server? config-system
  • Set MySQL password: virtualmin set-mysql-pass --user root --pass NEWPASS, /etc/webmin/mysql/config
  • MySQL configuration size - probably should manually change my.cnf
  • Primary nameserver, Secondary nameservers (optional): /etc/hosts
  • Password storage mode (plain-text / only hashed): /etc/webmin/virtual-server/config: hashpass: 1

After all changes i need to set wizard_run=1 in /etc/webmin/virtual-server/config to avoid showing this script in web panel.

hi - what a nonsense you on about? -

  • ‘After all changes i need to set’ – your brain working again…

Unborn, it’s a valid question. There’s no need to criticize a legitimate question.

The CLI actually doesn’t solve the problem (but should, and I’ve added it to my to-do list).

There’s a way to tell Virtualmin that the wizard has already run. I will follow up shortly, when my internet comes back (winter storm has knocked it out, so I’m on my phone).

Joe, thanks for reply.

'There’s a way to tell Virtualmin that the wizard has already run" - I’ve mentioned it in my first post: “wizard_run=1 in /etc/webmin/virtual-server/config”
The CLI actually doesn’t solve the problem (but should, and I’ve added it to my to-do list). - it’s great to hear that! but until it’s impossible, is my idea of workaround should work fine?

Hi KitchM,

I want to create ansible script which will create VPS with virtualmin from A to Z, automatically. Settings will come from ansible parameters. I need to skip post-install wizard because non-technical people will use it. Ansible will create virtual servers etc. and end-users will have access to manage email accounts(for ex.). It could be many servers so I can’t log in to each of them manually and go through post-install process.

Yes, this is how I’ve handled automating setup in the past; it’s not really that painful, as-is…most programming languages have facilities for easily handling the key=value config file format we use. I’ve mostly used sed since it’s just a simple substitution problem in most cases, so each config change is a one-liner.

But, it would be nice if it were even easier and more self-documenting than that. I’m actually planning to introduce a webmin CLI in the 2.0 branch which is coming in the next few weeks, I think. I’d like to be able to do things like changing any config option for any Webmin module from the CLI, initiating a module installation from the command line, modifying a user, etc.

e.g. to make a change to a config variable, you’d do something like:

# webmin set-config virtual-server wizard_run 1

It’s a little bit verbose, but it is general and would cover any Webmin module including those we don’t maintain, which would be pretty powerful, I think, for scripting purposes. And, it’d be possible to do it via a web request (since we’d implement the same sort of HTTP API as in Virtualmin, though I might like it to be more REST-ful than the current API, which is somewhat old-fashioned), as well, making managing fleets of Virtualmin servers nicer. The amount code to accomplish this isn’t very high; a few hundred lines of code, maybe. And, the benefits will be pretty big for anyone with a lot of servers to deploy and manage.

ok, Thanks for Your opinion KitchM

Hi scooty,

Have you ever find a way to bypass the post installation wizard? I am trying to do the same automation thing but on a chef cookbook.

Please let me know. Thank you!

Hi @Joe,

Is your webmin CLI available and ready for use? I am not able to find anything related to this on google.


also interested in this question. I’m workin on installing virtualmin by running shell script. Aka wget -q -O - https://<my-site>/ | sh .
This script downloads and installs all needed packages to clean system, makes required changes in config files. And the system is ready to use.
It’s trouble for lot of clients to make something more than that. And same about postinstall wizard. So the idea is to create the script which can set up
virtualmin and short manual how to use it for own site and e-mail server.