If you want to provide a free hosting service, now you can do that very simple with CWP, in just a few steeps.

You need to set Access key in the following file

/usr/local/cwp/.conf/free_hosting_key.conf

Example of file /usr/local/cwp/.conf/free_hosting_key.conf

DPQhj9zJeMYHJkGyEW

To activate a new account, you need to call this API as in the following example:

http://IP:2030/index.php?scripts=free_hosting&domain=NEW-USER.DOMAIN.COM&username=NEW-USER&password=PASSWORD&package=PACKAGE-ID&email=USER@EMAIL.COM&inode=10000&nproc=10&nofile=100&key=APIKEY

Example

http://121.122.123.124:2030/index.php?scripts=free_hosting&domain=john3.cwp.com&username=john3&password=g3Dg5Hi9pA29&package=1&email=john3@gmail.com&inode=10000&nproc=10&nofile=100&key=DPQhj9zJeMYHJkGyEW

When calling this script in output you will get account details back.

Don't forget to replace: IP, NEW-USER.DOMAIN.COM, NEW-USER, PASSWORD, PACKAGE-ID, USER@EMAIL.COM, INODE, NPROC, NOFILE and KEY
IP must be CWP server IP or server hostname
NEW-USER.DOMAIN.COM is users subdomain
NEW-USER is account username
PASSWORD is account password
PACKAGE-ID is a package ID number from packages list in CWP
USER@EMAIL.COM is users contact email address
INODE is inode limit for a user
NPROC is process number limit for a user
NOFILE is a number of open files limit for a user
APIKEY is API access key from /usr/local/cwp/.conf/free_hosting_key.conf

For additional security you also need to allow IP address which will have access to the server API (one per line)

/usr/local/cwp/.conf/free_hosting_allowed.conf