Skip to content

Get immediate

Dev Support

on our community forums

Plans

Scripts for creating and editing hosting plans (packages).

List Plans

To list all current hosting packages (plans) run:

bash
opencli plan-list
Example output
bash
# opencli plan-list
+----+----------------+------------------------+---------------+----------------+-------------+-----------+------------+--------------+----------+------+------+-----------+-------------+-----------------+
| id | name           | description            | domains_limit | websites_limit | email_limit | ftp_limit | disk_limit | inodes_limit | db_limit | cpu  | ram  | bandwidth | feature_set | max_email_quota |
+----+----------------+------------------------+---------------+----------------+-------------+-----------+------------+--------------+----------+------+------+-----------+-------------+-----------------+
|  1 | Standard plan  | Small plan for testing |             0 |             10 |           0 |         0 | 5 GB       |      1000000 |        0 | 2    | 2g   |        10 | basic       | 10G             |
|  2 | Developer Plus | 4 cores, 6G ram        |             0 |             10 |           0 |         0 | 10 GB      |      1000000 |        0 | 4    | 6g   |       100 | default     | 0               |
|  3 | example        | ddfsds                 |             1 |              1 |           1 |         1 | 10 GB      |      1000000 |        1 | 1    | 1g   |       100 | default     | 10G             |
+----+----------------+------------------------+---------------+----------------+-------------+-----------+------------+--------------+----------+------+------+-----------+-------------+-----------------+

You can also format the data as JSON:

bash
opencli plan-list --json
Example output
json
[
  {
    "id": "1",
    "name": "Standard plan",
    "description": "Small plan for testing",
    "email_limit": "0",
    "ftp_limit": "10",
    "domains_limit": "0",
    "websites_limit": "0",
    "disk_limit": "5 GB",
    "inodes_limit": "1000000",
    "db_limit": "0",
    "cpu": "2",
    "ram": "2g",
    "bandwidth": "10",
    "feature_set": "basic",
    "max_email_quota": "10G"
  }
]
[
  {
    "id": "2",
    "name": "Developer Plus",
    "description": "4 cores, 6G ram",
    "email_limit": "0",
    "ftp_limit": "10",
    "domains_limit": "0",
    "websites_limit": "0",
    "disk_limit": "10 GB",
    "inodes_limit": "1000000",
    "db_limit": "0",
    "cpu": "4",
    "ram": "6g",
    "bandwidth": "100",
    "feature_set": "default",
    "max_email_quota": "0"
  }
]
[
  {
    "id": "3",
    "name": "example",
    "description": "ddfsds",
    "email_limit": "1",
    "ftp_limit": "1",
    "domains_limit": "1",
    "websites_limit": "1",
    "disk_limit": "10 GB",
    "inodes_limit": "1000000",
    "db_limit": "1",
    "cpu": "1",
    "ram": "1g",
    "bandwidth": "100",
    "feature_set": "default",
    "max_email_quota": "10G"
  }
]

Create Plan

To create a new plan run the following command:

bash
opencli plan-create name"<TEXT>" description="<TEXT>" emails=<COUNT> ftp=<COUNT> domains=<COUNT> websites=<COUNT> disk=<COUNT> inodes=<COUNT> databases=<COUNT> cpu=<COUNT> ram=<COUNT> bandwidth=<COUNT> feature_set=<NAME> max_email_quota=<COUNT>
ParameterDescriptionTypeNotes
nameName of the planStringNo spaces
descriptionPlan descriptionStringUse quotes for multiple words
feature_setFeature set assigned to the planStringMust match an existing feature set name
email_limitMax number of email accountsInteger0 for unlimited
max_email_quotaMax size per email accountStringInteger followed by B, k, M, G, or T; 0 unlimited
ftp_limitMax number of FTP accountsInteger0 for unlimited
domains_limitMax number of domainsInteger0 for unlimited
websites_limitMax number of websitesInteger0 for unlimited
disk_limitDisk space limit in GBInteger
inodes_limitMax number of inodesInteger0 for unlimited (minimum recommended: 250000)
db_limitMax number of databasesInteger0 for unlimited
cpuCPU core limitInteger
ramRAM limit in GBInteger
bandwidthPort speed in Mbit/sInteger

Example:

bash
opencli plan-create name="New Plan" description="This is a new plan" emails=100 ftp=50 domains=20 websites=30 disk=100 inodes=100000 databases=10 cpu=4 ram=8 bandwidth=100 feature_set=default max_email_quota=2G"

List Users on Plan

List all users that are currently using a plan:

bash
opencli plan-usage
Example output
bash
# opencli plan-usage 'Standard plan'
+----+----------+-------------------+---------------+---------------------+
| id | username | email             | plan_name     | registered_date     |
+----+----------+-------------------+---------------+---------------------+
|  3 | demo     | stefan@netops.com | Standard plan | 2025-04-28 14:47:52 |
|  4 | dummy    | dummy             | Standard plan | 2025-04-28 15:20:19 |
+----+----------+-------------------+---------------+---------------------+

You can also format the data as JSON:

bash
opencli plan-usage --json
Example output
json
[
  {
    "id": "3",
    "username": "demo",
    "email": "stefan@netops.com",
    "plan_name": "Standard plan",
    "registered_date": "2025-04-28 14:47:52"
  }
]
[
  {
    "id": "4",
    "username": "dummy",
    "email": "dummy",
    "plan_name": "Standard plan",
    "registered_date": "2025-04-28 15:20:19"
  }
]

Delete Plan

Delete a plan if no users are currently using it.

bash
opencli plan-delete <PLAN_NAME>
Example output
bash
# opencli plan-delete 'ubuntu_nginx_mysql'
Plan 'ubuntu_nginx_mysql' deleted successfully.

TIP: use ' or " around the plan name if it contains spaces: "plan name here".

--json flag can be passed to return the response as JSON.

Example output
bash
# opencli plan-delete 'ubuntu_nginx_mysql'  --json
{"message": "Plan 'ubuntu_nginx_mysql' deleted successfully."}

Edit Plan

Change plan limits.

bash
opencli plan-edit --debug id=<ID> name"<TEXT>" description="<TEXT>" emails=<COUNT> ftp=<COUNT> domains=<COUNT> websites=<COUNT> disk=<COUNT> inodes=<COUNT> databases=<COUNT> cpu=<COUNT> ram=<COUNT> bandwidth=<COUNT> feature_set=<DEFAULT> max_email_quota=<COUNT>
ParameterDescriptionTypeNotes
nameName of the planStringNo spaces
descriptionPlan descriptionStringUse quotes for multiple words
feature_setFeature set assigned to the planStringMust match an existing feature set name
email_limitMax number of email accountsInteger0 for unlimited
max_email_quotaMax size per email accountStringInteger followed by B, k, M, G, or T; 0 unlimited
ftp_limitMax number of FTP accountsInteger0 for unlimited
domains_limitMax number of domainsInteger0 for unlimited
websites_limitMax number of websitesInteger0 for unlimited
disk_limitDisk space limit in GBInteger
inodes_limitMax number of inodesInteger0 for unlimited (minimum recommended: 250000)
db_limitMax number of databasesInteger0 for unlimited
cpuCPU core limitInteger
ramRAM limit in GBInteger
bandwidthPort speed in Mbit/sInteger
Example output
bash
# opencli plan-edit --debug id=1 name="New Plan" description="This is a new plan" emails=100 ftp=50 domains=20 websites=30 disk=100 inodes=100000 databases=10 cpu=4 ram=8 bandwidth=100 feature_set="default" max_email_quota="2G"

Released under the MIT License.