caddy-https-reverse-proxy

Deploys Caddy on a remote Linux host to expose a local HTTP backend as trusted HTTPS.

2|Updated Jun 18, 2026
One-click install
npx skills add https://github.com/zero-yx/static_flow --skill caddy-https-reverse-proxy-zero-yx
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: caddy-https-reverse-proxy
Source: https://github.com/zero-yx/static_flow/tree/main/skills/caddy-https-reverse-proxy
Command: npx skills add https://github.com/zero-yx/static_flow --skill caddy-https-reverse-proxy-zero-yx

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It turns a local HTTP-only backend on a remote Linux server into a publicly trusted HTTPS endpoint by installing and configuring Caddy without Docker, handling certificate issuance, verification, and rollback. ## Core Features & Use Cases - Domain-first deployment: Uses your own domain with Let's Encrypt HTTP-01 automatic certificate issuance as the preferred path. - DuckDNS DNS-01 fallback: Switches to a plugin-enabled Caddy binary with DNS-01 challenge when no own domain is available or port 80/443 reachability is unstable, including a low-bandwidth local-download-then-upload binary transfer option. - Verification and rollback: Validates the Caddyfile, checks certificate issuer and validity via openssl, confirms health endpoint responses, and restores prior binaries and configs when reverting. - Use Case: You have a backend API listening on 127.0.0.1:39080 on a VPS and want a browser frontend on GitHub Pages to call it over trusted HTTPS at api.example.com. ## Quick Start Deploy Caddy as an HTTPS reverse proxy on my server at ssh user@host for domain api.example.com proxying to 127.0.0.1:39080 with Let's Encrypt, then verify the certificate and health endpoint.

Frequently Asked Questions about caddy-https-reverse-proxy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up Caddy as an HTTPS reverse proxy without Docker?▼

Install Caddy via apt on the remote host, write a Caddyfile with your domain and a reverse_proxy directive pointing to the local backend upstream, then validate with caddy validate and restart via systemctl. Caddy obtains a Let's Encrypt certificate automatically over HTTP-01.

How to get a Let's Encrypt certificate when port 80 is blocked?▼

Use the DNS-01 challenge instead of HTTP-01. This skill falls back to a Caddy binary built with the dns.providers.duckdns module, storing the DuckDNS token in a root-only /etc/caddy/caddy.env file referenced by a systemd drop-in.

Can I use Caddy HTTPS with a free DuckDNS domain?▼

Yes, as a fallback when no own domain is available. Download the plugin-enabled Caddy binary from caddyserver.com, verify the duckdns module with caddy list-modules, and configure the tls block with dns duckdns and the token from the environment file.

Why does Caddy return 502 after setting up the reverse proxy?▼

A 502 means the backend is not running on the configured upstream address. Confirm the service listens on the expected loopback port such as 127.0.0.1:39080 with ss -lntup, and check that the Caddyfile reverse_proxy target matches.

How do I verify the HTTPS certificate Caddy obtained?▼

Run openssl s_client -connect domain:443 -servername domain and inspect issuer, subject, and validity dates. Also confirm curl -I https://domain/_caddy_health returns 200 and the HTTP URL returns a 308 redirect to HTTPS.