# saas-lms setup ###### tags: `saas` `cpanel` `saas-lms` `whm` `cpanel-api` `whm-api` ### steps to set up saas-lms on cpanel hosting * *upload the code to desired server location* * get **Cpanel** api token * type api in the search bar , then go to the menu shown in the image below ![](https://i.imgur.com/7Lmlwua.png) * create a new token ![](https://i.imgur.com/l8tNDCv.png) * after creating the token save it for later use and **do not share it with any one** ![](https://i.imgur.com/DxmNrQJ.png) * get **WHM** api token * goto your WHM panel ![](https://i.imgur.com/nmoTujZ.png) * ![](https://i.imgur.com/slADOTz.png) * ![](https://i.imgur.com/5Zu208L.png) * save the token for later and **do not share it with anyone**![](https://i.imgur.com/8dNvvU7.png) * *change the config file* * config/helpers.php * change the **vendor**`s value to config files name for example for config/lms.php to load set "vendor" => "lms" * the config file is dynamically loaded in the `config/helpers.php` file . lets assume we want to load lms.php config file for the application then we have to set ` 'vendor' => 'lms'` in the `config/helpers.php` file * emaple helpers.php file ![](https://i.imgur.com/EyhrALW.png) * now the necessary values have to be set in the lms.php file for the application to function properly * config/lms.php * change the ftp ip ,user name, and password * change the dest path to `<wildcard location>/uploads` * change the db_prefix *this usullay is the username followed by an underscore forexample masud_* * change the api end point prefix on `authorization_header` , `domain_remove_endpoint` , `domain_add_endpoint` , `assign_db_user_endpoint` and `db_create_endpoint` . for example if the if the cpanel url is https://example.xyz:2083 change the beginning the end-points with this * also have to change the db_user and db_prefix in `db_prefix` `assign_db_user_endpoint` & `db_create_endpoint` * change `username`:`api-token` in the authorization header of **CPANEL** and **WHM** * example lms.php file https://pastebin.ubuntu.com/p/WRrPdCHcmR/ ## enable wild card domain for saas in cpanle * ![](https://i.imgur.com/0HDX4uk.png) * type * in the subdomain input , then click on the document root the path will appear on its own after that click create ![](https://i.imgur.com/vZeLiHr.png)