Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

294
Views
Using Let's Encrypt certificates on DigitalOcean App Platform for a HTTPS node app

I'm used to deploying HTTPS Node apps on DigitalOcean servers using Docker, the Express framework and the https package like this:

const https = require('https');

const app = express();

// ...

const ssl = {
  key: fs.readFileSync(process.env.PRIVATE_KEY),
  cert: fs.readFileSync(process.env.CERT),
  ca: fs.readFileSync(process.env.CHAIN),
};

const server = https.createServer(ssl, app);
server.listen({ port }, () => {
  // ...
});

My app is inside a Docker container, but I expose the certicates that are on the droplet with the "v" option when I do docker run, like this:

-v /etc/letsencrypt/:/etc/letsencrypt

Finally, my Docker container is passed environment variables so that my Node app can know the paths to the various certificates files. For example,

CHAIN=/etc/letsencrypt/live/mydomain.com/chain.pem

And now, my Node app can read the certificates and create an HTTPS server with them.

I don't know if this setup is ideal, but it works well.


Now, I'm wondering how to do the same using the DigitalOcean App Platform.
So far, what I've done is this:

  • Changed DNS for my domain to point to DigitalOcean's nameservers
  • Created a DO-managed Let's Encrypt certificate for this domain, following this procedure: https://www.digitalocean.com/docs/accounts/security/certificates/
  • Created a DO App, defining my app as a service

But I can't get it to work with the certificates and therefore, have my HTTPS app work.
Does anyone here have an idea?

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!