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 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
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

Heroku

Build AI apps faster with Heroku.

Heroku makes it easy to build with AI, without the complexity of managing your own AI services. Access leading AI models and build faster with Managed Inference and Agents, and extend your AI with MCP.

Get Started

Top comments (0)

Feature flag article image

Create a feature flag in your IDE in 5 minutes with LaunchDarkly’s MCP server 🏁

How to create, evaluate, and modify flags from within your IDE or AI client using natural language with LaunchDarkly's new MCP server. Follow along with this tutorial for step by step instructions.

Read full post

👋 Kindness is contagious

Dive into this compelling post celebrated by our lively DEV Community. Developers everywhere are invited to share insights and uplift our collective expertise.

A simple “thank you” can make someone’s day—drop your appreciation in the comments!

On DEV, sharing expertise sparks growth and tightens our community bonds. Found this helpful? A quick nod to the author goes a long way.

Get started