# Error When Generating Let's Encrypt Cert with FreePBX

**URL:** <https://community.letsencrypt.org/t/error-when-generating-lets-encrypt-cert-with-freepbx/238649>\
**Category:** Help\
**Created:** [June 19, 2025, 10:03pm UTC](https://community.letsencrypt.org/t/error-when-generating-lets-encrypt-cert-with-freepbx/238649 "2025-06-19T22:03:34Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![rosemarykerr](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@rosemarykerr](https://community.letsencrypt.org/u/rosemarykerr)\
**Post date:** [June 19, 2025, 10:03pm UTC](https://community.letsencrypt.org/t/error-when-generating-lets-encrypt-cert-with-freepbx/238649/1 "2025-06-19T22:03:34Z")

</div>

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. [crt.sh | example.com](https://crt.sh/?q=example.com)), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: [pbx.midwestlivestock.com](http://pbx.midwestlivestock.com)

I ran this command: Generate Let's Encrypt Certificate from FreePBX console

It produced this output: Processing: [pbx.midwestlivestock.com](http://pbx.midwestlivestock.com), Local IP: x.x.x.x, Public IP: x.x.x.x  
Self test: trying [http://pbx.midwestlivestock.com/.freepbx-known/65f8afe23256b4ef6822efa7fcb91170](http://pbx.midwestlivestock.com/.freepbx-known/65f8afe23256b4ef6822efa7fcb91170)  
Self test: received 65f8afe23256b4ef6822efa7fcb91170

lechecker: Pest\_Json\_Decode - Decoding error: Syntax error

My web server is (include version): FreePBX 17

The operating system my web server runs on is (include version): Debian ?

My hosting provider, if applicable, is: Self-hosted

I can login to a root shell on my machine (yes or no, or I don't know): Yes

I'm using a control panel to manage my site (no, or provide the name and version of the control panel): FreePBX 17

The version of my client is (e.g. output of `certbot --version` or `certbot-auto --version` if you're using Certbot):

---

<div class="post-metadata">

**Author:** ![orangepizza](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/orangepizza/32/19597_2.png) [@orangepizza](https://community.letsencrypt.org/u/orangepizza)\
**Post date:** [June 19, 2025, 11:40pm UTC](https://community.letsencrypt.org/t/error-when-generating-lets-encrypt-cert-with-freepbx/238649/2 "2025-06-19T23:40:32Z")

</div>

while only thing about that error message is lechecker.php tried to decode something isn't in JSON, I can say that domain is not exposed to internet, which is required to LE validation to succeed.

---

<div class="post-metadata">

**Author:** ![rosemarykerr](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@rosemarykerr](https://community.letsencrypt.org/u/rosemarykerr)\
**Post date:** [June 20, 2025, 12:50pm UTC](https://community.letsencrypt.org/t/error-when-generating-lets-encrypt-cert-with-freepbx/238649/3 "2025-06-20T12:50:08Z")

</div>

I have it sitting between the ISP's router and both firewalls. I turn it off at night because it's completely wide open to the internet. It's back up now.

---

<div class="post-metadata">

**Author:** ![MikeMcQ](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/mikemcq/32/52772_2.png) [@MikeMcQ](https://community.letsencrypt.org/u/MikeMcQ)\
**Post date:** [June 20, 2025, 1:39pm UTC](https://community.letsencrypt.org/t/error-when-generating-lets-encrypt-cert-with-freepbx/238649/4 "2025-06-20T13:39:28Z")

</div>

> [@rosemarykerr](#):
>
> I turn it off at night because it's completely wide open to the internet. It's back up now.

Your domain is not responding to HTTP requests on port 80

> **[Test result for pbx.midwestlivestock.com: Error](https://letsdebug.net/pbx.midwestlivestock.com/2480631)**
>
> 2 unique issue(s) detected (ANotWorking, IssueFromLetsEncrypt)

It is responding to HTTPS requests on port 443. That connect uses a self-signed cert from Unifi. Is that expected?

```nohighlight
echo|openssl s_client -connect pbx.midwestlivestock.com:443

Certificate chain
 0 s:CN = unifi.local
   i:CN = unifi.local
   a:PKEY: rsaEncryption, 2048 (bit); sigalg: RSA-SHA256
   v:NotBefore: Dec 23 05:58:22 2024 GMT; NotAfter: Mar 28 05:58:22 2027 GMT

```

> [@rosemarykerr](#):
>
> Self test: trying `http://pbx.midwestlivestock.com/.freepbx-known/65f8afe23256b4ef6822efa7fcb91170`

Can you explain what that self-test is checking. Because if you are using an HTTP Challenge the incoming URL to you from the Let's Encrypt server looks like:

```nohighlight
http://pbx.midwestlivestock.com/.well-known/acme-challenge/(token)

```

---

<div class="post-metadata">

**Author:** ![rosemarykerr](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@rosemarykerr](https://community.letsencrypt.org/u/rosemarykerr)\
**Post date:** [June 20, 2025, 2:04pm UTC](https://community.letsencrypt.org/t/error-when-generating-lets-encrypt-cert-with-freepbx/238649/5 "2025-06-20T14:04:16Z")

</div>

No, it is not expected that [pbx.midwestlivestock.com](http://pbx.midwestlivestock.com) would be responding on port 443.  
The Self test is what I see when I attempt to generate a Let's Encrypt Cert.:

And this is the response:  
"Processing: [pbx.midwestlivestock.com](http://pbx.midwestlivestock.com), Local IP: 127.0.0.1, Public IP: x.x.x.x  
Self test: trying [http://pbx.midwestlivestock.com/.freepbx-known/0aea881bb5d26b7b6f5799364631b858](http://pbx.midwestlivestock.com/.freepbx-known/0aea881bb5d26b7b6f5799364631b858)  
Self test: received 0aea881bb5d26b7b6f5799364631b858  
lechecker: Pest\_Json\_Decode - Decoding error: Syntax error"

How do I go about addressing those two issues?

---

<div class="post-metadata">

**Author:** ![MikeMcQ](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/mikemcq/32/52772_2.png) [@MikeMcQ](https://community.letsencrypt.org/u/MikeMcQ)\
**Post date:** [June 20, 2025, 2:21pm UTC](https://community.letsencrypt.org/t/error-when-generating-lets-encrypt-cert-with-freepbx/238649/6 "2025-06-20T14:21:08Z")

</div>

> [@rosemarykerr](#):
>
> How do I go about addressing those two issues?

I'd first resolve what that Unifi device is doing. If you don't have one then check that your public IP in the DNS is correct. Then make your that Unifi passes requests from port 80 to your FreePBX system.

It is possible that Unifi is the firewall system built in to FreePBX - I don't know for sure.

Your issues are really how to use FreePBX and not directly related to a Let's Encrypt problem. You are probably better off asking about these problems at their support forum. Or, find a good guide using google (maybe this one? [https://www.youtube.com/watch?v=7PGKxSnvZrQ](https://www.youtube.com/watch?v=7PGKxSnvZrQ))

---

<div class="post-metadata">

**Author:** ![danb35](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/danb35/32/70869_2.png) [@danb35](https://community.letsencrypt.org/u/danb35)\
**Post date:** [June 20, 2025, 2:23pm UTC](https://community.letsencrypt.org/t/error-when-generating-lets-encrypt-cert-with-freepbx/238649/7 "2025-06-20T14:23:43Z")

</div>

> [@MikeMcQ](#):
>
> It is possible that Unifi is the firewall system built in to FreePBX

Not unless FreePBX has seen drastic changes in the last couple of years--though I hope it has, because its built-in LE cert function was very badly broken back then.

---

<div class="post-metadata">

**Author:** ![MikeMcQ](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/mikemcq/32/52772_2.png) [@MikeMcQ](https://community.letsencrypt.org/u/MikeMcQ)\
**Post date:** [June 20, 2025, 2:34pm UTC](https://community.letsencrypt.org/t/error-when-generating-lets-encrypt-cert-with-freepbx/238649/8 "2025-06-20T14:34:03Z")

</div>

> [@danb35](#):
>
> Not unless FreePBX has seen drastic changes in the last couple of years

Thanks. Was that YT link I showed a fair explanation? You have more experience about FreePBX than I do.

---

<div class="post-metadata">

**Author:** ![rosemarykerr](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@rosemarykerr](https://community.letsencrypt.org/u/rosemarykerr)\
**Post date:** [June 20, 2025, 2:44pm UTC](https://community.letsencrypt.org/t/error-when-generating-lets-encrypt-cert-with-freepbx/238649/9 "2025-06-20T14:44:33Z")

</div>

It was a fair explanation. But I'm still in the same boat. Port 80 is forwarded to the FreePBX system.

---

<div class="post-metadata">

**Author:** ![MikeMcQ](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/mikemcq/32/52772_2.png) [@MikeMcQ](https://community.letsencrypt.org/u/MikeMcQ)\
**Post date:** [June 20, 2025, 2:50pm UTC](https://community.letsencrypt.org/t/error-when-generating-lets-encrypt-cert-with-freepbx/238649/10 "2025-06-20T14:50:21Z")

</div>

> [@rosemarykerr](#):
>
> Port 80 is forwarded to the FreePBX system.

How is that Unifi system involved?

---

<div class="post-metadata">

**Author:** ![rosemarykerr](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@rosemarykerr](https://community.letsencrypt.org/u/rosemarykerr)\
**Post date:** [June 20, 2025, 2:51pm UTC](https://community.letsencrypt.org/t/error-when-generating-lets-encrypt-cert-with-freepbx/238649/11 "2025-06-20T14:51:39Z")

</div>

The unifi system is the firewall.

---

<div class="post-metadata">

**Author:** ![MikeMcQ](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/mikemcq/32/52772_2.png) [@MikeMcQ](https://community.letsencrypt.org/u/MikeMcQ)\
**Post date:** [June 20, 2025, 3:22pm UTC](https://community.letsencrypt.org/t/error-when-generating-lets-encrypt-cert-with-freepbx/238649/12 "2025-06-20T15:22:07Z")

</div>

Okay. The only problem I see is something wrong in FreePBX console.

The error message complains about something it created for its own purposes.

You should ask on their forum how to debug / fix this. Make sure you tell them about Unifi.

---

<div class="post-metadata">

**Author:** ![danb35](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/danb35/32/70869_2.png) [@danb35](https://community.letsencrypt.org/u/danb35)\
**Post date:** [June 20, 2025, 3:22pm UTC](https://community.letsencrypt.org/t/error-when-generating-lets-encrypt-cert-with-freepbx/238649/13 "2025-06-20T15:22:13Z")

</div>

> [@rosemarykerr](#):
>
> Port 80 is forwarded to the FreePBX system.

That does not appear to be the case--or at least, the FreePBX system isn't responding.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/letsencrypt/original/3X/c/a/ca6c06ea1ea201324bba7048c6841ce60236468d.png) [@system](https://community.letsencrypt.org/u/system)\
**Post date:** [July 20, 2025, 3:22pm UTC](https://community.letsencrypt.org/t/error-when-generating-lets-encrypt-cert-with-freepbx/238649/14 "2025-07-20T15:22:51Z")

</div>

Closed on July 20, 2025, 3:22pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
