# HTTPS : issue while trying to set up SSL certification

**URL:** https://meta.discourse.org/t/https-issue-while-trying-to-set-up-ssl-certification/127014
**Category:** Self-hosting
**Created:** [August 28, 2019, 11:22am UTC](https://meta.discourse.org/t/https-issue-while-trying-to-set-up-ssl-certification/127014 "2019-08-28T11:22:45Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![nekodroid](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nekodroid/32/154550_2.png) [@nekodroid](https://meta.discourse.org/u/nekodroid)
#### Post date: [August 28, 2019, 11:22am UTC](https://meta.discourse.org/t/https-issue-while-trying-to-set-up-ssl-certification/127014/1 "2019-08-28T11:22:45Z")

</div>

Hey there !

So I was trying to enable HTTPS for my website following [this nice tutorial](https://meta.discourse.org/t/setting-up-https-support-with-lets-encrypt/40709). Everything went fine until I tried rebuilding the app, typing `./launcher rebuild app`.

I ran `discourse-doctor` to try figuring this out and I finally found something :

```plaintext
==================== END REBUILD LOG ====================
Failed to rebuild app.

Checking your domain name . . .

Connection to discourse.mydomain.com succeeded.
You should probably remove any non-standard plugins and rebuild.
Attempting to restart existing container. . .

starting up existing container
+ /usr/bin/docker start app
Error response from daemon: driver failed programming external connectivity on endpoint app (some_random_characters): Error starting userland proxy: listen tcp 0.0.0.0:443: bind: address already in use
Error: failed to start containers: app
Failed to restart the container.

```

Note : I’ve replaced a long chain of characters with `some_random_characters` and my domain name with `discourse.mydomain.com`.

This pretty weird since I sticked up to the tutorial ; I have no idea of how to fix this.

Any help would be greatly appreciated !

Have a nice day,

nekodroid

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [August 28, 2019, 11:53am UTC](https://meta.discourse.org/t/https-issue-while-trying-to-set-up-ssl-certification/127014/2 "2019-08-28T11:53:50Z")

</div>

You’d need to share your app.yml for further diagnosis. Make sure you remove any sensitive emails and passwords before posting.

---

<div class="post-metadata">

### Author: ![nekodroid](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nekodroid/32/154550_2.png) [@nekodroid](https://meta.discourse.org/u/nekodroid)
#### Post date: [August 28, 2019, 12:28pm UTC](https://meta.discourse.org/t/https-issue-while-trying-to-set-up-ssl-certification/127014/3 "2019-08-28T12:28:12Z")

</div>

```plaintext
--- 
env: 
  DISCOURSE_DEVELOPER_EMAILS: myemailadress@maildomain.com
  DISCOURSE_HOSTNAME: discourse.mydomain.com
  DISCOURSE_SMTP_ADDRESS: stmp.eu.mailgun.org
  DISCOURSE_SMTP_PASSWORD: smtppasswordwithoutquotes
  DISCOURSE_SMTP_PORT: 587
  DISCOURSE_SMTP_USER_NAME: postmaster@discourse.mydomain.com
  LANG: en_US.UTF-8
  LETSENCRYPT_ACCOUNT_EMAIL: myemailadress@maildomain.com
  UNICORN_WORKERS: 2
expose: 
  - "80:80"
  - "443:443"
hooks: 
  after_code: 
    - 
      exec: 
        cd: $home/plugins
        cmd: 
          - "git clone https://github.com/discourse/docker_manager.git"
params: 
  db_default_text_search_config: pg_catalog.english
  db_shared_buffers: 128MB
run: 
  - 
    exec: "echo \"Beginning of custom commands\""
  - 
    exec: "echo \"End of custom commands\""
templates: 
  - templates/postgres.template.yml
  - templates/redis.template.yml
  - templates/web.template.yml
  - templates/web.ratelimited.template.yml
  - templates/web.template.yml
  - templates/web.ssl.template.yml
  - templates/web.letsencrypt.ssl.template.yml
volumes: 
  - 
    volume: 
      guest: /shared
      host: /var/discourse/shared/standalone
  - 
    volume: 
      guest: /var/log
      host: /var/discourse/shared/standalone/log/var-log

```

Here is it ~

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [August 28, 2019, 3:34pm UTC](https://meta.discourse.org/t/https-issue-while-trying-to-set-up-ssl-certification/127014/4 "2019-08-28T15:34:55Z")

</div>

> [@nekodroid](#):
>
> So I was trying to enable HTTPS for my website following [this nice tutorial](https://meta.discourse.org/t/setting-up-https-support-with-lets-encrypt/40709)

Did you read this part?

> [@Set up HTTPS support with Let's Encrypt](https://meta.discourse.org/t/set-up-https-support-with-lets-encrypt/40709/1):
>
> This guide is only for existing installs where HTTPS is not enabled. Following the [official setup guide](https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md) automatically enables HTTPS by default.

It looks like there is a problem with your docker install.

And why did you completely re-write the order of the stuff in `app.yml`?

---

<div class="post-metadata">

### Author: ![nekodroid](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nekodroid/32/154550_2.png) [@nekodroid](https://meta.discourse.org/u/nekodroid)
#### Post date: [August 28, 2019, 6:30pm UTC](https://meta.discourse.org/t/https-issue-while-trying-to-set-up-ssl-certification/127014/5 "2019-08-28T18:30:19Z")

</div>

> [@pfaffman](#):
>
> the [official setup guide](https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md)

I had actually read this guide, and it blocked on the command `wget -qO- https://get.docker.com/ | sh` ; it said “wrong usage of command `wget`” from what I remember. So I skipped to the next steps, and I remember Docker being auto-installed after typing the command `./discourse-setup`.

This is probably my problem…

I will completely restart my Discourse installation from the beginning then update this thread.

Thank you a lot for your help, friends ! 😺

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [August 28, 2019, 6:42pm UTC](https://meta.discourse.org/t/https-issue-while-trying-to-set-up-ssl-certification/127014/6 "2019-08-28T18:42:34Z")

</div>

> [@nekodroid](#):
>
> I remember Docker being auto-installed after typing the command `./discourse-setup` .

Yes! This got added at some point. Not sure when it got added.

Glad you’re up.

---

<div class="post-metadata">

### Author: ![nekodroid](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nekodroid/32/154550_2.png) [@nekodroid](https://meta.discourse.org/u/nekodroid)
#### Post date: [August 28, 2019, 7:31pm UTC](https://meta.discourse.org/t/https-issue-while-trying-to-set-up-ssl-certification/127014/7 "2019-08-28T19:31:56Z")

</div>

thank you :uwu:

By the way, I’m having another error now !

I’ve ran the `discourse-setup` autosetup program and added an email adress for _Let’s encrypt_ encryption when prompted. Now it says that :

```plaintext
Checking your domain name . . .
WARNING:: This server does not appear to be accessible at discourse.apertureproject.me:443.

A connection to http://discourse.apertureproject.me (port 80) also fails.

```

According to this, the error is due to unopened ports, and I absolutely got no idea of how to fix this. And I wouldn’t launch my website without encryption, so I won’t disable Let’s Encrypt.

**EDIT !**

I’ve found my host’s documentation (OVH) about how to open ports. But my IP manager is empty, and it should be filled with several IP adresses according to the doc’s screenshots.

_I’m sorry, it’s in french, but as you can see, the IP adresses list is completely empty._

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [August 28, 2019, 7:34pm UTC](https://meta.discourse.org/t/https-issue-while-trying-to-set-up-ssl-certification/127014/8 "2019-08-28T19:34:36Z")

</div>

~~The test can fail when there is no actual problem, so you can see what happens.~~

Is DNS set up? No. [discourse.apertureproject.me](http://discourse.apertureproject.me) doesn’t resolve. You have to set up DNS before you can have https.

~~What OS are you using? What platform? (Some have ports turned off by default)~~

~~If you run `nc` at the command line do you get “command not found”?~~

---

<div class="post-metadata">

### Author: ![nekodroid](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nekodroid/32/154550_2.png) [@nekodroid](https://meta.discourse.org/u/nekodroid)
#### Post date: [August 28, 2019, 7:39pm UTC](https://meta.discourse.org/t/https-issue-while-trying-to-set-up-ssl-certification/127014/9 "2019-08-28T19:39:20Z")

</div>

Alright, how can I do that ?

I know it’s about DNS records, but what type of value is it, etc ?

By value, I mean A, AAAA, NS, etc

Because I’ve already added the following in the DNS servers category :

 ![image](https://global.discourse-cdn.com/meta/original/3X/d/c/dc4713e72b4ea0e3bdb1af1e56e3da5547a18d08.png)

Thank you a lot for your help also ~ 😺

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [August 28, 2019, 8:28pm UTC](https://meta.discourse.org/t/https-issue-while-trying-to-set-up-ssl-certification/127014/10 "2019-08-28T20:28:48Z")

</div>

you need an `A` record pointing to your droplet IP.

---

<div class="post-metadata">

### Author: ![nekodroid](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nekodroid/32/154550_2.png) [@nekodroid](https://meta.discourse.org/u/nekodroid)
#### Post date: [August 28, 2019, 8:51pm UTC](https://meta.discourse.org/t/https-issue-while-trying-to-set-up-ssl-certification/127014/11 "2019-08-28T20:51:37Z")

</div>

I’ve done that.

Another question, I have an issue I never had before : it now displays the nginx welcome page when I type [apertureproject.me](http://apertureproject.me)

It was showing Discourse successful install message before

---

<div class="post-metadata">

### Author: ![ufukayyildiz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ufukayyildiz/32/217157_2.png) [@ufukayyildiz](https://meta.discourse.org/u/ufukayyildiz)
#### Post date: [August 28, 2019, 8:55pm UTC](https://meta.discourse.org/t/https-issue-while-trying-to-set-up-ssl-certification/127014/12 "2019-08-28T20:55:08Z")

</div>

it opens installation page. it is normal. hurry up to install it.

---

<div class="post-metadata">

### Author: ![nekodroid](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nekodroid/32/154550_2.png) [@nekodroid](https://meta.discourse.org/u/nekodroid)
#### Post date: [August 28, 2019, 8:56pm UTC](https://meta.discourse.org/t/https-issue-while-trying-to-set-up-ssl-certification/127014/13 "2019-08-28T20:56:15Z")

</div>

Then how do I install it ? I don’t understand. I never had this page before

Sorrie I’m a bit new to this… confusing 😫

---

<div class="post-metadata">

### Author: ![ufukayyildiz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ufukayyildiz/32/217157_2.png) [@ufukayyildiz](https://meta.discourse.org/u/ufukayyildiz)
#### Post date: [August 28, 2019, 8:56pm UTC](https://meta.discourse.org/t/https-issue-while-trying-to-set-up-ssl-certification/127014/14 "2019-08-28T20:56:38Z")

</div>

only follow instructions.

---

<div class="post-metadata">

### Author: ![nekodroid](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nekodroid/32/154550_2.png) [@nekodroid](https://meta.discourse.org/u/nekodroid)
#### Post date: [August 28, 2019, 8:56pm UTC](https://meta.discourse.org/t/https-issue-while-trying-to-set-up-ssl-certification/127014/15 "2019-08-28T20:56:56Z")

</div>

You mean 30 minute installation guide ? I’ve followed it

---

<div class="post-metadata">

### Author: ![ufukayyildiz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ufukayyildiz/32/217157_2.png) [@ufukayyildiz](https://meta.discourse.org/u/ufukayyildiz)
#### Post date: [August 28, 2019, 8:57pm UTC](https://meta.discourse.org/t/https-issue-while-trying-to-set-up-ssl-certification/127014/16 "2019-08-28T20:57:58Z")

</div>

no, you already did it. you are now on admin register step.

---

<div class="post-metadata">

### Author: ![nekodroid](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nekodroid/32/154550_2.png) [@nekodroid](https://meta.discourse.org/u/nekodroid)
#### Post date: [August 28, 2019, 8:58pm UTC](https://meta.discourse.org/t/https-issue-while-trying-to-set-up-ssl-certification/127014/17 "2019-08-28T20:58:41Z")

</div>

Ah… Still not getting it x’( What do you advise me to do ?

---

<div class="post-metadata">

### Author: ![ufukayyildiz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ufukayyildiz/32/217157_2.png) [@ufukayyildiz](https://meta.discourse.org/u/ufukayyildiz)
#### Post date: [August 28, 2019, 8:59pm UTC](https://meta.discourse.org/t/https-issue-while-trying-to-set-up-ssl-certification/127014/18 "2019-08-28T20:59:20Z")

</div>

what do you see when you browse your domain ?

---

<div class="post-metadata">

### Author: ![nekodroid](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nekodroid/32/154550_2.png) [@nekodroid](https://meta.discourse.org/u/nekodroid)
#### Post date: [August 28, 2019, 9:00pm UTC](https://meta.discourse.org/t/https-issue-while-trying-to-set-up-ssl-certification/127014/19 "2019-08-28T21:00:06Z")

</div>

# Welcome to nginx!

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

For online documentation and support please refer to [nginx.org](http://nginx.org/).  
Commercial support is available at [nginx.com](http://nginx.com/).

_Thank you for using nginx._

---

<div class="post-metadata">

### Author: ![ufukayyildiz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ufukayyildiz/32/217157_2.png) [@ufukayyildiz](https://meta.discourse.org/u/ufukayyildiz)
#### Post date: [August 28, 2019, 9:00pm UTC](https://meta.discourse.org/t/https-issue-while-trying-to-set-up-ssl-certification/127014/20 "2019-08-28T21:00:56Z")

</div>

no, i see register page. clear your cache, browser history and try again.

[Next page](https://meta.discourse.org/t/https-issue-while-trying-to-set-up-ssl-certification/127014.md?page=2)
