Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Dev Section 3rd Party Software
  • Search

Script for generating letsencrypt SSL and configuring all daemons (Apache, nginx, dovecot, Exim, Vesta) to use it

Section with additional software for Vesta
Locked
  • Print view
Advanced search
42 posts
  • 1
  • 2
  • 3
  • 4
  • 5
  • Next
dpeca
VestaCP Team
Posts: 473
Joined: Wed Nov 25, 2015 7:30 pm

Script for generating letsencrypt SSL and configuring all daemons (Apache, nginx, dovecot, Exim, Vesta) to use it

Post by dpeca » Thu Sep 08, 2016 3:35 pm

Many server owners don't know how to install Letsencrypt SSL and configure all daemons to use it, especially Exim4 and dovecot.
I wrote a script that do it automatically.
In short - this script will generate SSL, for your server hostname or for any other domain on your server, and it will automatically configure all daemons to use that SSL.

Edit: this script is now obsolete
See new way for having SSL on all daemons - viewtopic.php?f=19&t=12617&p=72195#p72195
Top

skamasle
Collaborator
Posts: 592
Joined: Mon Feb 29, 2016 6:36 pm

Re: Script for generating letsencrypt SSL and configuring all daemons (Apache, nginx, dovecot, Exim, Vesta) to use it

Post by skamasle » Fri Sep 09, 2016 9:38 pm

Hi

Vestacp already support letsencrypt from cli

viewtopic.php?t=11927

Code: Select all

v-add-letsencrypt-domain USER DOMAIN [ALIASES] [RESTART]
v-add-letsencrypt-user USER [EMAIL]
v-check-letsencrypt-domain USER DOMAIN
v-list-letsencrypt-user USER [FORMAT]
v-sign-letsencrypt-csr USER DOMAIN CSR_DIR [FORMAT]
v-update-letsencrypt-ssl
Can you explain diference whit your script ?
Top

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

Re: Script for generating letsencrypt SSL and configuring all daemons (Apache, nginx, dovecot, Exim, Vesta) to use it

Post by dpeca » Fri Sep 09, 2016 11:02 pm

Firstly, I saw a lot of messages on forum that is saying it not works.
Should be fixed in v17.

Secondly, a script that I wrote will configure all daemons - dovecot, Exim4, and Vesta on 8083 port.
All five daemons.
Vesta's built-in scripts will only configure Apache and nginx.

And as I said in first message, when VestaCP start to support letsencrypt naturally (when bugs became fixed) - I'll just write a new script that will use already generated SSL's (Letsencrypt SSL's that Vesta generated) - and then that new script will be used only for server hostname - as a tool that will configure Exim4, dovecot and Vesta daemon (nginx on port 8083) to use proper SSL.
Top

skamasle
Collaborator
Posts: 592
Joined: Mon Feb 29, 2016 6:36 pm

Re: Script for generating letsencrypt SSL and configuring all daemons (Apache, nginx, dovecot, Exim, Vesta) to use it

Post by skamasle » Wed Sep 14, 2016 9:12 pm

Looks good .

If you want mirror for script I can host it :)
Top

MrSoul
Posts: 6
Joined: Sun Sep 11, 2016 1:14 am

Re: Script for generating letsencrypt SSL and configuring all daemons (Apache, nginx, dovecot, Exim, Vesta) to use it

Post by MrSoul » Fri Sep 16, 2016 9:46 pm

Code: Select all

[root@149 bin]# generate_ssl admin xXx.net
/usr/local/bin/generate_ssl: line 86: ./letsencrypt-auto: No such file or directory
ERROR: Something went wrong. Check output above.
[root@149 bin]# generate_ssl admin xXx.xXx.xXx.xXx
/usr/local/bin/generate_ssl: line 86: ./letsencrypt-auto: No such file or directory
ERROR: Something went wrong. Check output above.
what is the problem ?
the hostname you mean domain or server address ?
----
xx.net is my domain
xXx.xXx.Xxx = server ip
Top

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

Re: Script for generating letsencrypt SSL and configuring all daemons (Apache, nginx, dovecot, Exim, Vesta) to use it

Post by dpeca » Fri Sep 16, 2016 10:26 pm

Please run:
ls -l /root/letsencrypt/

and copy here output.
Top

misak35
Posts: 60
Joined: Thu Jan 16, 2014 10:48 am

Re: Script for generating letsencrypt SSL and configuring all daemons (Apache, nginx, dovecot, Exim, Vesta) to use it

Post by misak35 » Tue Sep 20, 2016 10:32 pm

dpeca wrote:Please run:
ls -l /root/letsencrypt/

and copy here output.

Code: Select all

total 0
Top

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

Re: Script for generating letsencrypt SSL and configuring all daemons (Apache, nginx, dovecot, Exim, Vesta) to use it

Post by dpeca » Tue Sep 20, 2016 11:11 pm

Try to run manually this (as root) :

Code: Select all

cd /root

git clone https://github.com/letsencrypt/letsencrypt
If everything went OK, then run:

Code: Select all

cd letsencrypt

./letsencrypt-auto --help
If everything went OK, then run:

Code: Select all

echo -e '#!/bin/bash\n' > /usr/local/bin/generate_all_ssls

chmod u+x /usr/local/bin/generate_all_ssls

crontab -l | { cat; echo "3 20 1 */2 * /usr/local/bin/generate_all_ssls > /var/log/generate_all_ssls.log"; } | crontab -
Top

apachler
Posts: 8
Joined: Wed Sep 21, 2016 10:57 am

Re: Script for generating letsencrypt SSL and configuring all daemons (Apache, nginx, dovecot, Exim, Vesta) to use it

Post by apachler » Wed Sep 21, 2016 10:59 am

It would be nice to get support for subdomains like "sub.domain.com"

Thanks!
Top

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

Re: Script for generating letsencrypt SSL and configuring all daemons (Apache, nginx, dovecot, Exim, Vesta) to use it

Post by dpeca » Wed Sep 21, 2016 4:30 pm

I think Vesta v17 will support letsencrypt completely.
My script is generally for server hostname (dovecot, Exim, Vesta) purpose :)
Top


Locked
  • Print view

42 posts
  • 1
  • 2
  • 3
  • 4
  • 5
  • Next

Return to “3rd Party Software”



  • 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
 

 

cron

Login  •  Register

I forgot my password