Security hardening
Accounts & logins
Security hardening
A practical hardening checklist for running a production VulaSocial node.
Basics (do these first)
-
APP_ENV=production,APP_DEBUG=false - Strong
APP_KEY(php artisan key:generate) - HTTPS everywhere (Let's Encrypt / AutoSSL), HTTP → HTTPS redirect
- Strong MySQL credentials, dedicated DB user (least privilege)
- Strong admin password + 2FA
- Regular backups (see Backups)
Shared-hosting specifics
- Use the secure app-root
.htaccess(deploy/shared-hosting-webroot.htaccess) so.env,app/,vendor/,storage/are not web-accessible. Verifyhttps://your-node/.envreturns 403/406. - Set
SESSION_SECURE_COOKIE=true,SESSION_ENCRYPT=true - Keep
storage/+bootstrap/cache/writable by the web user only - Confirm the host's WAF (ModSecurity) is on
Auth & accounts
- Enable 2FA on admin accounts (and encourage members)
- Consider Passkeys (spatie/laravel-passkeys is installed)
- Set
BCRYPT_ROUNDS=12(default) - Choose a registration mode:
approvalfor private nodes (see Registration modes) - Review Roles: only the people who need
super_adminhave it
Bot protection & links
- Enable ALTCHA on guest forms (Settings → Bot Protection → Generate secret → Enable)
- Enable Spamhaus + URLhaus + local heuristics (Settings → Link Safety)
- Maintain a blocked-domains list in moderation
Federation
-
FEDERATION_PUBLIC_BASE_URLis your real domain (never localhost/IP) - If using FediFuel: secrets are encrypted in settings; rotate on suspicion
- Monitor the dashboard's Fediverse activity chart for anomalies
Media
- Cloud buckets are public-read but objects use long random keys
- Uploads restricted by type/size (admin panel + app rules)
- Reject SVG uploads in user media (XSS) — the app excludes them by default
Network / hosting
- Fail2ban or host firewall for SSH; use key auth, disable password login
- cPanel: whitelist only the IPs that need to touch the server
- Keep PHP + the web server patched (host responsibility on shared hosting)
Auditing
-
storage/logs/laravel.logreviewed forproduction.ERROR/CRITICAL -
php artisan security:check-style audit (runcomposer audit) on deploys - Scheduled backup notifications reach a mailbox you actually read
Secrets hygiene
- Never commit
.env(it's gitignored). - Rotate any credential that may have leaked (API keys, mail, DB, SSH).
- Store node credentials in the local
.credentials.txt(gitignored) and never back it up to cloud/rsync.
Related
Still stuck? Contact the node administrator.