Go file server in a Krazy Kontainer of your choosing pure Go · zero CGO GPL-3.0

Go file server in a Krazy Kontainer.
Krazy tiny or krazy huge.

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.

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

  • Docker
  • Podman
  • Kubernetes

Kontainers first. Scale either way.

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.

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.

Krazy tiny ↔ krazy huge

~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.

Three equal runtimes

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.

Small surface. Clear defaults.

  • 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-friendly

    Build with -tags gokrazy (listen :80, root /perm/files). Runs for / alongside gokrazy — not a replacement distro.

  • Well-defined boundaries

    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 contain the server. gokrazy stays in the picture as an appliance host you can run for or alongside — packaging, not a whole distro.

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. KrazyToGo is the file server + packaging — not a gokrazy distribution.

Short answers.

What is a Krazy Kontainer?
The packaging/runtime you choose for the KrazyToGo file server — Docker, Podman, or Kubernetes. Scratch image, non-root, mount your data. Binary plus packaging, including for / alongside gokrazy. It is not a whole gokrazy distro.
Krazy tiny or krazy huge — which?
Both. The process stays tiny (~5.4 MiB stripped). The data can be a few files or krazy huge — same Kontainer shape on Docker, Podman, or Kubernetes.
Why not just nginx / Caddy?
nginx and Caddy are strong reverse proxies with broad feature sets. KrazyToGo is a single static Go binary that only serves files — same build in a Kontainer on Docker, Podman, and Kubernetes. 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.

Out of scope — on purpose.

If you need the items below, put another component in front of KrazyToGo. They are not planned for the in-process surface.

  • Not a gokrazy distro — file server + Kontainer packaging for / alongside gokrazy, not a replacement OS image.
  • No in-process auth — use Tailscale, OAuth proxies, or your reverse proxy.
  • No uploads — read-oriented file server only.
  • 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 a Kontainer of your choosing saves you an afternoon, a coffee keeps the maintainer caffeinated and the binary tiny.