How do I override the default configuration template names when creating new domains?

Good day! I created a new custom template for the proxy server configuration in the /usr/local/hestia/data/templates/web/nginx/ folder. I want this template to be used as the default template when creating new domains for all users. How can I get this?

edit the user package and set the template there.

2 Likes

Thank you for your reply. I created a new user package. How can I set it as the default package for all new users?

You currently can’t might need to look into it…

2 Likes

I use a CLI script that sets the package

You currently can’t might need to look into it…

What do you mean? I want to make sure that if the administrator on my server for some reason does not specify the correct custom package for the new user, it will be selected automatically.

By default it is the “default” package. But it makes sense that an admin can set a “preferred” package instead.

By default it is the “default” package. But it makes sense that an admin can set a “preferred” package instead.

I understand it. The problem is the panel does not allow me to edit the default package. I believe that there are objective reasons for this, and the default package may be overwritten when updated. But in this case, there must be a way to override the package name to be used as the default package.

Yes, there is a way. Simply copy the default package under a new name and change parameters in there as you like. Then - from Admin account - assign the new package for that or every user.
Is this what you are looking for (or I misunderstood the request?).

It is a good feature to add to hestia.

Is there a way to bind a script to be executed after user creation. That way we may change plan, and set up a WP install…

Yes of course by creating a workflow hook. For e.g.

mkdir /usr/local/hestia/bin/custom
bash v-create-user-custom

This will fire a workflow hook command detecting from the term at the end “custom” as follows:

cut v-create-user v-create-user-custom
bash v-create-user NewUser >> /usr/local/hestia/bin/custom/v-create-user-custom

In the v-create-user-custom —> New workflow after user is created.

Logically, such a global function could be added in main.sh to execute a workflow hook after each and every hestia script name to execute a workflow command thereafter.

If this is implemented, script exit must be eradicated at places.

Thus, I now place a feature request here:

[ Execute custom workflow script after any Hestia script ]

Marcus, now the ball is in your court :laughing: !

For v-add-user is is allready supported:

Create a file in /usr/local/hestia/data/packages/ with the name of the package.sh + chmod +x the file

For example:

#/bin/bash
v-add-user-composer "$1"
v-change-user-php-cli "$1" "7.4"

Will install composer for the user + change CLI to 7.4

1 Like

So we could create a default.sh that could change the plan