Self-signed certificate for droplet

Posted February 23, 2020 873 views
DigitalOceanAPIUbuntu 18.04


I have a droplet running Spring Boot application. What is the most painless way to setup SSL for it? Is there general option where I can drop in certificate or do I have to configure nginx or apache?


These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer


Indeed, what I could suggest is setting up Nginx as a reverse proxy that way you could use Let’s Encrypt to secure your installation.

Your Nginx reverse proxy server block would look something like this:

server {
        listen 80;
        listen [::]:80;


        location / {
             proxy_pass http://localhost:8080/;
             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
             proxy_set_header X-Forwarded-Proto $scheme;
             proxy_set_header X-Forwarded-Port $server_port;

Then you could follow the steps here on how to setup Let’s Encrypt:

Hope that this helps.

by Hazel Virdó
by Kathleen Juell
In this tutorial, we will show you how to use Let's Encrypt to obtain a free SSL certificate and use it with Nginx on Ubuntu 18.04. We will also show you how to automatically renew your SSL certificate. If you're running a different web server, simply follow your web server's documentation to learn how to use the certificate with your setup.