Creating customers outside of I-MSCP

  • Hi,



    at first: thank you very much for developing i-MSCP - it's really a great control panel.


    I need to create i-MSCP customers automatically, because we have a huge amount of users to migrate to this panel. It would be quite difficult to migrate them manually. Is there some nice "i-MSCP"-way to do it? Maybe some API or something I can have look at?


    I would appreciate your help. Thanks in advance.

  • Hmm you could have a look at the imscp db and import your customer data there. Then you only also need to import the webspaces, mails + databases. The script musst be written by yourself. ATM we only have an ispcp migration tool. I'm sorry about that.

  • Hi,



    thanks, yeah I thought so already. Can you tell me, where I can find the code of the ispcp migration tool? Maybe there are some parts I could reuse.

  • @Marvin


    Hello ,


    The ispcp migration script is not a good entry-point to learn about i-MSCP data structure. It's a perl script poorly written... Well, the best you can do is to batch some SQL queries from your old database to i-MSCP database.


    For instance, let's assume you have an 'user' table in your old panel database, you could select all relevant data and inject them into the i-MSCP database. The same thing should be done for the domain and email data. Of course, this involve that before injecting the data in the i-MSCP database, you transform them to fit with i-MSCP format specifications.


    What I recommend there is in order:

    • Install i-MSCP on a test server
    • Create few customers (with domains, subdomains, email accounts, ftp account and so on...)
    • Look at the i-MSCP database to know how the related data are stored and the expected format

    Once done, you could prepare a script that will batch the process as explained above (turn your current data into i-MSCP expected format, and inject them using SQL queries). Then, once the database is ready, you'll have to move your data (domain data, email data...) (from the filesystem) to the expected locations. Again here, you'll have to look at an i-MSCP test installation to know how i-MSCP store those data.


    All this can seem a bit complicated but it is not.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206