DEV Community

Pradeep Kumar
Pradeep Kumar

Posted on β€’ Edited on

Install & Setup VirtualMin on Ubuntu

Steps to install and set up VirtualMin hosting control panel on Ubuntu 22.

Step 1: Install VirtualMin

Ref: https://www.virtualmin.com/download/

wget https://software.virtualmin.com/gpl/scripts/virtualmin-install.sh
Enter fullscreen mode Exit fullscreen mode
sudo sh virtualmin-install.sh
Enter fullscreen mode Exit fullscreen mode

Open:

http://<IP>:10000
Enter fullscreen mode Exit fullscreen mode

Step 1.1: Setup SSL for Hostname:

Make sure you have added A record of hostname point to WebMin IP.

Login to WebMin -> Click On VirtualMin -> System Settings -> VirtualMin Configuration -> From Configuration category drop down select SSL Setting -> Choose Setup SSL certificate from provider for hostname -> Save

Now, hostname will be available in dropdown of virtual servers which is visible just below the VirtualMin Menu at top.

Select the hostname -> Click on Manage Virtual Server -> Setup SSL Certificate -> SSL Provide -> Click on Request Certificate

It will generate SSL Certification, now open https://:10000 in incognito mode. It should open without any warning.

Step 1.2 Configure Mail Setting:

Ref: https://www.youtube.com/watch?v=8fGo2BtZqAQ

Step 2: Install Php Packages:

sudo apt install php8.2-{cgi,cli,fpm,pdo,gd,mbstring,imap,curl,xsl,mysqlnd,opcache,curl,xml,zip}
Enter fullscreen mode Exit fullscreen mode
sudo service apache2 restart
Enter fullscreen mode Exit fullscreen mode

Step 3: Update php.ini

Step 4: Update mysql root password

Login to VirtualMin Dashboard > Webmin > Servers > MySql Database or MariaDB Database Server > User Permissions > Click on root and update the password

Step 5: Install Composer

Ref: https://www.cherryservers.com/blog/how-to-install-composer-ubuntu

sudo apt install curl
Enter fullscreen mode Exit fullscreen mode
curl -sS https://getcomposer.org/installer -o composer-setup.php
Enter fullscreen mode Exit fullscreen mode
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
Enter fullscreen mode Exit fullscreen mode
sudo composer self-update
Enter fullscreen mode Exit fullscreen mode

Step 5: Install Gitlab Runner

Ref: https://dev.to/themodernpk/install-gitlab-runner-on-ubuntu-hcg

Step 6: Install Git FTP

sudo apt install git-ftp
Enter fullscreen mode Exit fullscreen mode

Step 7: Install Node using NVM

Ref - Method 3: https://itsfoss.com/install-nodejs-ubuntu/

Note: You need to follow these steps in every Virtualmin domain if you want a node in that account.

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
Enter fullscreen mode Exit fullscreen mode

Then run following commands:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
Enter fullscreen mode Exit fullscreen mode
command -v nvm
Enter fullscreen mode Exit fullscreen mode

Close the terminal/ssh and login again then try

nvm -v
Enter fullscreen mode Exit fullscreen mode

To get list of node versions:

nvm list-remote
Enter fullscreen mode Exit fullscreen mode

To install node:

nvm install v20.19.2
Enter fullscreen mode Exit fullscreen mode
npm i npm -g
Enter fullscreen mode Exit fullscreen mode

Step 8.0: Update Account Plans

Login to VirtualMin Dashboard > System Settings > Account Plans > Default Plan - CLICK to EDIT the Plan

Step 8.1: Create Virtual Server (Domain Hosting)

Login to VirtualMin Dashboard > Create Virtual Server

Step 9: Make new Virtual Server User as Sudo

Login using Main account of ubuntu and run following command:

sudo usermod -aG sudo <Virtual Server User>
Enter fullscreen mode Exit fullscreen mode

Step 10: Get SSL Certificate

Update A record to your VirtualMin IP and then run following command:

sudo virtualmin generate-letsencrypt-cert --domain example.com
Enter fullscreen mode Exit fullscreen mode

Top comments (0)