# Install SSL on subdomain

**URL:** <https://forum.ghost.org/t/install-ssl-on-subdomain/26247>\
**Category:** Self-hosting\
**Created:** [October 13, 2021, 3:59pm UTC](https://forum.ghost.org/t/install-ssl-on-subdomain/26247 "2021-10-13T15:59:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![leokolt](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/leokolt/32/14907_2.png) [@leokolt](https://forum.ghost.org/u/leokolt)\
**Post date:** [October 13, 2021, 3:59pm UTC](https://forum.ghost.org/t/install-ssl-on-subdomain/26247/1 "2021-10-13T15:59:07Z")

</div>

Hi. I get an error when I install the ssl certificate on the subdomain. I have self-hotsing. My main domain has an SSL certificate installed. And it is not installed on the subdomain. What could be the problem?

[image]

Debug Information:  
OS: Ubuntu, v20.04.3 LTS  
Node Version: v14.17.6  
Ghost Version: 4.18.0  
Ghost-CLI Version: 1.17.3  
Environment: production  
Command: ‘ghost setup ssl’

```auto
1) ProcessError

Message: Command failed: /bin/sh -c sudo -S -p '#node-sudo-passwd#' /etc/letsencrypt/acme.sh --issue --home /etc/letsencrypt --domain maroon.scripstr.ru --webroot /var/www/maroon.scripstr.ru/system/nginx-root --reloadcmd "nginx -s reload" --accountemail leonidkoltan@gmail.com
#node-sudo-passwd#[Wed 13 Oct 2021 06:51:20 PM MSK] Can not init api, for https://acme.zerossl.com/v2/DV90

```

---

<div class="post-metadata">

**Author:** ![leokolt](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/leokolt/32/14907_2.png) [@leokolt](https://forum.ghost.org/u/leokolt)\
**Post date:** [October 13, 2021, 5:42pm UTC](https://forum.ghost.org/t/install-ssl-on-subdomain/26247/2 "2021-10-13T17:42:34Z")

</div>

I already have Ghost installed on my main domain. I also want to install Ghost on a subdomain to present my theme there. This is done, for example, on [fueko.net](http://fueko.net)

---

<div class="post-metadata">

**Author:** ![leokolt](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/leokolt/32/14907_2.png) [@leokolt](https://forum.ghost.org/u/leokolt)\
**Post date:** [October 13, 2021, 5:45pm UTC](https://forum.ghost.org/t/install-ssl-on-subdomain/26247/3 "2021-10-13T17:45:04Z")

</div>

I also want to note that when installing ghost on a subdomain, I get an error when setting up nginx, which causes the installation of the ssl certificate to be skipped

```auto
Enter your Ghost database name: ghost
✔ Configuring Ghost
✔ Setting up instance
+ sudo chown -R ghost:ghost /var/www/maroon/content
✔ Setting up "ghost" system user
ℹ Setting up "ghost" mysql user [skipped]
? Do you wish to set up Nginx? Yes
+ sudo mv /tmp/maroon-scripstr-ru/maroon.scripstr.ru.conf /etc/nginx/sites-available/maroon.scripstr.ru.conf
+ sudo ln -sf /etc/nginx/sites-available/maroon.scripstr.ru.conf /etc/nginx/sites-enabled/maroon.scripstr.ru.conf
+ sudo nginx -s reload
**✖ Setting up Nginx**
 **Nginx setup task failed, skipping SSL setup**

```

---

<div class="post-metadata">

**Author:** ![leokolt](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/leokolt/32/14907_2.png) [@leokolt](https://forum.ghost.org/u/leokolt)\
**Post date:** [October 14, 2021, 9:35am UTC](https://forum.ghost.org/t/install-ssl-on-subdomain/26247/4 "2021-10-14T09:35:56Z")

</div>

I used a sertbot to solve a problem

---

<div class="post-metadata">

**Author:** ![Twdir](https://avatars.discourse-cdn.com/v4/letter/t/a6a055/32.png) [@Twdir](https://forum.ghost.org/u/Twdir)\
**Post date:** [October 21, 2021, 7:59am UTC](https://forum.ghost.org/t/install-ssl-on-subdomain/26247/5 "2021-10-21T07:59:25Z")

</div>

Go to\>Site Tools \> Security\> SSL Manager.  
Select the subdomain from the Select Domain\> dropdown and choose the desired type of SSL and then Click Install.
