traefik/whoami
traefik/whoami has 1,436 GitHub stars and 261 forks. GitHot measured +1 stars in 24 hours. Last checked 2026-11-08 05:28 UTC. Last push 2026-07-29.
Tiny Go server that prints os information and HTTP request to output
Measured star growth
- in 24h
- +1
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Originalwhoami
Tiny Go webserver that prints OS information and HTTP request to output.
Usage
Paths
/[?wait=d]
Returns the whoami information (request and network information).
The optional wait query parameter can be provided to tell the server to wait before sending the response.
The duration is expected in Go's time.Duration format (e.g. /?wait=100ms to wait 100 milliseconds).
The optional env query parameter can be set to true to add the environment variables to the response.
/api
Returns the whoami information (and some extra information) as JSON.
The optional env query parameter can be set to true to add the environment variables to the response.
/bench
Always return the same response (1).
/data?size=n[&unit=u]
Creates a response with a size n.
The unit of measure, if specified, accepts the following values: KB, MB, GB, TB (optional, default: bytes).
/echo
WebSocket echo.
/health
Heath check.
GET,HEAD, ...: returns a response with the status code defined by thePOSTPOST: changes the status code of theGET(HEAD, ...) response.
Flags
| Flag | Env var | Description |
|---|---|---|
cert |
Give me a certificate. | |
key |
Give me a key. | |
cacert |
Give me a CA chain, enforces mutual TLS | |
port |
WHOAMI_PORT_NUMBER |
Give me a port number. (default: 80) |
name |
WHOAMI_NAME |
Give me a name. |
verbose |
Enable verbose logging. |
Examples
$ docker run -d -p 8080:80 --name iamfoo traefik/whoami
$ curl http://localhost:8080
Hostname: 9c9c93da54b5
IP: 127.0.0.1
IP: ::1
IP: 172.17.0.2
RemoteAddr: 172.17.0.1:41040
GET / HTTP/1.1
Host: localhost:8080
User-Agent: curl/8.5.0
Accept: */*
# updates health check status
$ curl -X POST -d '500' http://localhost:8080/health
# calls the health check
$ curl -v http://localhost:8080/health
* Host localhost:8080 was resolved.
* IPv6: ::1
* IPv4: 127.0.0.1
* Trying [::1]:8080...
* Connected to localhost (::1) port 8080
> GET /health HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/8.5.0
> Accept: */*
>
< HTTP/1.1 500 Internal Server Error
< Date: Fri, 18 Apr 2025 13:36:02 GMT
< Content-Length: 0
$ openssl req -newkey rsa:4096 \
-x509 \
-sha256 \
-days 3650 \
-nodes \
-out ./certs/example.crt \
-keyout ./certs/example.key
$ docker run -d -p 8080:80 -v ./certs:/certs --name iamfoo traefik/whoami --cert /certs/example.crt --key /certs/example.key
$ curl https://localhost:8080 -k --cert certs/example.crt --key certs/example.key
Hostname: 25bc0df47b95
IP: 127.0.0.1
IP: ::1
IP: 172.17.0.2
RemoteAddr: 172.17.0.1:50278
Certificate[0] Subject: CN=traefik.io,O=TraefikLabs,L=Lyon,ST=France,C=FR
GET / HTTP/1.1
Host: localhost:8080
User-Agent: curl/8.5.0
Accept: */*
$ docker run -d -p 8080:80 --name iamfoo traefik/whoami
$ grpcurl -plaintext -proto grpc.proto localhost:8080 whoami.Whoami/Whoami
{
"hostname": "5a45e21984b4",
"iface": [
"127.0.0.1",
"::1",
"172.17.0.2"
]
}
$ grpcurl -plaintext -proto grpc.proto localhost:8080 whoami.Whoami/Bench
{
"data": 1
}
version: '3.9'
services:
whoami:
image: traefik/whoami
command:
# It tells whoami to start listening on 2001 instead of 80
- --port=2001
- --name=iamfoo
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
560,910 starspublic-apis/public-apis
A collective list of free APIs
497,158 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
442,262 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,175 stars