Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section General Discussion
  • Search

TUTORIAL: How to install SSL certificate to Vesta, Exim and dovecot daemons

General questions about VestaCP
Post Reply
  • Print view
Advanced search
36 posts
  • 1
  • 2
  • 3
  • 4
  • Next
dpeca
VestaCP Team
Posts: 473
Joined: Wed Nov 25, 2015 7:30 pm

TUTORIAL: How to install SSL certificate to Vesta, Exim and dovecot daemons
  • Quote

Post by dpeca » Fri Jul 27, 2018 10:52 am

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:

Code: Select all

v-add-letsencrypt-domain 'admin' $HOSTNAME '' 'yes'
(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:

Code: Select all

v-update-host-certificate admin $HOSTNAME
(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:

Code: Select all

echo "UPDATE_HOSTNAME_SSL='yes'" >> /usr/local/vesta/conf/vesta.conf
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.
Top

screighton
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
  • Quote

Post by screighton » Sat Aug 04, 2018 3:36 pm

What OS are these commands intended for? I can't get them to work on Ubuntu...
Top

dpeca
VestaCP Team
Posts: 473
Joined: Wed Nov 25, 2015 7:30 pm

Re: TUTORIAL: How to install SSL certificate to Vesta, Exim and dovecot daemons
  • Quote

Post by dpeca » Sat Aug 04, 2018 3:56 pm

screighton wrote: ↑
Sat Aug 04, 2018 3:36 pm
What OS are these commands intended for? I can't get them to work on Ubuntu...
All distributions that Vesta support.

Before these commands run this:

Code: Select all

source /etc/profile
PATH=$PATH:/usr/local/vesta/bin && export PATH
It should solve your problem.

That is also known ''issue'' if you try to run v-* commands immediatelly after Vesta installation.
Top

taicv
Posts: 4
Joined: Thu Apr 16, 2015 8:24 am

Re: TUTORIAL: How to install SSL certificate to Vesta, Exim and dovecot daemons
  • Quote

Post by taicv » Mon Oct 15, 2018 7:41 am

You've saved my life @dpeca :*
Top

lordkarin
Posts: 4
Joined: Sun Jan 28, 2018 6:53 pm

Os: CentOS 5x
Web: apache + nginx
Re: TUTORIAL: How to install SSL certificate to Vesta, Exim and dovecot daemons
  • Quote

Post by lordkarin » Thu Oct 25, 2018 12:11 pm

is valid for multiple domains??
Top

dpeca
VestaCP Team
Posts: 473
Joined: Wed Nov 25, 2015 7:30 pm

Re: TUTORIAL: How to install SSL certificate to Vesta, Exim and dovecot daemons
  • Quote

Post by dpeca » Thu Oct 25, 2018 12:17 pm

lordkarin wrote: ↑
Thu Oct 25, 2018 12:11 pm
is valid for multiple domains??
if they use hostname address for IMAP/POP3/SMTP/Vesta, then yes.
Top

lordkarin
Posts: 4
Joined: Sun Jan 28, 2018 6:53 pm

Os: CentOS 5x
Web: apache + nginx
Re: TUTORIAL: How to install SSL certificate to Vesta, Exim and dovecot daemons
  • Quote

Post by lordkarin » Thu Oct 25, 2018 2:33 pm

dpeca wrote: ↑
Thu Oct 25, 2018 12:17 pm
lordkarin wrote: ↑
Thu Oct 25, 2018 12:11 pm
is valid for multiple domains??
if they use hostname address for IMAP/POP3/SMTP/Vesta, then yes.
Thanks
Top

MAN5
Posts: 86
Joined: Sun Jan 31, 2016 4:14 am

Os: Ubuntu 15x
Web: apache + nginx
Re: TUTORIAL: How to install SSL certificate to Vesta, Exim and dovecot daemons
  • Quote

Post by MAN5 » Wed Oct 31, 2018 2:21 pm

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.,
Top

dpeca
VestaCP Team
Posts: 473
Joined: Wed Nov 25, 2015 7:30 pm

Re: TUTORIAL: How to install SSL certificate to Vesta, Exim and dovecot daemons
  • Quote

Post by dpeca » Wed Oct 31, 2018 2:45 pm

MAN5 wrote: ↑
Wed Oct 31, 2018 2:21 pm
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.,
It will update vesta, exim and dovecot automaticaly :)
Top

MAN5
Posts: 86
Joined: Sun Jan 31, 2016 4:14 am

Os: Ubuntu 15x
Web: apache + nginx
Re: TUTORIAL: How to install SSL certificate to Vesta, Exim and dovecot daemons
  • Quote

Post by MAN5 » Wed Oct 31, 2018 3:00 pm

Ok. Good then. Thank you for this best solution.
Top


Post Reply
  • Print view

36 posts
  • 1
  • 2
  • 3
  • 4
  • Next

Return to “General Discussion”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password