Skip to content

Document HTTPS for the web server on ESP32 - #317

Open
Jon R. Helms (skipfire) wants to merge 10 commits into
esphome:mainfrom
skipfire:web-server-idf-ssl
Open

Jon R. Helms (skipfire) wants to merge 10 commits into
esphome:mainfrom
skipfire:web-server-idf-ssl

Conversation

@skipfire

@skipfire Jon R. Helms (skipfire) commented Nov 3, 2026 •

Copy link
Copy Markdown

Description

Documents HTTPS for the shared web server on ESP32, for component authors: web_server_idf.consume_ssl_sockets() in the schema, WebServerBase::set_ssl_credentials() and set_port() before init(), and web_server_idf.require_plain_http() for components that can't be combined with HTTPS yet.

Pull request in esphome this documents (if applicable):

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@netlify

netlify Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for esphome-dev-docs ready!

Name Link
🔨 Latest commit 677769e
🔍 Latest deploy log https://app.netlify.com/projects/esphome-dev-docs/deploys/6aeaad78023351322cfac415
😎 Deploy Preview https://deploy-preview-317--esphome-dev-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… check

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… limit

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bdraco

Copy link
Copy Markdown
Member

ESPHome Bot (@esphbot) review

@esphbot

ESPHome Bot (esphbot) commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Previous review — superseded by a newer review below.

@esphbot ESPHome Bot (esphbot) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tip

No blocking issues found — ready to merge.

@bdraco

Copy link
Copy Markdown
Member

ESPHome Bot (@esphbot) review

@esphbot

ESPHome Bot (esphbot) commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Previous review — superseded by a newer review below.

@esphbot ESPHome Bot (esphbot) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tip

No blocking issues found — ready to merge.

@bdraco

Copy link
Copy Markdown
Member

ESPHome Bot (@esphbot) review

@esphbot

Copy link
Copy Markdown
Contributor

PR Review — Document HTTPS for the web server on ESP32

Ready to merge: the page is accurate, well scoped, and matches the simpler set-before-init() API.

Strengths:

  • The latest commit drops the old restart flow (the deadlock warning and switching with set_ssl_credentials(nullptr, nullptr, 80)). The page now says the port and credentials must be set before init() and that changing them while the server runs isn't supported. This matches the PR description and leaves component authors fewer ways to get it wrong.
  • It explains why HTTPS can't be combined with web_server and prometheus, and points to require_plain_http() for components that need plain HTTP.
  • It warns that the PEM strings aren't copied and must outlive the server, that the key must be unencrypted, and that a bad certificate or key leaves the server off rather than falling back to plain HTTP.
  • It states the cost: 4 connections at about 26 KB each, with the PSRAM option.
  • The cross-link to /architecture/components/esp32_tls/ resolves (esp32_tls.md exists), and the sidebar entry sits with the other networking pages.

Remaining:

  • Optional: link the Socket Consumption API page next to the add_httpd_clients() mention.


Checklist

  • Docs match the described API surface (consume_ssl_sockets, set_ssl_credentials, set_port before init, require_plain_http)
  • Code examples are correct and safe to copy
  • Links resolve and cross-reference related pages
  • Sidebar navigation updated

Automated review by Kōan (Claude) HEAD=62d7f4c 25s

@esphbot ESPHome Bot (esphbot) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tip

No blocking issues found — ready to merge.

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.

3 participants