Security
Making an app and its server safe for real users: secrets, database access rules, SSH, firewalls, updates and backups.
Making an app and its server safe for real users: secrets, database access rules, SSH, firewalls, updates and backups.
Ubuntu Server installs security updates by itself every day. How to check that yours really does, what it installs and what it doesn't, when to reboot, and how to change the time, all tested on Ubuntu 24.04.
A port published with Docker answers from the internet even when ufw denies it. We reproduced it on Ubuntu 24.04 with Docker 29 and tested the fixes Docker documents: 127.0.0.1, the provider's firewall and DOCKER-USER.
An ordered checklist for a fresh Ubuntu 24.04 VPS that runs a production app: SSH keys, firewalls Docker can't bypass, fail2ban, updates, Docker, secrets, backups and monitoring. Tested on 24.04.
The monitoring a single production server needs: an uptime check from outside, disk and memory alerts to your phone, logs that don't fill the disk, and a heartbeat for your backups. Free options, and a tested script.
Scan a repository's full history for leaked keys with gitleaks and TruffleHog in Docker, add a pre-commit hook, know what GitHub's secret scanning covers, and clean up after a leak: rotate first, then rewrite history.
Key-only logins, a hardened sshd_config.d file, the Ubuntu 24.04 socket-activation trap when you change the port, and fail2ban, each step tested on Ubuntu 24.04.
What to back up on a single-server app, how to send an encrypted copy off the server with pg_dump and restic, what the provider's backups add, and the restore drill that proves it works. Every command tested.
Why the Supabase anon (publishable) key may sit in your frontend, what Row Level Security does, the SQL to switch it on and check every table, and the secret key that must never reach a browser.
An ordered checklist for taking an app built with Lovable, Bolt, Replit, v0, Cursor or Claude Code to production: secrets, database access, configuration, dependencies, the server, backups and monitoring.
Run npx opscrew init in your app's repository. It checks your tools and tokens first, for free.