How to create a new subscription/domain using CLI

Created:

2016-11-16 12:42:05 UTC

Modified:

2017-04-24 12:14:50 UTC

0

Was this article helpful?


Have more questions?

Submit a request

How to create a new subscription/domain using CLI

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 11.5 for Linux
  • Plesk 12.0 for Linux

Symptoms

How to create a new subscription/domain using command line utilities (CLI)?

Resolution

  1. To create a subscription one of the following CLI utilities can be used:

    a. The /usr/local/psa/bin/subscription utility. Please go to documentation to get detailed explanation how it should be used.

    b. The /usr/local/psa/bin/domain utility.To get detailed explanation how it should be used please run /usr/local/psa/bin/domain --help .

    Here is an example how to create a new subscription for the administrator's customer with the username john based on the hosting plan Default Domain , set up a site for the domain example.com , assign IP address 203.0.113.2 to the subscription, and set the username john and password userpass for access to the webspace:

    # /usr/local/psa/bin/domain -c domain.tld -owner admin -service-plan "Default Domain" -ip 203.0.113.2 -login john -passwd "userpass"
  2. To create a domain within subscription one of the following CLI can be used:

    a. The /usr/local/psa/bin/site utlity.Please go here to get detailed explanation how it should be used.

    b. The /usr/local/psa/bin/domain utlity.To get detailed explanation how it should be used please run /usr/local/psa/bin/domain --help .

    Here is an example how to create a new newexample.com domain under example.com subscription, enable physical hosting and set home direcroty to newdomain :

    # /usr/local/psa/bin/domain -c newexample.com  -webspace-name example.com -hosting true -hst_type phys -www-root newdomain
Have more questions? Submit a request
Please sign in to leave a comment.