Plans
Scripts for creating and editing hosting plans (packages).
List Plans
To list all current hosting packages (plans) run:
opencli plan-list
Example output
# 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:
opencli plan-list --json
Create Plan
To create a new plan run the following command:
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>
| Parameter | Description | Type | Notes |
|---|---|---|---|
name | Name of the plan | String | No spaces |
description | Plan description | String | Use quotes for multiple words |
feature_set | Feature set assigned to the plan | String | Must match an existing feature set name |
email_limit | Max number of email accounts | Integer | 0 for unlimited |
max_email_quota | Max size per email account | String | Integer followed by B, k, M, G, or T; 0 unlimited |
ftp_limit | Max number of FTP accounts | Integer | 0 for unlimited |
domains_limit | Max number of domains | Integer | 0 for unlimited |
websites_limit | Max number of websites | Integer | 0 for unlimited |
disk_limit | Disk space limit in GB | Integer | |
inodes_limit | Max number of inodes | Integer | 0 for unlimited (minimum recommended: 250000) |
db_limit | Max number of databases | Integer | 0 for unlimited |
cpu | CPU core limit | Integer | |
ram | RAM limit in GB | Integer | |
bandwidth | Port speed in Mbit/s | Integer |
Example:
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:
opencli plan-usage
Example output
# opencli plan-usage 'Standard plan'
+----+----------+-------------------+---------------+---------------------+
| id | username | email | plan_name | registered_date |
+----+----------+-------------------+---------------+---------------------+
| 3 | demo | [email protected] | 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:
opencli plan-usage --json
Delete Plan
Delete a plan if no users are currently using it.
opencli plan-delete <PLAN_NAME>
Example output
# 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
# opencli plan-delete 'ubuntu_nginx_mysql' --json
{"message": "Plan 'ubuntu_nginx_mysql' deleted successfully."}
Edit Plan
Change plan limits.
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>
| Parameter | Description | Type | Notes |
|---|---|---|---|
name | Name of the plan | String | No spaces |
description | Plan description | String | Use quotes for multiple words |
feature_set | Feature set assigned to the plan | String | Must match an existing feature set name |
email_limit | Max number of email accounts | Integer | 0 for unlimited |
max_email_quota | Max size per email account | String | Integer followed by B, k, M, G, or T; 0 unlimited |
ftp_limit | Max number of FTP accounts | Integer | 0 for unlimited |
domains_limit | Max number of domains | Integer | 0 for unlimited |
websites_limit | Max number of websites | Integer | 0 for unlimited |
disk_limit | Disk space limit in GB | Integer | |
inodes_limit | Max number of inodes | Integer | 0 for unlimited (minimum recommended: 250000) |
db_limit | Max number of databases | Integer | 0 for unlimited |
cpu | CPU core limit | Integer | |
ram | RAM limit in GB | Integer | |
bandwidth | Port speed in Mbit/s | Integer |
Example output
# 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"
Apply Plan
Editing a plan (above) does not by itself change the limits already applied to users on that plan. To move users to a new plan and (re)apply that plan's limits to them:
opencli plan-apply <plan_id> <username1> <username2>... [--all] [--debug]
Use --all instead of listing usernames to apply it to every user currently on that plan.
By default all limits (CPU, RAM, disk, bandwidth, email) are applied. Restrict it to specific limits with:
--cpu- apply the CPU limit only.--ram- apply the RAM limit only.--dsk- apply the disk limit only.--net- apply the bandwidth limit only.--email- apply the email rate limit only.
These flags can be combined, e.g. --cpu --ram applies only CPU and RAM limits.