• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

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