Production Checklist
Security and performance best practices for production.
Production Checklist
Essential steps before deploying LogStack to production.
Security Checklist
Authentication & Secrets
-
Generate unique JWT secret
-
Generate unique NextAuth secret
-
Use strong database passwords — Minimum 20 characters, mixed case, numbers, symbols
-
Never commit secrets — Use
.envfiles or secret managers
Default secrets in .env.example are for development only. Always generate
unique secrets for production.
Network Security
-
Enable HTTPS/TLS — Use valid SSL certificates (Let's Encrypt is free)
-
Restrict ALLOWED_ORIGINS — Set to your specific domain(s), never use
*in production -
Configure firewall — Only expose ports 80 and 443
-
Database not publicly accessible — Keep PostgreSQL and Redis on private network
Rate Limiting
-
Enable rate limiting
-
Configure per-endpoint limits — Stricter limits for auth endpoints
Performance Checklist
Database
-
Enable connection pooling
-
Create indexes — Ensure migrations have run with all indexes
-
Configure log retention — Archive or delete old logs to manage storage
Redis
-
Set memory limits
-
Configure eviction policy —
allkeys-lrufor caching
Application
-
Enable JSON logging
-
Configure appropriate timeouts
-
Enable gzip compression — Configure in nginx
Monitoring Checklist
Health Checks
-
Monitor health endpoints
-
Set up uptime monitoring — Use services like UptimeRobot, Pingdom, or Healthchecks.io
Logging & Alerts
-
Configure log aggregation — Forward logs to your logging platform
-
Set up error alerting — Get notified on critical errors
-
Monitor disk space — Alert before storage fills up
Backup Checklist
Database Backups
-
Enable automated backups
-
Test backup restoration — Regularly verify backups work
-
Offsite backup storage — Store backups in a different location (S3, GCS)
Backup Retention
| Type | Retention |
|---|---|
| Daily | 7 days |
| Weekly | 4 weeks |
| Monthly | 12 months |
Deployment Checklist
Before Deploy
- Run all tests
- Review environment variables
- Check SSL certificate validity
- Verify database migrations
During Deploy
- Use rolling deployments
- Monitor error rates
- Watch for increased latency
After Deploy
- Verify health endpoints
- Check key functionality
- Monitor logs for errors
Environment Variables Reference
Security Hardening
Additional Nginx Headers
Regular Updates
Schedule regular security updates and monitor for CVEs in your dependencies.