Jaeger 2.20.0 with Caddy Basic Auth and OTLP gRPC/HTTP support
105
A Jaeger 2.20.0 Docker image with a Caddy reverse proxy providing Basic Authentication for the Jaeger UI.
401) error pageThe image runs two processes:
┌──────────────────────┐
│ Caddy :16686 │
│ Basic Auth / UI │
└──────────┬───────────┘
│
│ reverse proxy
▼
┌──────────────────────┐
│ Jaeger :16687 │
│ Query/UI │
└──────────────────────┘
OpenTelemetry applications
│
├──────── OTLP gRPC ────────► :4317
│
└──────── OTLP HTTP ────────► :4318
The Jaeger UI is not exposed directly. Requests to port 16686 are handled by Caddy, which requires HTTP Basic Authentication before proxying requests to Jaeger's query service.
Run the container with a username and password:
docker run -d \
--name jaeger-auth \
-p 16686:16686 \
-p 4317:4317 \
-p 4318:4318 \
-e JAEGER_AUTH_USER=admin \
-e JAEGER_AUTH_PASSWORD=change-me \
catbee/jaeger-auth:2.20.0
Open the Jaeger UI:
http://localhost:16686
The UI requires the configured username and password.
| Variable | Description |
|---|---|
JAEGER_AUTH_USER | Username required to access the Jaeger UI |
JAEGER_AUTH_PASSWORD | Plain-text password used to generate the Basic Auth password hash at startup |
Both variables are required. The container exits if either variable is missing.
| Port | Purpose |
|---|---|
16686 | Jaeger UI through Caddy with Basic Authentication |
4317 | OpenTelemetry Protocol (OTLP) over gRPC |
4318 | OpenTelemetry Protocol (OTLP) over HTTP |
The image configures Jaeger to receive OpenTelemetry traces through both supported OTLP protocols.
localhost:4317
Example OpenTelemetry endpoint:
http://localhost:4317
localhost:4318
Example OpenTelemetry endpoint:
http://localhost:4318
Configure your OpenTelemetry application to export traces to the appropriate endpoint.
The Jaeger UI is protected by Caddy using HTTP Basic Authentication.
At startup, the container:
JAEGER_AUTH_USER.JAEGER_AUTH_PASSWORD.The password itself is not written into the Caddy configuration.
Unauthorized requests receive an HTTP 401 response.
The image includes a custom 401.html page that is returned for unauthorized UI requests.
The response also includes:
WWW-Authenticate: Basic
which causes compatible clients and browsers to request Basic Authentication credentials.
| Property | Value |
|---|---|
| Jaeger | 2.20.0 |
| Caddy | 2.10-alpine |
| UI proxy | Caddy |
| Authentication | HTTP Basic Authentication |
| OTLP gRPC | 4317 |
| OTLP HTTP | 4318 |
| Jaeger Query | 16687 |
| Public UI | 16686 |
Example docker-compose.yml:
services:
jaeger:
image: catbee/jaeger-auth:2.20.0
container_name: jaeger-auth
ports:
- "16686:16686"
- "4317:4317"
- "4318:4318"
environment:
JAEGER_AUTH_USER: admin
JAEGER_AUTH_PASSWORD: change-me
Start the service:
docker compose up -d
View logs:
docker compose logs -f jaeger
Configure your application to export traces to the Jaeger container using OTLP.
For Docker Compose, other services can use:
jaeger:4317
for OTLP gRPC or:
jaeger:4318
for OTLP HTTP.
For applications running on the host:
localhost:4317
or:
localhost:4318
The Jaeger UI is protected with HTTP Basic Authentication.
However, JAEGER_AUTH_PASSWORD is supplied as an environment variable and is used to generate the password hash when the container starts.
For production deployments:
docker pull catbee/jaeger-auth:2.20.0
docker run -d \
--name jaeger-auth \
-p 16686:16686 \
-p 4317:4317 \
-p 4318:4318 \
-e JAEGER_AUTH_USER=admin \
-e JAEGER_AUTH_PASSWORD=change-me \
catbee/jaeger-auth:2.20.0
Then open:
http://localhost:16686
The container manages both Jaeger and Caddy processes.
When the container receives SIGTERM or SIGINT, the startup script stops both services and waits for them to exit cleanly.
catbee/jaeger-auth:2.20.0
Jaeger and Caddy are distributed under their respective open-source licenses.
Refer to the upstream Jaeger and Caddy projects for complete licensing information.
Content type
Image
Digest
sha256:82b34d8a2…
Size
65.5 MB
Last updated
about 2 months ago
docker pull catbee/jaeger-auth:2.20.0