VPS business hosting starting at $29.95/24/7 premium technical support

How to use VestaCP Cli Commands? – Linux

There are a lot of vestacp commands which are useful in automating things but you see error

sudo: v-list-sys-vesta-ssl: command not found

OR
something like this:

sudo /usr/local/vesta/bin/v-add-web-domain-ssl mage yourdomain
/usr/local/vesta/bin/v-add-web-domain-ssl: line 39: /func/main.sh: No such file or directory
/usr/local/vesta/bin/v-add-web-domain-ssl: line 40: /func/domain.sh: No such file or directory
/usr/local/vesta/bin/v-add-web-domain-ssl: line 41: /func/ip.sh: No such file or directory
/usr/local/vesta/bin/v-add-web-domain-ssl: line 42: /conf/vesta.conf: No such file or directory
/usr/local/vesta/bin/v-add-web-domain-ssl: line 45: format_domain: command not found
/usr/local/vesta/bin/v-add-web-domain-ssl: line 46: format_domain_idn: command not found
/usr/local/vesta/bin/v-add-web-domain-ssl: line 53: check_args: command not found
/usr/local/vesta/bin/v-add-web-domain-ssl: line 54: is_format_valid: command not found
/usr/local/vesta/bin/v-add-web-domain-ssl: line 55: is_system_enabled: command not found
/usr/local/vesta/bin/v-add-web-domain-ssl: line 56: is_system_enabled: command not found
/usr/local/vesta/bin/v-add-web-domain-ssl: line 57: is_object_valid: command not found
/usr/local/vesta/bin/v-add-web-domain-ssl: line 58: is_object_unsuspended: command not found
/usr/local/vesta/bin/v-add-web-domain-ssl: line 59: is_object_valid: command not found
/usr/local/vesta/bin/v-add-web-domain-ssl: line 60: is_object_unsuspended: command not found
/usr/local/vesta/bin/v-add-web-domain-ssl: line 61: is_object_value_empty: command not found
/usr/local/vesta/bin/v-add-web-domain-ssl: line 62: is_web_domain_cert_valid: command not found
cp: cannot stat '/yourdomain.crt': No such file or directory
cp: cannot stat '/yourdomain.key': No such file or directory
cp: cannot stat '/yourdomain.crt': No such file or directory
chmod: cannot access '/ssl/yourdomain.*': No such file or directory
cp: cannot stat '/ssl/yourdomain.crt': No such file or directory
cp: cannot stat '/ssl/yourdomain.key': No such file or directory
cp: cannot stat '/ssl/yourdomain.pem': No such file or directory
/usr/local/vesta/bin/v-add-web-domain-ssl: line 89: get_domain_values: command not found
/usr/local/vesta/bin/v-add-web-domain-ssl: line 90: get_real_ip: command not found
/usr/local/vesta/bin/v-add-web-domain-ssl: line 94: prepare_web_domain_values: command not found
/usr/local/vesta/bin/v-add-web-domain-ssl: line 97: add_web_config: command not found
/usr/local/vesta/bin/v-add-web-domain-ssl: line 110: increase_user_value: command not found
/usr/local/vesta/bin/v-add-web-domain-ssl: line 113: update_object_value: command not found
/usr/local/vesta/bin/v-add-web-domain-ssl: line 114: update_object_value: command not found
/usr/local/vesta/bin/v-add-web-domain-ssl: line 117: /v-restart-web: No such file or directory
/usr/local/vesta/bin/v-add-web-domain-ssl: line 118: check_result: command not found
/usr/local/vesta/bin/v-add-web-domain-ssl: line 120: /v-restart-proxy: No such file or directory
/usr/local/vesta/bin/v-add-web-domain-ssl: line 121: check_result: command not found
/usr/local/vesta/bin/v-add-web-domain-ssl: line 131: log_history: command not found
/usr/local/vesta/bin/v-add-web-domain-ssl: line 132: log_event: command not found

Solution

type this in command line (ssh)

export VESTA=/usr/local/vesta/

After that use any command like:

sudo /usr/local/vesta/bin/v-add-letsencrypt-domain <username> <maindomain.com> <domainalias.com*>

Dont use < or > or *
* means optional
< and > means replace your info with that


Complete command list : https://vestacp.com/docs/cli/

Author: Harshvardhan Malpani

PHP Developer based in New Delhi, India. Working as a freelance web developer providing server deployment, website development and maintenance services.

Leave a Reply

Your email address will not be published. Required fields are marked *