PHPackages                             arpanadhikari/virtualmin-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. arpanadhikari/virtualmin-sdk

ActiveLibrary

arpanadhikari/virtualmin-sdk
============================

Unofficial SDK for Virtualmin Control Panel. Fork of snscripts/virtualmin-sdk

0.3.4.1(5y ago)09MITPHPPHP &gt;=5.5.0

Since Jul 10Pushed 5y agoCompare

[ Source](https://github.com/arpanadhikari/virtualmin-sdk)[ Packagist](https://packagist.org/packages/arpanadhikari/virtualmin-sdk)[ Docs](https://github.com/arpanadhikari/virtualmin-sdk)[ RSS](/packages/arpanadhikari-virtualmin-sdk/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (4)Versions (11)Used By (0)

Virtualmin Control Panel SDK
============================

[](#virtualmin-control-panel-sdk)

[![Author](https://camo.githubusercontent.com/9d903e7623152bba92e485dae02e0ffe50922554087701bab4ab685ea10150d2/687474703a2f2f696d672e736869656c64732e696f2f62616467652f617574686f722d406d696b656261726c6f772d7265642e7376673f7374796c653d666c61742d737175617265)](https://twitter.com/mikebarlow)[![Source Code](https://camo.githubusercontent.com/5f00987f8b791ef4288f5343028746255ca46b85e3014b5f830e2a92f45f1497/687474703a2f2f696d672e736869656c64732e696f2f62616467652f736f757263652d736e736372697074732f7669727475616c6d696e2d2d73646b2d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/mikebarlow/virtualmin-sdk)[![Latest Version](https://camo.githubusercontent.com/f26397c9afc400a3117bec575cd7000bca564b8224d7149f7bd84b6b30c080dd/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6d696b656261726c6f772f7669727475616c6d696e2d73646b2e7376673f7374796c653d666c61742d737175617265)](https://github.com/mikebarlow/virtualmin-sdk/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/mikebarlow/virtualmin-sdk/blob/master/LICENSE)

This is a PSR-2 Compliant Unofficial PHP SDK for the Virtualmin control panel which should hopefully make integrating your own systems into Virtualmin a piece of cake!

Requirements
------------

[](#requirements)

### Composer

[](#composer)

Virtualmin SDK requires the following:

- "php": "&gt;=5.5.0
- "guzzlehttp/guzzle": "6.5.\*",
- "cartalyst/collections": "1.1.\*"

Installation
------------

[](#installation)

### Composer

[](#composer-1)

Simplest installation is via composer.

```
composer require arpanadhikari/virtualmin-sdk 0.*

```

or adding to your projects `composer.json` file.

```
{
    "require": {
        "arpanadhikari/virtualmin-sdk": "1.*"
    }
}

```

Usage
-----

[](#usage)

### Setup

[](#setup)

To get started you first need to define the Virtualmin class and pass in the Guzzle dependency.

```
use \Snscripts\Virtualmin\Virtualmin;

$Virtualmin = new Virtualmin(
    new GuzzleHttp\Client
);

```

Next you'll need to setup the connection to your Virtualmin Server. This requires the main account login details.

```
$Virtualmin->setConnection(
    'host:port',
    'user',
    'pass'
);

```

If you're server is running in http mode you can pass in the `Virtualmin::NOSECURE` constant as the fourth parameter of setConnection to disable the use of https. (Default behaviour is `Virtualmin::SECURE`).

```
$Virtualmin->setConnection(
    'host',
    'user',
    'pass',
    Virtualmin::NOSECURE
);

```

If you are running https on but it's in a development environment and doesn't actually have a valid SSL certificate, you can disable the checking of the certificate with:

```
$Virtualmin->setVerify(Virtualmin::NOVERIFY);

```

**THIS SHOULD NOT BE DONE IN PRODUCTION AND IS TO ONLY BE USED DURING DEVELOPMENT IF NEEDED**

### Using

[](#using)

When using the SDK you may find [this page](https://www.virtualmin.com/documentation/developer/cli) from the Virtualmin Documentation useful. It details what actions and parameters are available on the Command Line Tool for managing your Virtualmin Server. All these commands and parameters are transferrable to this SDK (Not all commands supported yet).

Each supported section of the API comes with a "Manager" class, this class defines all the available actions for. It then also accepts any parameters needed for that request and then runs it.

Each Manager class should accept the Virtualmin object defined from the Virtualmin class, used in the examples above.

### PlanManager

[](#planmanager)

The plan manager is responsible for handling the Plans Related actions.

```
$PlanManager = new \Snscripts\Virtualmin\Plans\PlanManager($Virtualmin);
$plans = $PlanManager->ListPlans()->run();
$Plan = $plans->first(); // get the first plan returned

```

The ListPlans action will return a Collection of results (or an empty collection if no plans created). Each item in the Collection should be an instance of \\Snscripts\\Virtualmin\\Plans\\Plan containing the required details for that plan.

### HostingManager

[](#hostingmanager)

The Hosting Manager is responsible for handling the "Virtual Servers" or Shared Hosting accounts.

```
$HostingManager = new \Snscripts\Virtualmin\Hosting\HostingManager($Virtualmin);

$createResult = $HostingManager->CreateService()
	->setDomain('example.com')
	->setPlan($Plan->id)
	->setPass('password')
	->setLimitsFromPlan() // this makes it use the disk quota and broadband limits from the set plan otherwise define your own
	->setFeaturesFromPlan() // this makes it use the defined features on your plan otherwise define your own.
	->run();

```

`$createResult` will contain an instance of `\Snscripts\Virtualmin\Results\Result`. With that object you can do `$createResult->getStatus()` to retrieve a boolean true / false representation of whether the call was successful or not and `$createResult->getMessage()` to retrieve a verbose reason for the call failing or a success message.

```
$deleteResult = $HostingManager->DeleteService()
	->setDomain('example.com')
	->run();

$disableResult = $HostingManager->DisableService()
	->setDomain('example.com')
	->run();

$enableResult = $HostingManager->EnableService()
	->setDomain('example.com')
	->run();

```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/mikebarlow/virtualmin-sdk/blob/master/CONTRIBUTING.md) for details.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/mikebarlow/virtualmin-sdk/blob/master/LICENSE) for more information.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 70.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~165 days

Recently: every ~369 days

Total

10

Last Release

2104d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9154998?v=4)[Arpan](/maintainers/arpan)[@arpan](https://github.com/arpan)

---

Top Contributors

[![mikebarlow](https://avatars.githubusercontent.com/u/293049?v=4)](https://github.com/mikebarlow "mikebarlow (34 commits)")[![snsmurf](https://avatars.githubusercontent.com/u/43972359?v=4)](https://github.com/snsmurf "snsmurf (14 commits)")

---

Tags

sdkvirtualmin

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/arpanadhikari-virtualmin-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/arpanadhikari-virtualmin-sdk/health.svg)](https://phpackages.com/packages/arpanadhikari-virtualmin-sdk)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k511.3M2.2k](/packages/aws-aws-sdk-php)[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[guanguans/notify

Push notification SDK(AnPush、Bark、Chanify、DingTalk、Discord、Gitter、GoogleChat、IGot、Lark、Mattermost、MicrosoftTeams、NowPush、Ntfy、Push、Pushback、PushBullet、PushDeer、PushMe、Pushover、PushPlus、QQ、RocketChat、ServerChan、ShowdocPush、SimplePush、Slack、Telegram、WeWork、WPush、XiZhi、YiFengChuanHua、ZohoCliq、ZohoCliqWebHook、Zulip).

682104.9k7](/packages/guanguans-notify)[azure-oss/storage

Azure Blob Storage PHP SDK

37985.0k5](/packages/azure-oss-storage)[yoti/yoti-php-sdk

Yoti SDK for quickly integrating your PHP backend with Yoti

27539.9k1](/packages/yoti-yoti-php-sdk)[onesignal/onesignal-php-api

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com

34170.2k2](/packages/onesignal-onesignal-php-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
