Skip to content

Virtualmin on the command line

Christophe TREMBLAY-GUILLOUX
Christophe TREMBLAY-GUILLOUXLinux systems engineer
bash
virtualmin create-domain --domain xxx --pass 'PASSWORD' --plan 0 --features-from-plan --template <TEMPLATE> --acme-never
  • 'Default Settings': standard, with PHP and MariaDB
  • Static: for static files, no PHP, no MariaDB
  • Redirection: to redirect a website, though it is better to produce a simple configuration with Puppet
  • PHP-noDB: based on Default Settings but without creating a database
bash
virtualmin create-domain --domain xxx --parent yyy --template 'Default Settings' --acme-never
bash
virtualmin_info.sh xxx

Change the quota of the domain:

bash
virtualmin_setquota.sh xxx 20GB

Change the quota of the domain admin:

bash
virtualmin_setquota.sh xxx 20GB --user
bash
virtualmin modify-domain --domain xxx --unprotected
bash
virtualmin delete-domain --domain xxx
bash
virtualmin install-cert --domain xxx --cert cert.pem --key privkey.pem --ca chain.pem
bash
virtualmin list-certs --domain xxxx

Generating an SSL certificate with Let's Encrypt and enabling auto renewal

Section titled “Generating an SSL certificate with Let's Encrypt and enabling auto renewal”
bash
virtualmin generate-letsencrypt-cert --domain xxx --renew
bash
virtualmin modify-web --domain xxx --letsencrypt-renew
bash
virtualmin list-php-versions
bash
virtualmin set-php-directory --domain xxx --dir . --version 8.2

Seeing the PHP version assigned to a domain

Section titled “Seeing the PHP version assigned to a domain”
bash
virtualmin list-php-directories --domain xxx

Replace yyy with the name of the php.ini key for the site:

bash
virtualmin list-php-ini --domain xxx --ini-name yyy

Changing a php.ini variable for the domain

Section titled “Changing a php.ini variable for the domain”

Replace yyy with the name of the php.ini key for the site, and zzz with its value:

bash
virtualmin modify-php-ini --domain xxx --ini-name yyy --ini-value zzz

Removing SSL support for a domain, to keep only HTTP

Section titled “Removing SSL support for a domain, to keep only HTTP”
bash
virtualmin disable-feature --domain xxx --virtualmin-nginx-ssl