···37373838```bash
3939git clone https://gitea.cloudforest-basilisk.ts.net/Arcnode.xyz/atauth.git
4040-cd atauth
4040+cd atauth/gateway
4141cp .env.example .env
4242-echo "ADMIN_TOKEN=$(openssl rand -hex 32)" >> .env
4242+```
4343+4444+Edit `.env` and fill in the required secrets (generate with `openssl rand -hex 32`):
4545+4646+```env
4747+ADMIN_TOKEN=<your-admin-token>
4848+OIDC_KEY_SECRET=<your-oidc-key-secret>
4949+MFA_ENCRYPTION_KEY=<your-64-hex-char-key> # openssl rand -hex 32
5050+```
43515252+Then start:
5353+5454+```bash
4455docker compose up -d
4556```
46574747-Then open the admin dashboard at `http://localhost:3100/admin/login` and use the setup wizard to register your first app.
5858+Open the admin dashboard at `https://your-domain/admin/login` and use the setup wizard to register your first app.
48594960## Supported Apps
5061···120131121132## Security
122133134134+- No hardcoded secrets -- all sensitive config validated at startup
123135- Client secrets stored as SHA-256 hashes
136136+- One-time flash tokens for secret display (never in URLs)
124137- PKCE support (configurable per-client)
125138- Constant-time comparison for all secret verification
139139+- HTML escaping on all server-rendered pages
126140- HMAC-signed CSRF tokens on all dashboard forms
127141- Rate limiting on auth endpoints
142142+- CSP with per-request nonces for inline scripts
128143- WAF-compatible (Cloudflare Managed Ruleset + OWASP)
129144130145## Documentation
+25-6
docs/HOMELAB.md
···12121313```bash
1414git clone https://gitea.cloudforest-basilisk.ts.net/Arcnode.xyz/atauth.git
1515-cd atauth
1515+cd atauth/gateway
1616cp .env.example .env
1717+```
1818+1919+Edit `.env` with your configuration. At minimum, set these required secrets:
17201818-# Generate admin token
1919-echo "ADMIN_TOKEN=$(openssl rand -hex 32)" >> .env
2121+```bash
2222+# Generate and paste each value
2323+openssl rand -hex 32 # for ADMIN_TOKEN
2424+openssl rand -hex 32 # for OIDC_KEY_SECRET
2525+openssl rand -hex 32 # for MFA_ENCRYPTION_KEY (produces 64 hex chars)
2626+```
2727+2828+Also update `OAUTH_CLIENT_ID`, `OAUTH_REDIRECT_URI`, `OIDC_ISSUER`, and `WEBAUTHN_*` to match your domain.
20292121-# Set your public URL
2222-# Edit .env: OAUTH_CLIENT_ID and OAUTH_REDIRECT_URI
3030+Then start:
23313232+```bash
2433docker compose up -d
2534```
2635···178187179188## Updating
180189190190+Using the pre-built image from GHCR:
191191+181192```bash
182182-docker compose pull
193193+docker pull ghcr.io/cache8063/atauth-gateway:latest
194194+docker compose up -d
195195+```
196196+197197+Or if building locally:
198198+199199+```bash
200200+git pull
201201+docker compose build
183202docker compose up -d
184203```
185204