How to set up Virtualmin on Webdock
Last updated: October 26th 2021
Virtualmin is an open-source web hosting and cloud control panel. It enables users to create multiple managed hosting environments and avoid switching to different servers. It's secure and allows access to the server via an SSL-encrypted HTTP protocol.
- A fresh Webdock cloud Ubuntu Focal (Ubuntu 20.04) instance.
- You have shell (SSH) access to your VPS.
- Virtualmin licence (may not be necessary if you plan to use only the basic features)
Create a new shell user and SSH to your server
Create a new shell user. After creating the shell user, on the right side, enable "Passwordless Sudo" and apply the settings.
WebSSH into your Webdock server.
Update and upgrade the packages using:
$ sudo apt update && sudo apt upgrade
Fetch the installation script with:
$ sudo wget http://software.virtualmin.com/gpl/scripts/install.sh
Set hostname using:
$ sudo hostnamectl set-hostname example.com
Replace example.com with your domain or sub-domain and make sure to add the necessary DNS records to point the domain(or sub-domain) to your Webdock server IP address.
Enable executable permission to the script by executing:
$ sudo chmod a+x install.sh
Run the script now and enter y to start the installation process.
$ sudo ./install.sh
Wait for the installation to complete.
Once done you will be shown URL to manage the server.
Click on the URL. Ignore the SSL error for now (as this is a self-signed certificate) and proceed.
In the Virtualmin login screen enter your shell credentials (which you created earlier) to login.
Fixing network interface detection error
For some unknown reason, Virtualmin wasn't able to detect the network interface on the server. So we configure that manually.
After logging in, from the left column, go to System Settings → Virtualmin Configuration.
In the Configuration category dropdown choose Networking Settings. Not setting these will result in interface error. Set:
- Network interface for virtual addresses to eth0
- Default virtual server IPv4 address to your Webdock server IP address.
- Default IP address for DNS records to Same as virtual server IP
Now click "Save".
Then on the left-side bar click on Re-Check Configuration.
Click on return to virtual server's list. You should see post-installation wizard.
In the Post-Installation Wizard screen click Next and choose the options as per your requirement. In most cases, you can go ahead with the default options. However, for Primary nameserver make sure it is set to your domain (or sub-domain).
Note: If you're on Nano server, please choose the options carefully as some services are resource hungry.
Depending on the circumstances you may see a Connection Lost Warning. If you see, click on self-signed SSL certificate and bypass the warning. Then you should see that the connection is established.
Re-check the configuration.
Some points to keep in mind
- Some features of Virtualmin need professional licence. You can buy the licence from the official Virtualmin website. However, basic things like Wordpress, PHPMyAdmin, e.t.c need no professional licence.
- The script installs LAMP stack (not LEMP). You can choose to install LEMP instead by passing a command line argument (more about this here). However, official Virtualmin docs suggest to install LAMP. So the commands you used here installs LAMP instead of LEMP.
- Let's Encrypt SSL certificate can be generated once the post-installation process is done. Go to Server Configuration → SSL Certificate. Make sure to add DNS records for emails and such.
That's it. Now you can manage your server with Virtualmin.
If you have any issues with the setup feel free to comment below or contact Webdock support.