SSL caddy with droplet

Created a fresh droplet and decided to test it with caddy to serve with https. Following this awesome article showing how to use caddy inside droplet. Everything went well up until step 4 (Enabling Automatic TLS with Let’s Encrypt).

Basically, when i did all the steps in the step 4. I go to my domain and received ERR_SSL_PROTOCOL_ERROR error.


<domainname> {
    root * /var/www
    encode gzip

    tls {
      dns digitalocean dop_v1_...


ExecStart=/usr/bin/caddy run --environ --config /etc/caddy/Caddyfile
ExecReload=/usr/bin/caddy reload --config /etc/caddy/Caddyfile


● caddy.service - Caddy
     Loaded: loaded (/etc/systemd/system/caddy.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2024-06-21 11:20:43 UTC; 23min ago
   Main PID: 152795 (caddy)
      Tasks: 8 (limit: 2220)
     Memory: 10.8M
        CPU: 439ms
     CGroup: /system.slice/caddy.service
             └─152795 /usr/bin/caddy run --environ --config /etc/caddy/Caddyfile

any idea what might causing this issue?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Site Moderator
Site Moderator badge
June 27, 2024

Heya, @f4df2e98b9c74f7eb7f6a0629cf1c4

The ERR_SSL_PROTOCOL_ERROR error typically indicates an issue with the SSL/TLS configuration. - he Caddy logs can provide more detailed information about what is going wrong. Check the logs with the following command:

sudo journalctl -u caddy -f

Look for any errors related to SSL/TLS or Let’s Encrypt.


Site Moderator
Site Moderator badge
June 22, 2024


Did you add your domain name in the config file? Also are you sure your domain is pointed to your Droplet?

Additinally, can you share your logs?

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel