I got tired of writing the same scripts for every client server.
Every new Laravel deployment meant the same setup: monitoring,
backups, health checks, deployment automation. Hours of work
that should take minutes.
So I packaged 14 production ready scripts into a vault I now
drop onto every server in under 20 minutes.
Here's every script, what it does, and why it exists.
The Setup
Every script shares a single notification library notify.sh.
Configure it once with your Slack webhook, Discord webhook,
or email address. Every script calls it automatically.
No manual editing across 14 files.
Run setup.sh once an interactive wizard asks which channel
you want, tests the connection live, and configures everything.
1. selfheal.sh: Auto-restarts crashed processes
Queue worker dies or gets stuck at 3am. PHP-FPM stops responding.
MySQL crashes under load.
Without this script: your client calls you at 7am asking
why the site is down.
With this script: it restarts automatically and sends a Slack
alert before anyone notices.
Checks nginx, php-fpm, mysql, and Laravel queue workers
every 5 minutes via cron. Restarts anything that's down.
Logs every incident.
2. health-report.sh: Daily server digest
Every morning at 8am, Slack receives:
- CPU usage
- RAM usage
- Disk usage per mount point
- SSL expiry countdown
- Pending security updates
No dashboard. No monthly fee. One cron job.
3. deploy.sh: Zero downtime Laravel deployments
One command runs the full deployment sequence:
git pull → composer install → migrate → config cache →
route cache → view cache → restart workers → Slack notification.
On failure: sends a rollback alert with the exact error.
Never find out about a broken deployment from a client again.
4. db-backup.sh: MySQL backups with S3 upload
Compressed, timestamped dumps on a cron schedule.
Slack notification on success. Email alert on failure.
Optional S3 upload via AWS CLI for offsite storage.
Runs nightly at 2am. Retention policy built in —
keeps last 7 days locally, 30 days on S3.
5. vapt-check.sh: Security pre audit in one command
Checks for the most common Laravel security misconfigurations:
- .env file publicly exposed
- Debug mode enabled on production
- Missing X-Frame-Options header
- Missing HSTS header
- SSL certificate expiry
- Open ports that shouldn't be open
Run this before every pentest engagement.
Saves hours of manual checking.
6. ssl-check.sh: SSL expiry alerts across multiple domains
Pass a list of domains. Get a Slack alert 30 days before
any certificate expires.
Supports unlimited domains in a single config file.
Never get caught with an expired SSL again.
7. mysql-health-check.sh: Database performance monitor
Checks:
- Slow query count vs threshold
- Open connections vs max connections percentage
- InnoDB buffer pool hit rate
- Replication lag (if applicable)
Alerts only when thresholds are breached.
Silent when everything is healthy.
8. pm2-monitor.sh: Node.js / PM2 process watchdog
Checks all PM2 processes on a schedule. Restarts any that
are stopped or in error state. Sends a Slack alert with
exactly which process was affected and when.
9. wordpress-cleanup.sh: WP maintenance automation
Deletes spam comments, clears transients, optimises database
tables, removes unused post revisions.
Runs weekly via cron. Keeps WordPress installs fast
without needing a plugin to do it.
10. pr-summary.sh: AI-generated GitHub PR summaries
Fetches open PRs from your GitHub repo. Sends each diff
to Claude API. Posts a plain-English summary to Slack.
Your team knows what's in review without reading the diff.
Useful for async teams across timezones.
11. standup-collector.sh: Automatic standup from Slack history
Pulls each team member's Slack messages from the last 24 hours.
Formats them into a standup digest. Posts to your #standup
channel automatically at 9am.
No standup meeting. No manual updates. Just the digest.
12. ngrok-tunnel.sh: Instant secure tunnel with Slack notification
Starts an ngrok tunnel, captures the public URL,
and posts it to Slack automatically.
No more copying URLs manually when sharing local
environments with clients.
13. log-rotate.sh: Custom log rotation with archiving
Rotates Laravel logs, Nginx access logs, and MySQL slow
query logs on a schedule.
Compresses archives older than 7 days. Sends an alert on
any log file exceeding 500MB before it kills your disk.
14. server-setup.sh: Full production server bootstrap
The one that ties everything together.
Run this on a fresh Ubuntu 22.04 VPS and get:
- Nginx
- PHP 8.2
- MySQL 8
- Composer
- Node.js + PM2
- UFW firewall rules
- fail2ban
- Swap space configured
- All 13 scripts above installed and cron scheduled
One command. 15 minutes. Production-ready server.
Who This Is For
- Laravel developers managing client servers solo
- Sysadmins who want Slack or Discord alerts without paying $20–200/mo for monitoring SaaS tools
- Freelancers maintaining multiple servers who need a repeatable setup
- DevOps engineers who want production-grade scripts without writing them from scratch
Who This Is NOT For
- Developers on managed hosting (Forge, Vapor, Heroku) — you don't need this
- Teams with dedicated DevOps engineers already running full monitoring stacks
- Beginners not yet comfortable with SSH and crontab
Setup
All 14 scripts ship with a single setup.sh wizard.
Run it on any Ubuntu 18.04–24.04 or above server. It asks which
notification channel you want, tests the webhook live,
configures everything, and installs all crontab entries.
Total setup time: under 20 minutes.
If you want all 14 scripts packaged and ready to deploy:
👉 WealthQubit DevOps Vault — $49, one time
No subscription. No SaaS. Scripts you own forever.
Top comments (0)