Krazy Kontainers
Go file server + packaging for Docker, Podman, or Kubernetes. Works for and alongside gokrazy appliances. Well-defined scope: serve files, contained — not a whole gokrazy distro.
Go file server in a Krazy Kontainer of your choosing pure Go · zero CGO GPL-3.0
Serve files from one static Go binary in the Kontainer you already
run — Docker, Podman, or
Kubernetes. ~5.4 MiB stripped,
CGO_ENABLED=0, pure net/http, same flags,
same /healthz. gokrazy-friendly packaging — not a whole
gokrazy distro.
Why
Process stays ~5.4 MiB. Data can be a handful of files or a warehouse. Same static binary in a Krazy Kontainer — Docker, Podman, or Kubernetes — on the runtime you already run.
Go file server + packaging for Docker, Podman, or Kubernetes. Works for and alongside gokrazy appliances. Well-defined scope: serve files, contained — not a whole gokrazy distro.
~5.4 MiB stripped binary. Mount a tiny config tree or a krazy-huge dataset — the Kontainer shape does not care. Process tiny; data your call.
Docker, Podman, and
Kubernetes are first-class ways to contain the
server. Same binary, same flags, same /healthz.
Maintainer’s bet. Optimize for a tiny process, well-defined boundaries, and a Kontainer on Docker / Podman / Kubernetes — with gokrazy-friendly packaging. Different defaults? PRs and sharp arguments welcome.
Features
Point -root (or KRAZY_ROOT) at a directory. Directory browsing is optional via -browse.
/healthz for probes, Range requests for resumes. Flags beat env beat defaults — short unit files, clear precedence.
Multi-stage → FROM scratch, non-root UID. Mount a volume, publish a port — same shape under Docker and Podman.
Hardened manifests with PVC, runAsNonRoot, read-only root FS, and /healthz probes under deploy/kubernetes/.
Build with -tags gokrazy (listen :80, root /perm/files). Runs for / alongside gokrazy — not a replacement distro.
No uploads, no WebDAV, no in-app auth, no UI. Pure net/http, no CGO. Auth and TLS live at the edge.
Quick start
/healthzCopy-paste from the public product README.
go install github.com/crimsonflower420/KrazyToGo/cmd/krazytogo@latest
mkdir -p data && echo hello > data/hello.txt
krazytogo -root ./data -addr :8080
# → http://127.0.0.1:8080/hello.txt
# → http://127.0.0.1:8080/healthz → 200 ok
mkdir -p data && echo hello > data/hello.txt
go run ./cmd/krazytogo -root ./data -addr :8080
CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o krazytogo ./cmd/krazytogo
./krazytogo -root ./data -addr :8080
curl -fsS http://127.0.0.1:8080/healthz
# → 200 ok
After any deploy, hit /healthz — probes and curl both get a plain 200 ok.
-root / KRAZY_ROOT./data; /data in images)-addr / KRAZY_ADDR:8080; :80 on gokrazy)-browse / KRAZY_BROWSEPrecedence: flags > env > defaults.
Deploy targets
Docker, Podman, and Kubernetes are equal ways to contain the server. gokrazy stays in the picture as an appliance host you can run for or alongside — packaging, not a whole distro.
Kontainer
Multi-stage → FROM scratch,
USER 65532:65532. Mount content, publish a port.
Same Krazy Kontainer image shape as Podman.
docker build -t krazytogo .
docker run -d -p 8080:8080 \
-v "$PWD/data:/data" \
-e KRAZY_ROOT=/data krazytogo
Kontainer
Same Dockerfile, same scratch image, rootless-friendly. Drop-in commands if you prefer Podman over Docker.
podman build -t krazytogo .
podman run -d -p 8080:8080 \
-v "$PWD/data:/data" \
-e KRAZY_ROOT=/data krazytogo
Kontainer
Hardened manifests under deploy/kubernetes/.
PVC (not hostPath), non-root, read-only root FS, /healthz probes.
kubectl apply -k deploy/kubernetes/
gokrazy note. Build with -tags gokrazy
(listen :80, root /perm/files) when you bake
the binary into an appliance image. Prefer Tailscale for access.
KrazyToGo is the file server + packaging — not a gokrazy distribution.
FAQ
CGO_ENABLED=0, -ldflags=-s -w) on linux/amd64. Stdlib only — no module deps.What this is not
If you need the items below, put another component in front of KrazyToGo. They are not planned for the in-process surface.
Support
KrazyToGo is free software under GPL-3.0. If a Kontainer of your choosing saves you an afternoon, a coffee keeps the maintainer caffeinated and the binary tiny.