gokrazy to-go · in a Krazy Kontainer pure Go · zero CGO GPL-3.0

Minified gokrazy in a container.
Or just serve files — also krazy.

KrazyToGo is a to-go, minified take on gokrazy — shipped in a Krazy Kontainer you already run: Docker, Podman, or Kubernetes. Start with an efficient Go file server (~5.4 MiB stripped, CGO_ENABLED=0, pure net/http, /healthz). Add packages and grow as large as you need — krazy huge, even a whole distro if you want.

Module github.com/crimsonflower420/KrazyToGo · package cmd/krazytogo · ~5.4 MiB stripped · CGO_ENABLED=0 (linux/amd64)

  • Docker
  • Podman
  • Kubernetes

gokrazy to-go. Two useful extremes.

A minified gokrazy path in a Krazy Kontainer — Docker, Podman, or Kubernetes. Stay tiny and serve files in Go, or grow the stack: add packages, go krazy huge, shape a whole distro if that’s your goal.

Krazy Kontainers

House moniker for the containers that hold KrazyToGo — Docker, Podman, or Kubernetes. Same software, same shape, on the runtime you already run.

File server ↔ full stack

Core today: ~5.4 MiB stripped, pure net/http, /healthz. Efficient Go file serving is enough — and also krazy. Or grow: install packages, expand the image, take it as far as you need.

Three equal runtimes

Docker, Podman, and Kubernetes are first-class ways to run the Kontainer. Same binary, same flags, same /healthz.

Maintainer’s bet. Ship gokrazy’s spirit to-go: a container you can keep minimal or grow deliberately — with a well-defined file-server core and clear edges for auth and TLS. Different defaults? PRs and sharp arguments welcome.

Solid core. Room to grow.

  • Static file serving

    Point -root (or KRAZY_ROOT) at a directory. Directory browsing is optional via -browse.

  • Ops-friendly endpoints

    /healthz for probes, Range requests for resumes. Flags beat env beat defaults — short unit files, clear precedence.

  • Krazy Kontainer packaging

    Multi-stage → FROM scratch, non-root UID. Mount a volume, publish a port — same shape under Docker and Podman.

  • Kubernetes first-class

    Hardened manifests with PVC, runAsNonRoot, read-only root FS, and /healthz probes under deploy/kubernetes/.

  • gokrazy to-go

    Build with -tags gokrazy (listen :80, root /perm/files). Same binary for appliances and Kontainers — minified gokrazy spirit, container-native.

  • Well-defined file-server core

    The file-server surface stays tight: no uploads, no WebDAV, no in-app auth, no UI. Pure net/http, no CGO. Auth and TLS live at the edge.

Install → run → /healthz

Copy-paste from the public product README.

Install
go install github.com/crimsonflower420/KrazyToGo/cmd/krazytogo@latest
Run (after install)
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
From a checkout
mkdir -p data && echo hello > data/hello.txt
go run ./cmd/krazytogo -root ./data -addr :8080
Static build
CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o krazytogo ./cmd/krazytogo
./krazytogo -root ./data -addr :8080
Smoke check
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
Directory to serve (default ./data; /data in images)
-addr / KRAZY_ADDR
Listen address (default :8080; :80 on gokrazy)
-browse / KRAZY_BROWSE
Directory listing (default on; off → dirs 404)

Precedence: flags > env > defaults.

One binary. Three first-class Kontainers.

Docker, Podman, and Kubernetes are equal ways to run a Krazy Kontainer. Same binary on a gokrazy appliance when you bake it in with -tags gokrazy.

Kontainer

Docker

Multi-stage → FROM scratch, USER 65532:65532. Mount content, publish a port. Same Krazy Kontainer image shape as Podman.

Docker
docker build -t krazytogo .
docker run -d -p 8080:8080 \
  -v "$PWD/data:/data" \
  -e KRAZY_ROOT=/data krazytogo

Kontainer

Podman

Same Dockerfile, same scratch image, rootless-friendly. Drop-in commands if you prefer Podman over Docker.

Podman
podman build -t krazytogo .
podman run -d -p 8080:8080 \
  -v "$PWD/data:/data" \
  -e KRAZY_ROOT=/data krazytogo

Kontainer

Kubernetes

Hardened manifests under deploy/kubernetes/. PVC (not hostPath), non-root, read-only root FS, /healthz probes.

  • kubectl apply -k deploy/kubernetes/
  • Edit Deployment image after push
  • Auth / TLS at Ingress or mesh

gokrazy note. Build with -tags gokrazy (listen :80, root /perm/files) when you bake the binary into an appliance image. Prefer Tailscale for access. Same software path as the Kontainer — minified gokrazy, to-go.

Short answers.

What is KrazyToGo?
A to-go, minified version of gokrazy in a container. Today’s solid core is an efficient Go file server (~5.4 MiB, pure net/http, /healthz). From there you can add packages and grow — krazy huge, even toward a whole distro if you want.
What is a Krazy Kontainer?
Our house moniker for containers that contain KrazyToGo — Docker, Podman, or Kubernetes. Scratch image, non-root, mount your data. Same software on the runtime you choose.
Krazy tiny or krazy huge — which?
Both. Stay with the tiny file-server core, or expand the Kontainer: install packages, grow the image, take it as large as you need. Same runtimes either way.
Why not just nginx / Caddy?
nginx and Caddy are strong reverse proxies with broad feature sets. KrazyToGo starts as a single static Go binary that serves files efficiently — same build in a Kontainer on Docker, Podman, and Kubernetes — with a clear path to grow. Put a proxy in front when you need TLS, auth, or routing.
Where does auth live?
Outside the process. Prefer Tailscale Serve, or terminate TLS and auth at Caddy, nginx, or Ingress. No in-process auth by design.
How big is the binary?
About 5.4 MiB stripped (CGO_ENABLED=0, -ldflags=-s -w) on linux/amd64. Stdlib only — no module deps.
Can I upload files?
No. Read-oriented serving only. Uploads, WebDAV, and admin UI stay out of scope.
License / support?
GPL-3.0. If it saves you a weekend, buy Grant a coffee.

Well-defined boundaries — on purpose.

The in-process file-server surface stays tight. Grow the Kontainer (packages, larger images) around it; keep auth and TLS at the edge.

  • No in-process auth — use Tailscale, OAuth proxies, or your reverse proxy.
  • No uploads — read-oriented file serving in the core binary.
  • No WebDAV — mount and sync belong elsewhere.
  • No built-in UI — optional directory browse only; no admin console.
  • No CGO — pure Go, always.
  • Not a reverse proxy — terminate TLS and auth at the edge (Caddy, nginx, Ingress, etc.).

Support the project.

KrazyToGo is free software under GPL-3.0. If gokrazy to-go in a Krazy Kontainer saves you an afternoon, a coffee keeps the maintainer caffeinated and the core binary sharp.