CyberPanel – Creating & Managing Packages using Web and CLI
☰ In this chapter, you will learn
- How to Create and Manage packages in CyberPanel?
- How to Create and Manage packages using CLI?
A package defines how many domains, databases, FTP accounts, and emails can be created, as well as how much each account utilizes the resources. Before creating a website, it is necessary to create at least one package in CyberPanel. However, a default package is created automatically when installing CyberPanel.
In this tutorial, we will explore package management in CyberPanel, covering the creation, modification, and deletion of packages.
Managing a Package using CyberPanel Web Interface:
Creating Package.
_ip_address:8090 in web browser and login.
Fill the following details:
- Package Name: Provide a name to identify your Package.
- Domains: Specify a number to determine how many domains can be added to this package. Use 0 for unlimited domains.
- Disk Space: Enter a value in Megabytes to allocate disk space to this package. Use 0 for unlimited space.
- Bandwidth: Enter a value in Megabytes to allocate bandwidth that can be used by this package. Use 0 for unlimited bandwidth.
- FTP Accounts: Enter a numeric value to allocate the maximum number of FTP accounts.
- Databases: Enter a numeric value to allocate the maximum number of databases that can be created. Emails: Enter a numeric value to allocate the maximum number of email accounts that can be created.
- Fully Qualified Domain as Child-Domains: Enable this option to create Fully Qualified Domain Names (FQDNs). FQDNs provide the exact location within the DNS by specifying the hostname.
- Enforce Disk Limits: Enable this feature if you want to strictly apply the maximum disk quota for a package. For example, if you specify 10GB of space for a package and enable the 'Enforce Disk Limits' option, the package will strictly adhere to the space limit rules and prevent websites from using more than the specified disk space.
List Package:
Go to Packages → List Packages
Here, you can view all the available packages and also have the option to edit or delete them.
Delete Package:
To delete a package, navigate to Packages → Delete Package.
Modify Package:
Navigate to Package → Modify Package. Select your package from the drop-down list and make the desired modifications.
Managing a Package using Command Line Interface in CyberPanel
The command line interface provides a fast and easy way to create packages on a web server. You don't need to log in to the CyberPanel web account; you can create and manage packages directly using the Ubuntu terminal.
Creating Package:
To create a new package using the Command Line Interface, use the following commands.
sudo cyberpanel createPackage --owner admin --packageName MyPackage01 --diskSpace 1000 --bandwidth 10000 --emailAccounts 100 --dataBases 100 --ftpAccounts 100 --allowedDomains 100
{"success": 1, "errorMessage": "None"}
List Package:
You can view all available packages using the command line interface, as follows:
sudo cyberpanel listPackagesPretty
+-------------+---------+------------+-----------+--------------+-----------+----------------+ | Name | Domains | Disk Space | Bandwidth | FTP Accounts | Databases | Email Accounts | +-------------+---------+------------+-----------+--------------+-----------+----------------+ | Default | 20 | 1000 | 1000 | 1000 | 1000 | 1000 | | MyPackage01 | 100 | 1000 | 10000 | 100 | 100 | 100 | +-------------+---------+------------+-----------+--------------+-----------+----------------+
Delete Package
To delete a package, use the following command.
sudo cyberpanel deletePackage --packageName MyPackage01
{"success": 1, "errorMessage": "None"}
Summary
In this tutorial, you learned how to create, modify, and delete a package in CyberPanel using both the Web Interface and the Command Line Interface. In the next chapter, you will learn how to create and manage Domains in CyberPanel.