Privacy and security
How ServerGym isolates lab containers, strips real secrets before booting security clones, enforces strict security headers on public pages, and protects credentials and contact messages.
Zero-script public pages and security headers
Both servergym.com and docs.servergym.com ship zero JavaScript, zero inline styles, and zero third-party font, analytics, or CDN requests. Nginx enforces a locked-down Content Security Policy on static hosts:
Content-Security-Policy: default-src 'none'; style-src 'self'; img-src 'self'; base-uri 'none'; form-action 'self'; frame-ancestors 'none'
On app.servergym.com, Nginx switches to a dedicated SPA policy permitting only same-origin scripts, WebSocket terminal connections, and Stripe Checkout / Billing Portal form actions. All hostnames send Strict-Transport-Security, X-Content-Type-Options: nosniff, X-Frame-Options: DENY, Referrer-Policy: strict-origin-when-cross-origin, and Permissions-Policy.
Sandbox isolation and zero customer data
- Isolated environments — production labs run in ephemeral Linux Incus containers with memory, CPU, disk, and TTL limits, populated only with synthetic domains, users, and test data.
- Local path confinement — in
SANDBOX_DRIVER=localdevelopment mode, every shell command, config editor read/write, and Tab completion passes throughresolveSafePath()so operations under/etcor/var/wwwcannot escape the session’s temporary directory. - Synchronous secret and PII scrubbing — before any uploaded infrastructure blueprint enters a security twin, ServerGym scrubs secrets and API keys into synthetic
SERVERGYM{...}canaries, redacts email addresses to@servergym.invalid, replaces public IPv4 addresses with documentation IP203.0.113.99, and neutralises database data volumes and.sqldumps to an empty schema path.
Accounts, API keys, webhooks, and contact form
- Passwords and sessions — passwords are salted per user and hashed with Node’s
crypto.scryptSync(verified withcrypto.timingSafeEqual). Login sessions useHttpOnly,SameSite=Laxcookies (Secureover HTTPS) whose 32-byte random tokens are stored only as SHA-256 hashes with a 7-day expiry. - API keys and webhooks — raw
sg_live_*tokens are shown once and stored only as SHA-256 digests and prefixes. Outbound webhooks are HMAC-SHA256 signed and block loopback, private, and internal addresses to prevent SSRF. - Contact form —
POST /contactchecksSec-Fetch-SiteandOriginheaders, applies a honeypot and silent link/SEO spam rules, enforces a 3-message daily cap per sender email, stores legitimate enquiries in SQLite, and delivers them via Resend.
For legal terms, see the Privacy policy and Terms on servergym.com.