Repository navigation
Description
Welcome!
- I have read the Documentation
- I have checked the Common Issues Guide and my problem was not mentioned there.
- I have searched open and closed issues and my problem was not mentioned before.
- I have verified I am using the latest version available. You can check the latest release here.
Component
Agent
Problem Description
In v0.19.0, agents now enforce HTTPS certificate verification. However, the official docker image henrygd/beszel-agent:0.19.0 (and latest) is built FROM scratch in internal/dockerfile_agent without copying system root certificates (ca-certificates.crt).
As a result, the agent container has no trust store at all. Even when the Hub is behind a reverse proxy using a valid public certificate (such as Let's Encrypt ISRG Root X1), the Go runtime fails with:
WARN WebSocket connection failed err="tls: failed to verify certificate: x509: certificate signed by unknown authority"
In internal/dockerfile_hub, certificates are properly installed and copied to the scratch image:
RUN apk add --no-cache ca-certificates && update-ca-certificates
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/However, internal/dockerfile_agent is missing this step.
Expected Behavior
The agent container should include standard root CA certificates so it can connect out-of-the-box to Hubs configured with valid public HTTPS certificates (Let's Encrypt, Cloudflare, DigiCert, etc.) without requiring manual volume mounts of host CA files or custom CA_CERT_FILE configuration.
Steps to Reproduce
- Set up Beszel Hub behind a reverse proxy using a valid Let's Encrypt SSL certificate.
- Run the agent using the official Docker image
henrygd/beszel-agent:0.19.0withHUB_URL="https://your-hub-domain.com". - Check the agent container logs:
docker logs beszel-agent. - Observe the error:
WARN WebSocket connection failed err="tls: failed to verify certificate: x509: certificate signed by unknown authority" - Workaround: Mount the host CA bundle (
-v /etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt:ro) into the container, recreate the container, and observe that it connects successfully immediately.
OS / Architecture
linux/amd64 (Debian host)
Beszel version
0.19.0
Installation method
Docker
Configuration
services:
beszel-agent:
image: henrygd/beszel-agent:0.19.0
container_name: beszel-agent
restart: unless-stopped
network_mode: host
volumes:
- ./beszel_agent_data:/var/lib/beszel-agent
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
PORT: 45876
KEY: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5..."
HUB_URL: "https://your-hub-domain.com"
TOKEN: "your_token"Hub Logs
N/A (Hub is healthy, issue is purely on the agent TLS trust store)Agent Logs
WARN WebSocket connection failed err="tls: failed to verify certificate: x509: certificate signed by unknown authority"
Activity
butaford commentedon Sep 3, 2026
volumes:
zyberspace commentedon Sep 3, 2026
The :alpine variant works btw. I just switched my Agents to that. In case anyone needs a quick fix, other than reverting to the previous version.
henrygd commentedon Sep 3, 2026
Sorry about that, I'll patch it and update the image.
:alpinedoes work, and is what the:devagent is based on, so I didn't catch this.fix(agent): include root CA certificates in base image (#2291)
henrygd commentedon Sep 3, 2026
It should be fixed now if you pull a new image and recreate the container.
docker compose pull && docker compose up -dcybertaurus commentedon Sep 3, 2026
Seems to be fixed after pulling. Had the same issue here. Thanxs for quick fixing it!
zyberspace commentedon Sep 3, 2026
Can also confirm the new image fixes the issue. 👍
mdguggenbichler commentedon Sep 4, 2026
Can confirm I was able to upgrade to 0.19.0 this time without changing anything regarding certs (no CA_CERT_FILE workaround needed). Previously hit the exact x509: certificate signed by unknown authority error described above; pulling the image fresh today resolved it.
Update henrygd/beszel Docker tag to v0.20.0 (#49)
Update henrygd/beszel-agent Docker tag to v0.20.0 (#15)
Update ghcr.io/henrygd/beszel/beszel Docker tag to v0.20.0 (#14)