LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-06-2024, 02:15 PM   #1
BAcidEvil
Member
 
Registered: Dec 2003
Distribution: Slack 14.1 3.18.1
Posts: 294

Rep: Reputation: 10
Letsencrypt Install


Hi there
So I seem to be having issues installing Letsencrypt.. Ging to slackbuilds and then doing all the dependencies has got me lost and overwhelmed. Not sure if there was a more simple way to do it.
On my other machine I used to run 'certboy certonly --standalone -d mail.org' and it would make it...But I do not recall how I installed it then..It was an Ubunutu machine.
I just seem to be having major issues.
 
Old 04-06-2024, 02:30 PM   #2
teoberi
Member
 
Registered: Jan 2018
Location: Romania
Distribution: Slackware64-current (servers)/Windows 11/Ubuntu (workstations)
Posts: 610

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
There is an official package in Slackware series "n" called "dehydrated" (Let's Encrypt / ACME setup script).
https://letsencrypt.org/docs/challenge-types/
https://github.com/dehydrated-io/dehydrated
Quote:
--challenge (-t) http-01|dns-01|tls-alpn-01 Which challenge should be used? Currently http-01, dns-01, and tls-alpn-01 are supported

Last edited by teoberi; 04-06-2024 at 03:08 PM.
 
1 members found this post helpful.
Old 04-06-2024, 02:55 PM   #3
gattocarlo
Member
 
Registered: Jan 2020
Posts: 63

Rep: Reputation: Disabled
I do not know if this is going to be helpful because, if I understand correctly what dehydrated does, you are running your own DNS server...

anyway, since my DNS provider does not provide a DNS API I went with agnos:
https://github.com/krtab/agnos

very easy to setup, and reliable. it comes with precompiled binaries too.

hope this helps.

Last edited by gattocarlo; 04-06-2024 at 02:56 PM.
 
Old 04-06-2024, 04:12 PM   #4
gattocarlo
Member
 
Registered: Jan 2020
Posts: 63

Rep: Reputation: Disabled
obviously agnos is meant for dns-01 challenges only, and allows wildcard certificates...
 
Old 04-08-2024, 02:57 PM   #5
ludist
Member
 
Registered: Nov 2005
Location: Greece
Distribution: Slackware
Posts: 172

Rep: Reputation: 21
Quote:
Originally Posted by BAcidEvil View Post
Hi there
Not sure if there was a more simple way to do it.
Code:
sqg -p letsencrypt
sbopkg -i letsencrypt
I didn't tried dehydrated. Maybe it's simpler.
 
Old 04-08-2024, 04:53 PM   #6
0XBF
Member
 
Registered: Nov 2018
Distribution: Slackware
Posts: 769

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
I'd second trying to use 'dehydrated'. It was added to Slackware as a stock package during 15.0's development cycle (Jan 5, 2021, according to my changelog copy). With dehydrated you can set everything up for an https apache webserver using letsencrypt, without adding extra packages.

"AlienBob" wrote up an article on how to use dehydrated back in 2019 here: https://alien.slackbook.org/blog/usi...er-with-https/

The only difference now afaik is that dehydrated is included in Slackware 15.0 or later so ignore package installation steps. I followed those instructions last year and managed to set up a few https webservers with letsencrypt without too much hassle. Just make sure you have everything set up and working perfectly using letsencrypt's staging server first because you'll get blocked (temporarily) if you f* it up too many times on the production server. (dont ask how I know ;-)
 
2 members found this post helpful.
Old 04-08-2024, 07:55 PM   #7
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,374

Rep: Reputation: 2754Reputation: 2754Reputation: 2754Reputation: 2754Reputation: 2754Reputation: 2754Reputation: 2754Reputation: 2754Reputation: 2754Reputation: 2754Reputation: 2754
If you have a registered domain, then the http-01 challenge is the easiest.

I have a dynamic DNS address with freedns.afraid.org, that required some shenanigans to complete the dns-01 challenge. I used dehydrated with dnsmasq for this. I still need to conduct certificate updates manually. My need is not great. I only use it for accessing CalDAV from my iPhone.
 
1 members found this post helpful.
Old 04-19-2024, 07:53 PM   #8
BAcidEvil
Member
 
Registered: Dec 2003
Distribution: Slack 14.1 3.18.1
Posts: 294

Original Poster
Rep: Reputation: 10
Hi all

I apologize I have not responded back, been having health issues blah blah blah. I appreciate all of the well rounded feedback and definitely have some reading to do, but I wanted to mention this before so… I was wanting to do letsecnrypt for my Email Server certificate. No website, currently. Would the feedback I’ve received work also for this? Or just web servers?
 
Old 04-20-2024, 01:13 AM   #9
teoberi
Member
 
Registered: Jan 2018
Location: Romania
Distribution: Slackware64-current (servers)/Windows 11/Ubuntu (workstations)
Posts: 610

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
It also works for mail, you just have to replace the self-signed certificate.
 
Old 04-20-2024, 09:32 AM   #10
roberto967
Member
 
Registered: Apr 2011
Location: Cagliari, Italy
Distribution: Slackware64-15.0 multilib
Posts: 117

Rep: Reputation: 36
Quote:
Originally Posted by BAcidEvil View Post
Hi all
Would the feedback I’ve received work also for this? Or just web servers?
As already mentioned above it works for mail servers as well.
Last year I wrote an howto here https://notes.sagredo.eu/en/qmail-no...rvers-233.html, inspired by the Eric's article, which shows how to do it with qmail and dovecot.

Last edited by roberto967; 04-20-2024 at 09:33 AM.
 
1 members found this post helpful.
Old 04-21-2024, 05:58 PM   #11
dogemeister
LQ Newbie
 
Registered: Mar 2024
Distribution: Slackware
Posts: 5

Rep: Reputation: 2
Smile

I remember compiling LetsEncrypt from SBo years ago and wading through the dependencies, but lately I've just been using the acme.sh script (also packaged in .t?z on SBo). Might be worth a shot, although all I'm doing is basic https key issue/renewal for websites and am not too familiar with sendmail/dovecot/postfix/all that.

My quick n' dirty if you use Apache:

Code:
mkdir /etc/httpd/ssl
acme.sh --issue --apache -d example.com -d www.example.com \
   --server letsencrypt \
   --cert-file /etc/httpd/ssl/cert.pem \
   --key-file /etc/httpd/ssl/key.pem \
   --fullchain-file /etc/httpd/ssl/fullchain.pem \
   --reloadcmd '/etc/rc.d/rc.httpd restart' \
1. custom directory to store keys
2. domains you want keys for
3. acme.sh defaults to zerossl, so this overrides to use LetsEncrypt
4. cert file location
5. key file location
6. fullchain file location
7. command to run after key renewal (httpd needs to restart to reprocess keys, I guess)

The parameters passed to this '--issue' command get stored by acme at a path similar to:
Code:
~/.acme.sh/example.com_ecc/example.com.conf
Now go into /etc/httpd/httpd.conf and uncomment these lines:

Code:
LoadModule socache_shmcb_module lib64/httpd/modules/mod_socache_shmcb.so
LoadModule ssl_module lib64/httpd/modules/mod_ssl.so
Include /etc/httpd/extra/httpd-ssl.conf
First two lines allow httpd to use ssl
Last line becomes apparent in the next step.

Now go into /etc/httpd/extra/httpd-ssl.conf and change these values:
Code:
SSLCertificateFile "/etc/httpd/ssl/cert.pem"
SSLCertificateKeyFile "/etc/httpd/ssl/key.pem"
SSLCertificateChainFile "/etc/httpd/ssl/fullchain.pem"
Notice these are the values specified in the acme.sh --issue command above.

Now restart httpd and give it a shot! Hopefully I didn't botch the commands.
Also recommend running the following to add a cron job to keep the keys fresh.
Code:
acme.sh --install-cronjob
Sorry for all the extra httpd stuff, but I imagine the main differences for a mail server ultimately come down to giving acme the right file paths to copy keys to, making sure the mail server conf points to those paths, and adjusting the '--reloadcmd' to restart the mail server, if that's required. I imagine you may want to use a mode in the '--issue' command other than '--apache', which is explained on the acme github site linked above. While there is no dovecot or postfix "mode", after a brisk google I've seen that people have done this with dovecot and postfix, at least. So with the acme.sh method you may sacrifice less upfront work (compiling) for more configuration work. Either way, Good luck & Happy slacking

Last edited by dogemeister; 04-22-2024 at 04:55 AM. Reason: mention other acme.sh modes
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Call for testers: SlackBuild Scripts for letsencrypt willysr Slackware 35 10-28-2023 08:20 AM
[SOLVED] unable to install letsencrypt certificate with apache vincix Linux - Server 2 10-25-2016 09:45 AM
LXer: LetsEncrypt now available in Fedora LXer Syndicated Linux News 0 12-14-2015 05:42 PM
LXer: LetsEncrypt enters public beta LXer Syndicated Linux News 0 12-08-2015 02:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration