Configuration Overview
GZCTF uses a hybrid configuration system:Database Config
Settings stored in database (editable via admin UI):
- Platform appearance
- Account policies
- Container policies
File Config
Settings in
appsettings.json (requires restart):- Email/SMTP
- Storage backends
- Container provider
- Telemetry
Configuration changes via API/UI are applied immediately. Changes to
appsettings.json require service restart.Global Settings
Access: Admin Panel → Settings → Global ConfigPlatform Branding
Platform name prefix (e.g., “GZ” → “GZ::CTF”)
Tagline displayed on homepage
Meta description for SEO
Footer text (supports Markdown). Add links to social media, terms of service, etc.
Logo and Favicon
Customize platform visuals:Image Requirements
- Maximum size: 3 MB
- Recommended: PNG with transparency
- Logo scaled to 640px width
- Favicon scaled to 256×256px
Theme Customization
CSS hex color for primary theme color (e.g.,
#3B82F6 for blue)Account Policy
Control user registration and authentication.Enable public user registration
Automatically activate accounts after registration (no email verification)
Require email verification for:
- New registrations
- Email address changes
- Password resets
Enable CAPTCHA on registration and login forms
Comma-separated list of allowed email domains. Empty = allow all.Example:
university.edu,student.eduContainer Policy
Manage container resource allocation.Automatically destroy oldest container when team reaches limit
Maximum exercise (non-game) containers per user
Default container lifetime in minutes (range: 1-7200)
Additional minutes added when container is extended (range: 1-7200)
Minutes before expiry when extension is allowed (range: 1-360)
Email Configuration
Configure SMTP for email notifications.Email settings are in
appsettings.json and require service restart.SMTP Setup
Editappsettings.json:
Skip SSL certificate validation (use only for testing with self-signed certs)
Storage Configuration
GZCTF supports multiple storage backends for files and attachments.Local Storage (Default)
Store files on server filesystem:Local storage path must be writable by the GZCTF process. Use Docker volume for persistence.
Object Storage (S3-Compatible)
Use S3, MinIO, or compatible services:Container Provider
Configure Docker or Kubernetes for challenge containers.Docker Provider
Public hostname/IP where containers are accessible
Default: Map to host ports (requires open port range)PlatformProxy: Proxy via WebSocket (no open ports needed)
Kubernetes Provider
Network policies for container egress
Custom DNS servers for containers
Container Registry
Configure authentication for private registries:Registry credentials are used to pull private container images for challenges.
Captcha Configuration
Protect against bots with CAPTCHA.Cloudflare Turnstile
Get Turnstile Keys
Visit Cloudflare Turnstile to create site
Hash Proof-of-Work
Alternative CAPTCHA using client-side computation:Number of leading zero bits (range: 8-48). Higher = harder to solve.
Security Settings
API Encryption
Enable asymmetric encryption for sensitive API requests (flag submissions)
When enabled, client encrypts requests with server’s public key. Prevents flag interception via network sniffing.
Telemetry and Monitoring
Configure observability for production monitoring.Prometheus Metrics
/metrics
OpenTelemetry
Grafana Loki Logging
Forwarded Headers
Configure when behind reverse proxy:Configuration API
Manage settings programmatically:GET /api/admin/config
GET /api/admin/config
Retrieve current configuration:
PUT /api/admin/config
PUT /api/admin/config
Update configuration:Changes apply immediately (no restart needed).
Environment Variables
Override config with environment variables:Use double underscores (
__) to represent nested JSON structure.Best Practices
Secure Secrets
- Use environment variables for passwords
- Never commit credentials to git
- Rotate secrets regularly
Test Changes
- Test SMTP before enabling email verification
- Verify storage backend is accessible
- Check container provider connectivity
Monitor Resources
- Enable telemetry in production
- Set up alerts for errors
- Track container resource usage
Backup Configuration
- Export database config regularly
- Keep appsettings.json in version control (without secrets)
- Document custom changes
Troubleshooting
Configuration changes not applying
Configuration changes not applying
- Database changes: Apply immediately (verify in UI)
- File changes: Require service restart
- Clear browser cache after logo/theme changes
Email not sending
Email not sending
Check:
- SMTP credentials are correct
- Port is not blocked by firewall
EmailConfirmationRequiredmatches SMTP config- Test with telnet:
telnet smtp.host.com 587
Containers not starting
Containers not starting
Verify:
- Container provider is running
- Network is accessible
- Registry credentials (if private images)
- Resource limits are reasonable
Storage errors
Storage errors
Confirm:
- Storage path/bucket exists
- Credentials are valid
- Network connectivity to storage backend
- Sufficient permissions
Next Steps
Creating Games
Start creating your first CTF
Monitoring
Set up competition monitoring