We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on Vesta 2.0 and expect to release it soon. Read more about it: https://vestacp.com/docs/vesta-2-development
TUTORIAL: How to install SSL certificate to Vesta, Exim and dovecot daemons
TUTORIAL: How to install SSL certificate to Vesta, Exim and dovecot daemons
Many server owners don't know how to install SSL to all daemons, especially to Exim4 and dovecot.
Now there is a new way that is built-in Vesta
Pre-required step: your server hostname must be full host address that is already pointing to IP of your server.
Check /etc/hostname to see what is your hostname.
If it's not real host address, change it to some domain that you are hosting, by typing in SSH:
v-change-sys-hostname somedomain.com
and then
HOSTNAME='somedomain.com'
Now, first, lets install Letsencrypt SSL to domain that is your hostname.
In SSH, as root, run:(change 'admin' if your hostname domain is not under 'admin' account)
This step will install LetsEncrypt the same way you can install it via Vesta web panel (so avoid this step if you already installed LetsEncrypt to your domain).
Of course, you can install any other certificate, not only free LetsEncrypt... you can do it via Vesta web panel by editing that domain.
Now in SSH do the follwing:
(change 'admin' if your hostname domain is not under 'admin' account)
This will apply just installed SSL to Vesta, Exim and dovecot daemons.
And finally run:
This will tell Vesta to update SSL to Vesta, Exim and dovecot daemons every time when SSL is renewed.
This will happen automatically.
That's all.
LetsEncrypt SSL will be automatically renewed every 2 months and also automatically applied to dovecot, Exim and Vesta.
And this is completely built-in way, without additional scripts, Vesta itself do it.
Now there is a new way that is built-in Vesta
Pre-required step: your server hostname must be full host address that is already pointing to IP of your server.
Check /etc/hostname to see what is your hostname.
If it's not real host address, change it to some domain that you are hosting, by typing in SSH:
v-change-sys-hostname somedomain.com
and then
HOSTNAME='somedomain.com'
Now, first, lets install Letsencrypt SSL to domain that is your hostname.
In SSH, as root, run:
Code: Select all
v-add-letsencrypt-domain 'admin' $HOSTNAME '' 'yes'
This step will install LetsEncrypt the same way you can install it via Vesta web panel (so avoid this step if you already installed LetsEncrypt to your domain).
Of course, you can install any other certificate, not only free LetsEncrypt... you can do it via Vesta web panel by editing that domain.
Now in SSH do the follwing:
Code: Select all
v-update-host-certificate admin $HOSTNAME
This will apply just installed SSL to Vesta, Exim and dovecot daemons.
And finally run:
Code: Select all
echo "UPDATE_HOSTNAME_SSL='yes'" >> /usr/local/vesta/conf/vesta.conf
This will happen automatically.
That's all.
LetsEncrypt SSL will be automatically renewed every 2 months and also automatically applied to dovecot, Exim and Vesta.
And this is completely built-in way, without additional scripts, Vesta itself do it.
-
- Posts: 1
- Joined: Sat Aug 04, 2018 3:34 pm
- Os: Ubuntu 15x
- Web: apache + nginx
Re: TUTORIAL: How to install SSL certificate to Vesta, Exim and dovecot daemons
What OS are these commands intended for? I can't get them to work on Ubuntu...
Re: TUTORIAL: How to install SSL certificate to Vesta, Exim and dovecot daemons
All distributions that Vesta support.screighton wrote: ↑Sat Aug 04, 2018 3:36 pmWhat OS are these commands intended for? I can't get them to work on Ubuntu...
Before these commands run this:
Code: Select all
source /etc/profile
PATH=$PATH:/usr/local/vesta/bin && export PATH
That is also known ''issue'' if you try to run v-* commands immediatelly after Vesta installation.
Re: TUTORIAL: How to install SSL certificate to Vesta, Exim and dovecot daemons
You've saved my life @dpeca :*
Re: TUTORIAL: How to install SSL certificate to Vesta, Exim and dovecot daemons
is valid for multiple domains??
Re: TUTORIAL: How to install SSL certificate to Vesta, Exim and dovecot daemons
Hi 'depeca',
After i followed the above steps, once my server $hostname get renewed by LE on after 2 months, do i have to re'run those steps again.?
I meant, the LE will renew the SSLs for my $hostname-domain only. But it not updated my Vesta-SSL, Exim etc.,
After i followed the above steps, once my server $hostname get renewed by LE on after 2 months, do i have to re'run those steps again.?
I meant, the LE will renew the SSLs for my $hostname-domain only. But it not updated my Vesta-SSL, Exim etc.,
Re: TUTORIAL: How to install SSL certificate to Vesta, Exim and dovecot daemons
It will update vesta, exim and dovecot automaticaly :)
Re: TUTORIAL: How to install SSL certificate to Vesta, Exim and dovecot daemons
Ok. Good then. Thank you for this best solution.