Laravel Cloud and Vapor
OpenHR PH is a standard Laravel 13 application, so it can run on managed Laravel hosting. The main differences from the AWS AMI stack are the Go payroll binary, long-running queue jobs, and WebSockets.
This project is not affiliated with Laravel Cloud. Confirm current runtime support, pricing, and limits before committing to a provider.
Before you start
- Rotate any credentials that were previously committed. See the open-source release checklist.
- Decide how payroll will run. The Go engine is a local binary; managed PHP runtimes usually need a build step that compiles and ships
bin/payroll-engine. - Decide how media is stored. Use S3 or another shared disk, not ephemeral local storage.
- Confirm the runtime provides the PHP extensions in
composer.jsonandREADME.md(bcmath,gd,intl,pdo_mysql,zip, etc.).
Laravel Cloud
-
Create an application and connect the repository.
-
Add a MySQL database and a cache/queue service.
-
Set the environment variables from
.env.example, using production values. -
Add a build command that installs dependencies and builds assets:
composer install --no-dev --prefer-dist --no-interaction --optimize-autoloadernpm ci && npm run buildmake -C payroll-engine build -
Add a deploy command:
php artisan migrate --force && php artisan config:cache && php artisan view:cache -
Add a queue worker and the scheduler:
php artisan queue:work --sleep=3 --tries=3 --timeout=600php artisan schedule:work -
Deploy and check
/up. -
Configure the installation sector and country:
php artisan openhr:install --sector=Private --country=PH --no-interactionUse
--sector=Governmentfor public-sector installations. -
Create the first owner:
php artisan admin:create -
Configure a custom domain and HTTPS.
-
Seed the system-wide catalogues and import the statutory tables, wage orders, and the 2026 holiday calendar:
php artisan db:seed --class='Database\Seeders\ReferenceDataSeeder' --forcephp artisan payroll:statutory:import --country=PHphp artisan payroll:wage-orders:importphp artisan payroll:holidays:importThe imports are idempotent and can be added to the deploy command. Skip
payroll:wage-orders:importfor a Government installation: government compensation follows the DBM salary schedule.payroll:holidays:importis company-scoped, so run it after the first company exists.
Hosted demo
The public demo runs the same application with self-service sign-up enabled:
| Variable | Value |
|---|---|
DEMO_MODE | true |
DEMO_URL | https://openhrph.laravel.cloud |
AUTH_VERIFICATION_EXPIRE | Minutes a verification link stays valid (default 60) |
DEMO_REGISTRATIONS_PER_HOUR | Accounts one IP address may create per hour (default 5) |
Visitors open /register, receive a verification email, and only reach /app after selecting the
link. Each sign-up creates its own company with sample employees, timesheets, and an open payroll,
so demo accounts never share data.
Before publishing a demo environment:
- Configure a working mail provider (SES, Postmark, Resend, or SMTP). The verification email is the only way in.
- Keep the queue worker running; the application already relies on queued mail and jobs elsewhere.
- Set
TRUSTED_PROXIES=*when Cloudflare or a load balancer fronts the app, so registration throttling sees the real client IP. - Leave
DEMO_MODE=falseon any installation that holds real payroll data. With demo mode off,/registerand the verification routes return 404, andadmin:createremains the only way in.
Demo companies are not removed automatically. Plan a retention window and delete old demo tenants (for example with a scheduled database task) before the demo grows unattended.
Vapor
The repository includes a starter vapor.yml, but it targets an older PHP runtime. Before using Vapor:
- Update the runtime to a PHP version supported by Laravel 13 and the provider.
- Add a build step for
make -C payroll-engine build. - Account for Lambda time limits. Payroll runs above the inline threshold are queued; make sure the queue worker timeout fits the platform.
- Provide a VPC connection if the database is private.
- Store media in S3.
- Use a persistent cache/session store.
- Configure WebSockets separately if you enable Reverb.
Vapor's Lambda model does not keep a long-running local filesystem or a single scheduler process, so verify every operational assumption before production.
Managed hosting checklist
- PHP 8.3+ and required extensions
- MySQL 8
- HTTPS and secure cookies
-
APP_ENV=production,APP_DEBUG=false -
APP_KEYset from a secret manager - Queue worker and scheduler running
-
bin/payroll-enginebuilt and executable, orPAYROLL_ENGINE_DRIVER=phpexplicitly accepted - S3 or shared storage for uploads
- Statutory tables imported
- First admin created with
admin:create - Database backups and restore tested
- Logs and error reporting configured without personal data
- Domain, DNS, and certificate verified
-
/upmonitored