DEV Community

Khanh Duong
Khanh Duong

Posted on

I got tired of setting up SSL for every side project, so I made a 60-second Docker deploy kit

You know the drill.

Your app runs perfectly on localhost:3000. Time to deploy it. So you rent a cheap VPS, SSH in, and then the fun begins:

  • Configure Nginx as a reverse proxy
  • Install Certbot
  • Request a Let's Encrypt certificate
  • Set up a cron job for renewals
  • Debug why the certificate didn't apply
  • Google "nginx ssl redirect loop" at 11pm

Two hours later, you still don't have HTTPS working.

I've done this dance at least a dozen times. Last week I finally got fed up and packaged the whole thing into a reusable kit that takes 60 seconds instead of 2 hours.

The idea: replace Nginx + Certbot with Caddy

The secret is Caddy. Unlike Nginx, Caddy handles SSL automatically — it requests certificates from Let's Encrypt and renews them without any configuration. The entire reverse proxy config is 3 lines:

yourdomain.com {
reverse_proxy app:3000
}

No ssl_certificate paths. No certbot renew. No cron jobs. It just works.

What I built

I wrapped this into a small Docker Compose setup that anyone can use:

docker-compose.yml — runs Caddy as a reverse proxy alongside your app container

Caddyfile — 3 lines, automatic SSL

.env — the only file you edit:

DOMAIN=myapp.com
APP_IMAGE=my-dockerhub-user/my-app:latest
APP_PORT=3000

setup.sh — a one-command script that installs Docker on a fresh Ubuntu VPS and launches everything

README — step-by-step instructions with examples for Node.js, Python, Go, and static sites

The buyer experience

  1. Rent a cheap VPS ($4-6/month on Hetzner, DigitalOcean, etc.)
  2. Point your domain's A record to the server IP
  3. Upload the files and run bash setup.sh
  4. Edit 3 lines in .env
  5. Run docker compose up -d
  6. Visit https://yourdomain.com — it's live with a real SSL certificate

That's it. No Nginx. No Certbot. No DevOps experience needed.

Why I'm selling it instead of open-sourcing it

I wanted to experiment with selling a small digital product. The kit is $10 — cheap enough to be an impulse buy, expensive enough to be worth packaging properly with good documentation and examples.

The configs themselves aren't rocket science. What you're paying for is the tested, documented, ready-to-go package that saves you an afternoon of Googling and debugging.

If you're interested: Docker Deploy Kit on Gumroad

What I learned building my first digital product

  • Scope matters. A product this small (5 files) can be built and shipped in one afternoon. Don't overthink it.
  • Test it for real. I spun up a Hetzner VPS and ran through the entire buyer experience. Found a bug (environment variables weren't being passed to the Caddy container) and fixed it before anyone paid for it.
  • The README is the product. The config files are simple. The value is in clear, step-by-step documentation that makes the buyer feel confident.
  • Free DNS services are unreliable. DuckDNS didn't work with Let's Encrypt during testing. Proper domain registrars (Namecheap, Porkbun, Cloudflare) are worth the few dollars.

If you have any questions about Caddy, Docker deployment, or selling digital products, happy to answer in the comments.

Top comments (0)