Skip to content

Enrol against a panel on its own certificate with --panel-ca - #17

Open
wrrfsub wants to merge 2 commits into
serveroshq:mainfrom
wrrfsub:panel-ca
Open

wrrfsub wants to merge 2 commits into
serveroshq:mainfrom
wrrfsub:panel-ca

Conversation

@wrrfsub

@wrrfsub wrrfsub commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

A self-hosted panel with no public domain, like a homelab on 192.168.1.20 or panel.lan, runs on Caddy's own certificates. serverosd enrol only trusted publicly trusted certificates, so enrolment failed the TLS check before the panel ever saw the request.

  • serverosd enrol --panel-ca=FILE trusts only that CA for the enrol request. The panel's install script downloads the CA and checks it against the SHA-256 in the install command before it gets here (Connect machines to a panel on a local certificate (homelab, no domain) panel#52).
  • The CA is kept in /etc/serveros/panel-ca.crt and used for the release feed checks too (serverosd update and the automatic check), since those also go straight to the panel. serverosd disconnect removes it.
  • A TLS failure at enrolment now says what to do, with or without a pinned CA. A CA file that can't be read, or has no certificate in it, is refused before anything is written.
  • Enrolment without --panel-ca works as it does today.

Tested with a build of this branch:

  • Against Caddy with local_certs (its real root and intermediate), by hostname and by IP: it enrols with the root pinned and is refused without it.
  • End to end with the panel branch: a node that doesn't trust the panel's CA ran the install command from the panel, enrolled, and connected through the gateway.
  • serverosd update --check against the panel works with the pinned CA and fails the TLS check without it.
  • A different CA, a file that isn't a certificate and a missing file each fail with a clear message.
  • cargo fmt --check, cargo clippy --workspace --all-targets -- -D warnings and cargo test --workspace pass.

Fixes #16. It's the daemon half of serveroshq/panel#52.

Most of this was generated by Claude.

serverosd enrol --panel-ca=FILE trusts only that CA for the panel, for a
self-hosted panel on Caddy's own certificates (a home network with no
public domain). The panel's install script checks the CA against the
SHA-256 in the install command before it gets here.

The CA is kept in /etc/serveros/panel-ca.crt and used for the release feed
checks too; disconnect removes it. A TLS failure at enrolment says what to
do, and a pinned CA file with no certificate in it is refused up front.

This branch has not been deployed

No deployments
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.

Enrol against a panel on its own certificate

1 participant