Virtualmin together with LAMP is a great setup for basic server needs. This tutorial is meant for Ubuntu and Debian.
Login with ssh and make sure everything is up to date
$ sudo apt-get update
$ sudo apt-get dist-upgrade -y
Install Virtualmin with
$ wget http://software.virtualmin.com/gpl/scripts/install.sh
$ sudo /bin/sh install.sh
Optionally you can change the password for Webmin/Virtualmin so you don’t have to use the root password
$ sudo /usr/share/webmin/changepass.pl /etc/webmin root yourpassword
$ sudo systemctl restart webmin
3. If the stack is successfuly installed go to https://FQDN:10000, login and finish the post-installation wizard. Be sure to use hashed passwords!