Ember reads data from the Caddy admin API. This page explains what your Caddyfile needs for Ember to work.
Ember connects to the Caddy admin API (default: localhost:2019). Make sure it's enabled:
{
admin localhost:2019
}
Caution: The admin API is unauthenticated by default. Do not expose it on a public interface. See Caddy's admin API documentation for authentication options.
For improved security, Caddy can listen on a Unix socket instead of a TCP port. This avoids network exposure entirely and restricts access through filesystem permissions:
{
admin unix//run/caddy/admin.sock
}
You can also set file permissions on the socket:
{
admin unix//run/caddy/admin.sock|0660
}
To connect Ember to a Unix socket:
ember --addr unix//run/caddy/admin.sockOr via environment variable:
export EMBER_ADDR=unix//run/caddy/admin.sock
emberNote: TLS options (
--ca-cert,--client-cert,--client-key,--insecure) cannot be used with Unix socket addresses, as the connection is local and does not traverse the network.
The metrics directive enables Prometheus-format metrics on the admin API. Without it, Ember cannot display HTTP traffic data.
{
admin localhost:2019
metrics
}
This exposes the following Caddy metrics at the /metrics admin endpoint:
| Metric | Description |
|---|---|
caddy_http_requests_total |
Total HTTP requests (with host, method, status labels) |
caddy_http_request_duration_seconds |
Request duration histogram (with host labels and buckets) |
caddy_http_requests_in_flight |
Currently in-flight requests |
caddy_http_response_size_bytes |
Response body size |
Ember parses these metrics to compute per-host RPS, average latency, percentiles, status code rates, and more.
Ember automatically detects FrankenPHP by sending GET /frankenphp/threads to the admin API. If the endpoint responds with 200 OK, the FrankenPHP tab is enabled.
If auto-detection does not work, you can specify the process ID manually:
ember --frankenphp-pid 12345When no --frankenphp-pid is provided, Ember scans the process list for a FrankenPHP process. If none is found, it falls back to scanning for a Caddy process for CPU/RSS monitoring. When process scanning is unavailable, Ember derives CPU and RSS from the standard Go process_* Prometheus metrics exposed by Caddy's /metrics endpoint.
Use the --addr flag to point Ember to a remote Caddy admin API:
ember --addr http://10.0.0.5:2019The admin API must be reachable from wherever Ember runs.
When the Caddy admin API is served over HTTPS (recommended for production), Ember needs TLS configuration to connect.
If your Caddy instance uses a certificate signed by a private CA (e.g., internal PKI, self-signed):
ember --addr https://caddy.internal:2019 --ca-cert /path/to/ca.pemCaddy can require clients to present a certificate. Pass both a client certificate and its private key:
ember --addr https://caddy.internal:2019 \
--ca-cert /path/to/ca.pem \
--client-cert /path/to/client.pem \
--client-key /path/to/client-key.pemFor development or debugging only:
ember --addr https://localhost:2019 --insecureWarning:
--insecuredisables all certificate verification. Do not use in production.
| Flag | Description |
|---|---|
--ca-cert |
Path to a PEM-encoded CA certificate to trust |
--client-cert |
Path to a PEM-encoded client certificate (for mTLS) |
--client-key |
Path to the private key matching --client-cert |
--insecure |
Skip all TLS verification |
These flags are global and work with all modes (TUI, JSON, daemon) and subcommands (status, wait).
A complete working example:
{
admin localhost:2019
metrics
}
example.com {
respond "Hello, world!" 200
}