Skip to content

feat(https): serve Lens over HTTPS with certificates from Let's Encrypt or ZeroSSL - #289

Merged
adeelahmad merged 1 commit into
mainfrom
claude/project-thread-lph29l
Oct 10, 2026
Merged

adeelahmad merged 1 commit into
mainfrom
claude/project-thread-lph29l

Conversation

@adeelahmad

Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: Lens answered over http:// only; https:// needed a reverse proxy you set up yourself, or the Cloudflare tunnel.

After: Lens can serve itself at https:// your domain with certificates it gets and renews on its own, from Let's Encrypt, ZeroSSL (both by default: ZeroSSL when Let's Encrypt can't) or any ACME authority. It proves the domain over HTTP, TLS-ALPN, or DNS through Cloudflare, Route 53 and the other caddy-dns providers (any caddy-dns plugin works by name), so wildcards and machines the internet can't reach work too. Off by default. This PR is the API and installer part; the Settings › HTTPS page follows in its own PR.

How: a new https settings section (secrets: dns_credentials, eab_hmac_key) and domain/https.py, which runs Caddy like the tunnel runs cloudflared: one lease holder among the processes that have the ports (LENS_HTTPS_LISTEN=1). Caddy is fetched on first use (GitHub release checked against its sha512 checksums, or for a DNS provider a build with that plugin from caddyserver.com), its JSON config is written mode 600 under data_dir/https, and certificates live in the archive volume. install.sh with LENS_HTTPS=1 adds docker-compose.https.yml (worker gets 443/80 → 8443/8080) or the microsandbox port maps, and remembers it in .env. Passkeys, sign-in and email links follow the https domain. New endpoints: GET /settings/https/status, GET /settings/https/providers. make openapi regenerated. Threat model gets the new config entry.

Checked against a real Caddy 2.10.2: the generated configs validate (HTTP, TLS-ALPN, DNS with the Cloudflare plugin), the http→https redirect answers 308 to the public port, and Caddy's error lines become the status's error.

Motivation and Context

Adeel asked for built-in SSL via ZeroSSL/Let's Encrypt with DNS and other built-in plugins.

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project.
  • I added or updated tests.
  • I have updated docs/ accordingly (docs/https.md).
  • CHANGELOG.md under Unreleased.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YB1b1hox6iFRdfWcpoKZwK


Generated by Claude Code

@adeelahmad adeelahmad self-assigned this Oct 10, 2026
@adeelahmad
adeelahmad force-pushed the claude/project-thread-lph29l branch 2 times, most recently from c827f88 to 27de029 Compare October 10, 2026 21:25
…pt or ZeroSSL

Lens runs Caddy in the process that has the HTTPS ports: certificates over ACME
(HTTP, TLS-ALPN or DNS with any caddy-dns provider), renewed on their own, set up
in the https settings section. install.sh LENS_HTTPS=1 publishes 443 and 80.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YB1b1hox6iFRdfWcpoKZwK
@adeelahmad
adeelahmad force-pushed the claude/project-thread-lph29l branch from 27de029 to 83621a0 Compare October 10, 2026 22:04
@adeelahmad
adeelahmad enabled auto-merge (squash) October 10, 2026 22:04
@adeelahmad
adeelahmad merged commit f1288f6 into main Oct 10, 2026
11 of 13 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-lph29l branch October 10, 2026 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants