Run the hardened Compose stack
- The gateway container runs as an unprivileged user with a read-only root filesystem.
- Linux capabilities are dropped and no-new-privileges is enabled.
- State lives in a named project volume; temporary paths are noexec tmpfs mounts.
- The web service binds to loopback by default; the gateway remains on the private Compose network.
TERMINALbash
cp .env.example .env
docker compose build
docker compose up -d
docker compose psUse secret files in public mode
SHREDDAR_PUBLIC_MODE=true refuses to start without at least one API key and refuses wildcard CORS. Direct secret values and *_FILE variants are mutually exclusive.
.ENV — PATHS ONLYdotenv
SHREDDAR_PUBLIC_MODE=true
SHREDDAR_API_KEYS_FILE=/run/secrets/api_key
SHREDDAR_ALLOWED_ORIGINS=https://your-app.example
SHREDDAR_DATA_DIR=/var/lib/shreddar
SHREDDAR_DATABASE_PATH=/var/lib/shreddar/shreddar.sqlite
SHREDDAR_KEY_FILE=/var/lib/shreddar/vault.keyConfigure one OpenAI-compatible upstream
Demo mode is enabled by default. A self-hosted operator can instead configure an upstream base URL and API key. The alpha supports non-streaming chat only.
ENVIRONMENTdotenv
SHREDDAR_DEMO_MODE=false
SHREDDAR_UPSTREAM_BASE_URL=https://provider.example/v1
SHREDDAR_UPSTREAM_API_KEY_FILE=/run/secrets/upstream_api_key
SHREDDAR_UPSTREAM_TIMEOUT_SECONDS=60Verify before authorized data
- 01
HEALTH
Check /healthz and /readyz from inside the intended network boundary.
- 02
AUTH
Confirm missing and invalid credentials return 401 for protected routes.
- 03
CORS
Confirm only the exact application origins are accepted.
- 04
FAIL CLOSED
Test blocked credentials, local_only data, upstream timeout, and unsafe output.
- 05
RECOVERY
Prove database and key backup integrity, restore procedure, expiry cleanup, and rollback.