r/PHP • u/Disastrous-Ebb-7863 • 11h ago
New dev building a Laravel + Postgres Attendance & Payroll system — need advice on deployment with strict company control
Hey everyone,
I recently joined a new company as a developer, and I’m building our internal Attendance and Payroll system using Laravel and PostgreSQL.
Development is going well, but I’m relatively new to deploying Laravel apps in production. I need some guidance on choosing the right hosting and database setup based on my company's requirements:
App Scope & Needs:
- Core Features: Employee attendance tracking, HR management, and monthly payroll calculation/generation (PDFs, background processing).
- Database: Currently using PostgreSQL in local development and plan to stick with it.
- Company Requirement: Management wants full control over the system, server, and employee data (so no fully managed black-box cloud PaaS where we don't control the underlying infrastructure/server location).
Questions I have for the community:
- Hosting: Given the need for complete control over the infrastructure, should I spin up a self-hosted VPS (e.g., DigitalOcean, Hetzner, AWS EC2) using Laravel Forge or Coolify, or setup a bare-metal LEMP stack manually?
- Database Setup: Is running Postgres on the same VPS fine for a small-to-medium internal company tool, or should I decouple it onto its own dedicated instance/managed DB from day one?
- Queue & Scheduler: Since payroll will generate PDFs and queue emails, what’s the best low-maintenance way to handle Laravel queue workers (Supervisor/Redis) and the scheduler in a production environment with complete server access?
- Data Protection: What are the non-negotiables for securing sensitive financial and employee payroll data on a self-hosted server?
Would love to hear how you'd structure this setup! Any tips, common pitfalls, or architectural recommendations are greatly appreciated. Thanks!