# Error configuring SSL

**URL:** <https://forum.ghost.org/t/error-configuring-ssl/30318>\
**Category:** Developer help\
**Created:** [May 24, 2022, 2:01pm UTC](https://forum.ghost.org/t/error-configuring-ssl/30318 "2022-05-24T14:01:59Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![anant1](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@anant1](https://forum.ghost.org/u/anant1)\
**Post date:** [May 24, 2022, 2:01pm UTC](https://forum.ghost.org/t/error-configuring-ssl/30318/1 "2022-05-24T14:01:59Z")

</div>

My URL : [ghost.anant1.net](http://ghost.anant1.net)  
OS: Ubuntu, v20.04.4 LTS  
Node Version: v16.15.0  
Ghost Version: 5.0.0  
Ghost-CLI Version: 1.21.0  
Environment: production  
Command: ‘ghost setup ssl’

I have manually installed Ghost on a VPS, with MySQL and Nginx.  
Set up is fine and I can access my page, but **cannot set up SSL**.  
Would much appreciate the help. I am just starting with self-hosting and have already pushed my limits to get here!

Below the error log:

```auto
Message: Command failed: /bin/sh -c sudo -S -p '#node-sudo-passwd#' /etc/letsencrypt/acme.sh --issue --home /etc/letsencrypt --server letsencrypt --domain ghost.anant1.net --webroot /home/anant1/ghost/system/nginx-root --reloadcmd "nginx -s reload" --accountemail abargel@mailbox.org
[Tue May 24 13:36:29 UTC 2022] ghost.anant1.net:Verify error:199.241.137.220: Invalid response from http://ghost.anant1.net/.well-known/acme-challenge/gyfc1yfhiwaptkyeuvavjua5ly-zns_nwy-7o53ovkw/: 404
[Tue May 24 13:36:29 UTC 2022] Please add '--debug' or '--log' to check more details.
[Tue May 24 13:36:29 UTC 2022] See: https://github.com/acmesh-official/acme.sh/wiki/How-to-debug-acme.sh

[Tue May 24 13:36:24 UTC 2022] Using CA: https://acme-v02.api.letsencrypt.org/directory
[Tue May 24 13:36:24 UTC 2022] Single domain='ghost.anant1.net'
[Tue May 24 13:36:24 UTC 2022] Getting domain auth token for each domain
[Tue May 24 13:36:26 UTC 2022] Getting webroot for domain='ghost.anant1.net'
[Tue May 24 13:36:26 UTC 2022] Verifying: ghost.anant1.net
[Tue May 24 13:36:26 UTC 2022] Pending, The CA is processing your order, please just wait. (1/30)

Exit code: 1

--------------- stdout ---------------
[Tue May 24 13:36:24 UTC 2022] Using CA: https://acme-v02.api.letsencrypt.org/directory
[Tue May 24 13:36:24 UTC 2022] Single domain='ghost.anant1.net'
[Tue May 24 13:36:24 UTC 2022] Getting domain auth token for each domain
[Tue May 24 13:36:26 UTC 2022] Getting webroot for domain='ghost.anant1.net'
[Tue May 24 13:36:26 UTC 2022] Verifying: ghost.anant1.net
[Tue May 24 13:36:26 UTC 2022] Pending, The CA is processing your order, please just wait. (1/30)

--------------- stderr ---------------
[Tue May 24 13:36:29 UTC 2022] ghost.anant1.net:Verify error:199.241.137.220: Invalid response from http://ghost.anant1.net/.well-known/acme-challenge/gyfc1yfhiwaptkyeuvavjua5ly-zns_nwy-7o53ovkw/: 404
[Tue May 24 13:36:29 UTC 2022] Please add '--debug' or '--log' to check more details.
[Tue May 24 13:36:29 UTC 2022] See: https://github.com/acmesh-official/acme.sh/wiki/How-to-debug-acme.sh 

```

---

<div class="post-metadata">

**Author:** ![mjw](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/mjw/32/30781_2.png) [@mjw](https://forum.ghost.org/u/mjw)\
**Post date:** [May 24, 2022, 6:17pm UTC](https://forum.ghost.org/t/error-configuring-ssl/30318/2 "2022-05-24T18:17:09Z")

</div>

> [@anant1](#):
>
> `The CA is processing your order, please just wait. `

It means the CA (zerossl) is busy at the moment. I believe you can configure ACME to use letsencrypt instead.

---

<div class="post-metadata">

**Author:** ![anant1](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@anant1](https://forum.ghost.org/u/anant1)\
**Post date:** [May 24, 2022, 6:32pm UTC](https://forum.ghost.org/t/error-configuring-ssl/30318/3 "2022-05-24T18:32:24Z")

</div>

Hm, sorry if I sound stupid, but I thought I was using letsencrypt…

If not, could you please point me in the right direction to fix it? As I said, I’m a bit of a noob…

---

<div class="post-metadata">

**Author:** ![mjw](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/mjw/32/30781_2.png) [@mjw](https://forum.ghost.org/u/mjw)\
**Post date:** [May 24, 2022, 6:45pm UTC](https://forum.ghost.org/t/error-configuring-ssl/30318/4 "2022-05-24T18:45:45Z")

</div>

What I wrote isn’t strictly correct. If it’s a new certificate it’ll come from ZeroSSL by default. However, certificates issued before August 2021 will continue to use Let’s Encrypt.

Ghost uses ACME to issue an SSL certificate. The default CA changed last year.

> **[Server · acmesh-official/acme.sh Wiki](https://github.com/acmesh-official/acme.sh/wiki/Server)**
>
> A pure Unix shell script implementing ACME client protocol - Server · acmesh-official/acme.sh Wiki

---

<div class="post-metadata">

**Author:** ![anant1](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@anant1](https://forum.ghost.org/u/anant1)\
**Post date:** [May 24, 2022, 6:56pm UTC](https://forum.ghost.org/t/error-configuring-ssl/30318/5 "2022-05-24T18:56:33Z")

</div>

> [@anant1](#):
>
> `Using CA: https://acme-v02.api.letsencrypt.org/directory`

It says this on line 6, so am I not already on Let’s Encrypt? Certificate is new (today).

Otherwise, from the page you linked, where could I use this server parameter? Since I am only typing “ghost setup sssl”.

Thanks again!

---

<div class="post-metadata">

**Author:** ![mjw](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/mjw/32/30781_2.png) [@mjw](https://forum.ghost.org/u/mjw)\
**Post date:** [May 24, 2022, 7:11pm UTC](https://forum.ghost.org/t/error-configuring-ssl/30318/6 "2022-05-24T19:11:24Z")

</div>

That’s where the ACME server is located. To use the `--server` parameter you’ll have to manually issue the certificate.

Just try `ghost setup ssl` again as the CA may be available now.

---

<div class="post-metadata">

**Author:** ![anant1](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@anant1](https://forum.ghost.org/u/anant1)\
**Post date:** [May 24, 2022, 7:16pm UTC](https://forum.ghost.org/t/error-configuring-ssl/30318/7 "2022-05-24T19:16:54Z")

</div>

No luck, same error.

Hm, that leaves me a bit stuck. :(

---

<div class="post-metadata">

**Author:** ![mjw](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/mjw/32/30781_2.png) [@mjw](https://forum.ghost.org/u/mjw)\
**Post date:** [May 24, 2022, 7:32pm UTC](https://forum.ghost.org/t/error-configuring-ssl/30318/8 "2022-05-24T19:32:21Z")

</div>

Try manually… you already posted the command!

```auto

/etc/letsencrypt/acme.sh --server letsencrypt --issue --home /etc/letsencrypt --server letsencrypt --domain ghost.anant1.net --webroot /home/anant1/ghost/system/nginx-root --reloadcmd "nginx -s reload" --accountemail abargel@mailbox.org

```

---

<div class="post-metadata">

**Author:** ![anant1](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@anant1](https://forum.ghost.org/u/anant1)\
**Post date:** [May 24, 2022, 7:38pm UTC](https://forum.ghost.org/t/error-configuring-ssl/30318/9 "2022-05-24T19:38:37Z")

</div>

Oh, right… So, I just tried, and it got rid of the initial “command fail” message, but still, I get this:

```auto
root@anant1:/home/anant1/ghost# /etc/letsencrypt/acme.sh --server letsencrypt --issue --home /etc/letsencrypt --server letsencrypt --domain ghost.anant1.net --webroot /home/anant1/ghost/system/nginx-root --reloadcmd "nginx -s reload" --accountemail abargel@mailbox.org
[Tue May 24 19:36:14 UTC 2022] Using CA: https://acme-v02.api.letsencrypt.org/directory
[Tue May 24 19:36:14 UTC 2022] Single domain='ghost.anant1.net'
[Tue May 24 19:36:14 UTC 2022] Getting domain auth token for each domain
[Tue May 24 19:36:15 UTC 2022] Getting webroot for domain='ghost.anant1.net'
[Tue May 24 19:36:15 UTC 2022] Verifying: ghost.anant1.net
[Tue May 24 19:36:16 UTC 2022] Pending, The CA is processing your order, please just wait. (1/30)
[Tue May 24 19:36:20 UTC 2022] ghost.anant1.net:Verify error:199.241.137.220: Invalid response from http://ghost.anant1.net/.well-known/acme-challenge/i3a54hWo2TA107lMlPgSODagsDzenXtQ5HGUd1zRSQc: 502
[Tue May 24 19:36:20 UTC 2022] Please add '--debug' or '--log' to check more details.
[Tue May 24 19:36:20 UTC 2022] See: https://github.com/acmesh-official/acme.sh/wiki/How-to-debug-acme.sh

```

---

<div class="post-metadata">

**Author:** ![mjw](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/mjw/32/30781_2.png) [@mjw](https://forum.ghost.org/u/mjw)\
**Post date:** [May 24, 2022, 7:56pm UTC](https://forum.ghost.org/t/error-configuring-ssl/30318/10 "2022-05-24T19:56:24Z")

</div>

Your site isn’t available: 502 bad gateway. Is Ghost running?

---

<div class="post-metadata">

**Author:** ![anant1](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@anant1](https://forum.ghost.org/u/anant1)\
**Post date:** [May 24, 2022, 9:00pm UTC](https://forum.ghost.org/t/error-configuring-ssl/30318/11 "2022-05-24T21:00:39Z")

</div>

Oh, you’re right. It was available this afternoon, when I posted the question.  
I ran “ghost setup” again just now, ghost is indeed running, but I get 502 also for the ghost admin page.

---

<div class="post-metadata">

**Author:** ![anant1](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@anant1](https://forum.ghost.org/u/anant1)\
**Post date:** [May 25, 2022, 8:19am UTC](https://forum.ghost.org/t/error-configuring-ssl/30318/12 "2022-05-25T08:19:30Z")

</div>

Well, I guess I am going to start over. Apparently, I have reverse proxy issues for not setting things up in the right order at the beginning. Thank you for helping!! 😀
