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
sudo sh virtualmin-install.sh
Open:
http://<IP>:10000
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 Settings for Hostname:
- Click on Virtualmin
- Click on
Email Settings
- Click on
DomainKeys Identified Mail
- Click on
Domains currently signed for
- Click on
hostname.example.com
It will be marked as selected. Then follow the steps from following video:
Ref: https://www.youtube.com/watch?v=8fGo2BtZqAQ
Step 2: Install Php Packages:
# 1. Update package list
sudo apt update
# 2. Install prerequisites
sudo apt install software-properties-common -y
# 3. Add the PHP PPA
sudo add-apt-repository ppa:ondrej/php -y
# 4. Update package list again
sudo apt update
# 5. Now install PHP 8.2 and required extensions
sudo apt install php8.2 php8.2-{cli,fpm,cgi,common,mbstring,gd,xml,curl,zip,imap,mysql,opcache,xsl} -y
sudo service apache2 restart
Step 3: Update php.ini
- Login to VirtualMin Dashboard > Webmin > Tools > PHP Configuration > Edit Manually
- Copy and paste the https://gist.github.com/themodernpk/8c5e21ec81eb3e4fb6bfb57c9365a28f
- Click on
Save and close
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
curl -sS https://getcomposer.org/installer -o composer-setup.php
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
sudo composer self-update
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
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
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"
command -v nvm
Close the terminal/ssh and login again then try
nvm -v
To get list of node versions:
nvm list-remote
To install node:
nvm install v20.19.2
npm i npm -g
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>
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
Top comments (0)