• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

CLI vhost setup example?

yabado

Regular Pleskian
I have to move a lot of customers from old home-grown server setup to a plesk panel powered server.

I want to use the CLI to do this and wondered if there was a tutorial showing how to setup the customer and add the subscription/hosting plan for that customer?

I looked over the docs and tested them, but the service plan never shows that hosting is added.

# ./customer --create JDoe -name "John Doe" -passwd sample -country US -notify false
# ./subscription --create example.com -owner admin -service-plan "Default Domain" -ip 192.168.1.100 -login JDoe -passwd "user pass"


I get the email saying that the do moan was setup, but the domain does not show that hosting is affiliated with it.


Thanks for any help or guidance anyone can give.
 
Sorry, but I don't understand your statement "the service plan never shows that hosting is added". What do you mean? How Service Plan should it show? Where? Why creating subscriptions with corresponding utility is not enough for you? What do you mean "domain does not show that hosting is affiliated with it"? Please be more specific. Thanks.
 
Here is a picture to help you understand.

This is what the subscription looks like after it is added via CLI commands shown in first post.

exampledotcom_1A2358B5.png


The subscription should show all the web hosting features/settings right?

example3dotcom_1A235A6F.png
 
Please add the string "-hosting true" , because the hosting - setting is "false" by default.
 
# plesk bin subscription --help
..........
-hosting <true|false> Switches on/off web hosting for domain (default: false).
-hst_type <phys|std|frm> Sets up the specified hosting type (default: phys).
 
Please add the string "-hosting true" , because the hosting - setting is "false" by default.
Thanks , that was the part I was missing.

One other thing is to make sure that the login (ftp) does not use same username that the main owner uses.

Final command , that worked, looks like so...

./subscription -c example6.com -hosting true -hst_type phys -ip 1.2.3.4 -owner JDoe -login john -passwd sample
 
Back
Top