Possible to bulk create hostnames, Bulk self SSL

Hi respected team.
Is it possible to bulk create hostnames, Bulk self SSL generation ?

Yes it is via ssh script

kindly guide me. Thank you

https://docs.hestiacp.com/admin_docs/api.html
https://docs.hestiacp.com/cli_commands.html
and a bit openssl if you want to have a self signed ssl certificate

I will share my scripts when I get home tonight.

Thank you for responsible team. @ScIT @jlguerrero

Tried this

  • v-generate-ssl-cert example.com [email protected] SG SG India example.com IT
  • But it created the SSL files into tmp folder. How to make it automatically create inside domain’s SSL folder inside ?

you can point them from v-add-web-ssl-domain (or similar) to the temp directory.

to be exact

1 Like

$HESTIA/bin/v-add-user $username $hst_password $hst_email $hst_plan

$HESTIA/bin/v-add-web-domain $username $domain

#visito el directorio
path="/home/$username/web/$domain/public_html"
cd $path

msg “Descargo última versión de WordPress”
#sudo -u $username wp core check-update
sudo -u $username wp core download --locale=$wp_locale

msg “Creo la base de datos en Hestia”

#asigno valor a db_user
$HESTIA/bin/v-add-database $username $db_name $db_user $db_pass

db_name="${username}${db_name}"
db_user="${username}
${db_user}"

msg “Creo wp-config.php”
sudo -u $username wp config create --dbname=$db_name --dbuser=$db_user --dbpass=$db_pass --locale=$wp_locale --force
hecho

#echo “Creo la base de datos en WordPress”
#sudo -u $username wp db create

msg “Instalo WordPress”
sudo -u $username wp core install --url=$domain --title="$wp_title" --admin_user=$wp_user --admin_password=$wp_pass --ad
hecho

#Borro el fichero para poder ver el WordPress
file=$path/index.html
if [[ -f “$file” ]]; then
msg “Borro index.html”
rm $path/index.html
fi
sudo -u $username wp plugin uninstall hello

#arreglo lo del SSL
path="/home/$username/web/$domain/ssl-cert"
mkdir $path
crt="$domain.crt"
key="$domain.key"
arg="/countryName=ES/localityName=Madrid/organizationalUnitName=$domain/commonName=$username/[email protected]$domain"
msg “Creo los certificados”
openssl req -newkey rsa:2048 -x509 -sha256 -days 3650 -nodes -out $path/$crt -keyout $path/$key -subj $arg
ls $path

msg “Aplico los certificados AUTOFIRMADOS a $domain”
$HESTIA/bin/v-add-web-domain-ssl $username $domain $path

msg “Fuerzo redirección a https://$domain”
$HESTIA/bin/v-add-web-domain-ssl-force $username $domain

msg “Intento instalar Let’s Encrypt (fallará si el dominio no está publicado)”
$HESTIA/bin/v-add-letsencrypt-domain $username $domain www.$domain

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.