Production Setup
This guide is for bare metal / a VM after you have completed Installation (app key,.env, migrations, Passport keys, seed, frontend build).
Prefer containers? Use compose.prod.yaml — it already runs Horizon, Reverb, and the scheduler for you.
Before you continue
Confirm the install checklist is done:-
APP_KEYset - Database migrated
-
QUEUE_CONNECTION=redisand Redis reachable - Passport keys present (
PASSPORT_*env for Docker prod, orphp artisan passport:keyson bare metal) -
php artisan db:seed+UserSeederran -
storage:linkran ifFILESYSTEM_DISK=public -
npm run buildcompleted
Environment (production values)
Optimizations
Run these commands after deployment:Queue Worker
TryPost uses queues for critical background processing:- Publishing posts to social platforms at scheduled times
- Sending notifications (email and in-app)
- Verifying social account connections
- Processing analytics events
- Running automations
Install Supervisor
Configure Supervisor
Create/etc/supervisor/conf.d/trypost-worker.conf:
Nginx Configuration
Example Nginx configuration:Both
/app/ (browser WebSocket) and /apps/ (Pusher HTTP API) must be proxied to Reverb. Omitting /apps/ causes flaky real-time updates.SSL Certificate
Use Let’s Encrypt for free SSL:Scheduled Tasks (Cron)
TryPost uses Laravel’s task scheduler for several recurring jobs. The scheduler must run every minute or scheduled posts won’t publish, automations won’t fire, expiring tokens won’t refresh, and stuck posts won’t recover.
Add the Laravel scheduler to cron:
WebSocket Server (Reverb)
TryPost uses Laravel Reverb for real-time updates in the dashboard (live post status changes, notifications). Add a Supervisor config to keep it running: Create/etc/supervisor/conf.d/trypost-reverb.conf:
/app/ and /apps/ through Nginx as shown above.
File Permissions
Set correct permissions:storage/oauth-private.key readable only by the app user (typically mode 600).
Checklist
Make sure all of these are in place in production:Monitoring
Consider setting up monitoring for:- Server health (CPU, memory, disk)
- Application errors (Laravel logs in
storage/logs/) - Queue status (Horizon dashboard at
/horizon) - WebSocket connections (Reverb logs in
storage/logs/reverb.log)
Backups
Regularly backup:- Database
.envfile- Passport keys (
storage/oauth-*.keyorPASSPORT_*env) — losing them invalidates API keys and MCP OAuth grants - Uploaded media (if using local storage)

