Phase 0 - Foundation and Governance
Short, execution-ready checklist for infrastructure and governance setup.
Module 0.1 - Server, OS and Access Control
- Provision Ubuntu 22.04, Nginx, PHP 8.2, and MariaDB 10.6.
- Harden OS: disable root SSH, enable UFW, install fail2ban.
- Access control: SSH keys only, sudo for admins, staff groups.
- SSL: Certbot and HTTPS redirects.
- Backups: /var/backups/janu with 700 permissions.
- Monitoring: Prometheus exporters and Grafana dashboards.
- Log rotation: Nginx, PHP, and MySQL logrotate.
- Cron jobs: daily backup, weekly updates, health checks.
- Environment variables for DB and API keys.
- File permissions: 755 dirs, 644 files, no world-writable.
- Enable SELinux or AppArmor profiles.
- Kernel tuning with sysctl (swappiness, file limits).
- Unattended security updates enabled.
- Disk quotas for users and branches.
- Network config: static IP and DNS resolution.
- Time sync with NTP.
- Swap file around 2GB.
- User management scripts for add/remove.
- Auto-restart policies for services.
- Auditd for system log trails.
- Firewall rules allow 80, 443, SSH from trusted IPs.
- Intrusion detection (Snort or OSSEC).
- Nginx upstream load balancer prep.
- CDN integration for static assets.
- Phase 0 sign-off checklist.
Module 0.2 - Directory and Permission Discipline
- Standard structure: /var/www/janu, /var/lib/janu, /opt/janu.
- Ownership: www-data for web, janu for data.
- Permissions: 755 for dirs, 644 for files.
- Isolation per module directory.
- Access logs for key directories.
- Backup scripts with rsync offsite.
- Disk encryption (LUKS) where needed.
- Quotas per directory.
- Symlink policy with safe targets only.
- Chroot isolation for FTP users.
- SELinux contexts for key paths.
- Audit trails for file changes.
- Restore and recovery routines.
- Safe directory migrations.
- Compliance directory labeling (HIPAA, GDPR).
- Disk usage monitoring and alerts.
- Cleanup jobs for temp files.
- Version control for configs.
- Directory snapshot rollback plan.
- Malware scans (ClamAV).
- ACLs for fine-grain access.
- Encryption at rest for sensitive data.
- Replication and sync across servers.
- Archive and compress old data.
- Module lock and approval.