# How to Install Let's Encrypt SSL On Ubuntu Server For nodeExpress and angular

**URL:** <https://community.letsencrypt.org/t/how-to-install-lets-encrypt-ssl-on-ubuntu-server-for-nodeexpress-and-angular/119657>\
**Category:** Help\
**Created:** [April 16, 2020, 8:29am UTC](https://community.letsencrypt.org/t/how-to-install-lets-encrypt-ssl-on-ubuntu-server-for-nodeexpress-and-angular/119657 "2020-04-16T08:29:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kerlosense](https://avatars.discourse-cdn.com/v4/letter/k/a88e4f/32.png) [@kerlosense](https://community.letsencrypt.org/u/kerlosense)\
**Post date:** [April 16, 2020, 8:29am UTC](https://community.letsencrypt.org/t/how-to-install-lets-encrypt-ssl-on-ubuntu-server-for-nodeexpress-and-angular/119657/1 "2020-04-16T08:29:46Z")

</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. [https://crt.sh/?q=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:qa.kerloresearch.com

I ran this command: sudo certbot --apache -d [qa.kerloresearch.com](http://qa.kerloresearch.com) -d [www.qa.kerloresearch.com](http://www.qa.kerloresearch.com)

It produced this output:

My web server is (include version):

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

My hosting provider, if applicable, is: [vultr.com](http://vultr.com)

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): NO

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:** ![ahaw021](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/ahaw021/32/14882_2.png) [@ahaw021](https://community.letsencrypt.org/u/ahaw021)\
**Post date:** [May 2, 2020, 1:38am UTC](https://community.letsencrypt.org/t/how-to-install-lets-encrypt-ssl-on-ubuntu-server-for-nodeexpress-and-angular/119657/2 "2020-05-02T01:38:10Z")

</div>

Express Uses the NodeJS TLS syntax

You will need the Certificate, The Intermediates and the Private Key to be available on your disk system

Then add the following to your express configuration

```auto
const https = require('https');
const fs = require('fs');

// serve the API with signed certificate on 443 (SSL/HTTPS) port
const httpsServer = https.createServer({
  key: fs.readFileSync('/etc/letsencrypt/live/my_api_url/privkey.pem'),
  cert: fs.readFileSync('/etc/letsencrypt/live/my_api_url/fullchain.pem'),
}, app);

httpsServer.listen(443, () => {
    console.log('HTTPS Server running on port 443');
});

```

---

<div class="post-metadata">

**Author:** ![ahaw021](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/ahaw021/32/14882_2.png) [@ahaw021](https://community.letsencrypt.org/u/ahaw021)\
**Post date:** [May 2, 2020, 1:54am UTC](https://community.letsencrypt.org/t/how-to-install-lets-encrypt-ssl-on-ubuntu-server-for-nodeexpress-and-angular/119657/3 "2020-05-02T01:54:35Z")

</div>

> [@kerlosense](#):
>
> [www.qa.kerloresearch.com](http://www.qa.kerloresearch.com)

the good news is that you have the certificates you just haven't included them in your Express configuration

 ![image](https://global.discourse-cdn.com/letsencrypt/original/3X/7/8/785fdaec3684516e34956a64a65cfac80c710f70.png)

---

<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:** [June 1, 2020, 1:54am UTC](https://community.letsencrypt.org/t/how-to-install-lets-encrypt-ssl-on-ubuntu-server-for-nodeexpress-and-angular/119657/4 "2020-06-01T01:54:48Z")

</div>

Closed on June 1, 2020, 1:54am UTC

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