The VPS and app security checklist is a free, read-only MCP server that gives Claude Code, Cursor or any AI coding app a hardening checklist built from real breaches. Connect it, and your AI can audit your server and codebase against the checklist and fix the gaps.
It is for anyone running an app on a virtual private server (VPS) and building with AI coding tools. There is no sign-in, no API key and nothing to install: you paste one URL into your AI app. This post explains what is inside, how we built it, and the fixes it puts first.
The library has 33 notes. Four cover the server itself: how servers actually got hacked, the Docker and firewall fixes, getting secrets off the box, and Tailscale versus Cloudflare Tunnel, with their sources. Nine checklists cover the app on top of it:
- Free trial and API abuse
- Database security
- Bad packages and supply chain
- AI agent and MCP risks
- Backups and recovery
- Monitoring and alerts
- Login and auth
- Payments and Stripe
- Safe deployments and rollbacks
Each topic has a Sources note listing the videos and threads behind it, so your AI can cite where a fix came from. Once it is connected, you can ask things like:
- "Check my Docker setup against the VPS hardening checklist and fix anything exposed."
- "Go through this codebase with the database security and login checklists and list every gap, worst first."
Paste this URL into Claude, Claude Code, ChatGPT, Cursor or any MCP app:
Connect this MCP to your AI
https://notesupreme.com/p/vps-hardening?token=nsp_6bmDN1j4mZCnQJCfL0rgDA- Claude: Settings → Connectors → Add custom connector → paste the URL.
- ChatGPT: Settings → Connectors → Advanced → Developer mode → Create → paste the URL.
- Cursor: Settings → MCP → Add new MCP server → type
url, paste the URL.
Free and read-only. No sign-in or API key.
Setup steps for each app are in the GitHub repo, and the server is listed on Glama. More MCP posts are under MCP.
The short version
The fixes the checklist puts first are six: block all incoming traffic, bind every Docker port to 127.0.0.1, use SSH keys with password login off, cap and move your API keys, alert from off the server, and keep one backup at another company. The rest of this post shows the incidents behind each one.
How we built this
We built the library in three passes over a few days.
1. Collecting the incidents. We started in Intel Supreme, searching YouTube, Reddit and X for people getting hacked over the last two years, and downloaded hundreds of videos and posts. On the video side, Intel Supreme takes a whole channel or a YouTube search of up to 500 results and pulls each transcript; videos with no captions are transcribed from the audio. On the posts side, it searches Reddit, X and Hacker News together with their top comments, and an AI judge drops the off-topic posts and ranks the rest. DeepSeek V4.1 Flash then processed each transcript and pulled out the information and insights. With all of it stored in the Intel Supreme library's file system, we reviewed everything from the Claude app through the Intel Supreme MCP.
2. Researching each issue. That first pass gave us a list of problems. We then ran about 50 deep-research runs in Claude.ai and the Gemini app, one on each issue found.
3. Writing the solutions. We wrote a solution for each problem. Claude wrote them into a NoteSupreme Ship through its MCP, one folder per topic, each with a Sources note. One click on Publish turned the Ship into a free read-only MCP that anyone can connect. We used the same pipeline for the Claude SEO skills library.
Why it is cheap for your AI to use
Your AI does not read the whole library on every question. Each note carries a type, a one-line description and tags in Google's Open Knowledge Format, so the AI searches first and opens only the notes it needs. In your own NoteSupreme projects, Code Mode goes a step further: the AI writes a few lines of code, a sandbox walks the Ship, and only the answer comes back. In our tests, Code Mode used about 97% fewer tokens than the Notion MCP.
We felt that difference in our own work. Writing specs in Notion through its MCP, we hit the Claude rate limit after about an hour. With NoteSupreme's Code Mode MCP we work in five Claude tabs at once and never hit the limit.
What should a VPS and app security checklist include?
It should close the doors attackers used in real incidents: open database and Docker ports, Docker bypassing the firewall, API keys left on the box, and alerts that fired too late. Start there, then add backups and login alerts.
Most generic checklists start with a list of settings. This one starts with the break-ins and works backwards.
What actually got people hacked
The research note in the Ship opens with the incidents. Five patterns came up again and again:
- An open database. Postgres on a Hetzner server with no firewall was broken into within a week, and the owner got a Bitcoin ransom note.
- An open Docker port. New malware called Carbonato scans for Docker's remote port (2375) and installs an AI agent to take over the box.
- API keys leaking from odd places. One thread collected 10 leak stories, from $2 to $87K. None of them was a pushed .env file. The keys leaked from website code, agent config files, backup plugins, old Google keys that later gained AI access, and hacked consoles.
- A clever proxy setup that silently failed. A whole home network sat public for 2 weeks, because the owner only tested the path that was supposed to work.
- An AI agent rooting a VPS. The X post that started our research: exposed software plus API keys on the box was enough.
The common thread is that nothing exotic happened. Each one was a port that should have been closed or a key that should not have been there.
The VPS and app security checklist, by area
Each group below names the incident pattern behind it, then the fixes the sources agreed on.
Network and firewall
The pattern: a database or admin panel reachable from the internet, found by a scanner within days.
- Block all incoming traffic. Use Tailscale for your own access and Cloudflare Tunnel for anything that must be public. One source calls this the "scorched earth" setup.
- Turn on your host's firewall too (DigitalOcean or Hetzner). It drops traffic before it reaches the server, so nothing on the box can undo it.
- Test from outside. From another machine, check that the things you blocked really fail. The home network that sat open for 2 weeks passed every test its owner ran from the inside.
- Keep the provider's web console as your emergency way back in.
SSH and server access
The pattern: password guessing against SSH, and attackers adding their own keys once they are in.
- SSH keys only, with password login turned off.
- Run fail2ban on SSH and send its alerts to Telegram or Discord.
- Get a phone alert on every successful SSH login and every sudo, through a small script and ntfy or Telegram. You know when you logged in, so any other message is the alarm.
- Alert on changes that should never happen: changed SSH keys, new admin users, edits to /etc/passwd or sudoers (auditd or AIDE on Linux).
- If you reach the server through Tailscale, turn off key expiry for the server. Otherwise you get locked out after 180 days.
Docker
The pattern: Docker ports that are open to the whole internet even when the firewall says they are closed.
On camera, one creator set UFW to deny everything and the n8n port was still reachable from another computer. Docker routes traffic before UFW gets to check it. A database published as -p 5432:5432 skips UFW the same way, and a Firecrawl self-host guide shipped a Postgres container with the password postgres/postgres that a botnet hit right away.
The fix is one change in every compose file. Write each port with 127.0.0.1 in front, so only the server itself can reach it:
ports:
- "127.0.0.1:5432:5432"Then the tunnel or Tailscale is the only way in. Check what is really listening with ss -tulpn, and don't trust ufw status on its own on a Docker server. Some people go further with rootless Docker, which stops Docker touching the firewall at all. It takes about 30 minutes and a few apps break.
Replace every default password too. In one scan, 1,182 of 20,656 AI-made apps used the exact string "supersecretkey". openssl rand -hex 32 gives you a random one.
Secrets and API keys
The pattern: keys that leak from somewhere other than git, and bills that run for hours before anyone looks.
- The top comment in one r/devops thread put it best: the safest key is the one that never exists. Use short-lived logins wherever the tool supports them.
- For keys you can't avoid, use a secrets manager. Infisical is free and can be self-hosted. Each server gets its own read-only login, and keys load into memory when the app starts instead of sitting in a file. Keep Infisical itself behind Tailscale, so a leaked login has nothing to reach.
- A simpler middle option is sops with age: the .env file stays encrypted and is only decrypted on the server right before startup.
- Put a hard spending cap on every API key. Alerts are not enough. The team behind the $87K leak had an alert, and it fired at $550.
- Revoke a leaked key. Deleting it from a file does not un-leak it, and git history keeps it. Delete keys you don't use.
Updates and packages
The pattern: a poisoned package version that steals every key on the machine before anyone notices.
The supply chain checklist counts 454,600+ new malicious packages in 2025, and most of the big attacks were pulled within 40 minutes to 7 hours. That is why the cheapest fix is to wait. Holding off 3 to 7 days before installing a new version is estimated to cut exposure by 80 to 90%.
- Upgrade your package manager. npm 12+, pnpm 11+ and Yarn 4.14+ block install scripts by default. On older npm, set
ignore-scripts=true. - Set a minimum release age, and watch the units. "7" means 7 days in npm, 7 minutes in pnpm and 7 seconds in Bun. For 3 days, npm takes
NPM_CONFIG_MIN_RELEASE_AGE=3and pnpm takesminimumReleaseAge: 4320. - Commit your lockfile and use clean installs on the server:
npm ciorpnpm install --frozen-lockfile. - Don't trust a "signed" badge on its own. In May 2026, 84 poisoned TanStack versions shipped with valid provenance.
Monitoring and alerts
The pattern: people find out from an invoice or a customer, days later.
The monitoring checklist cites IBM's 2026 figure of 247 days on average to find and stop a breach. Billing alerts lag too: Google Cloud cost data can run 4 to 48 hours behind, and one $87,000 spike was 5 hours old when its budget alert fired.
- Send logs off the server. Attackers clean local logs first.
- Watch outbound traffic, CPU and new processes. A hacked server usually gives itself away by talking out, and 100% CPU for hours is often a crypto miner.
- Run uptime checks from a different server. A monitor on the same box dies with it.
- Add a dead man's switch for backups and cron jobs: each job pings a URL when it finishes, and no ping means an alert. Healthchecks.io gives you 20 checks free.
- Check your open ports on a schedule, so a database never ends up public by accident.
- Only alert on things you will act on, and send the urgent ones to your phone, not to email.
Backups
The pattern: backups that sat on the same volume, account or company as the thing they protected.
In April 2026, an AI agent deleted a startup's database and its backups in 9 seconds, because the backups lived on the same volume. Another owner found his off-site job had failed 11 of its last 25 runs: it lost its SSH keys after every reboot, and his manual tests passed only because his own terminal had the keys.
The Ship's rule is 3-2-1-1-0: 3 copies, 2 backup methods, 1 copy at a different company with a different login and bill, 1 copy that can't be deleted even with a stolen key, and 0 errors on a restore test that runs automatically. Hetzner Cloud and DigitalOcean Droplets back up nothing by default, and their paid backups are deleted along with the server. Dump databases with their own tools (pg_dump), start backup scripts with set -euo pipefail, and alert when a backup does not check in.
AI agents on the server
The pattern: an agent with production access that "fixes" an error by deleting things.
The AI agent checklist uses Simon Willison's lethal trifecta: an agent is dangerous when it has private data, reads untrusted content, and has a way to send data out. Remove any one of the three and the theft path breaks.
- Never point an agent at production, and keep production keys out of its terminal.
- Turn on deletion protection for databases and volumes, and keep backups in an account the agent can't reach.
- Bind local MCP servers to 127.0.0.1. One scan found 1,467 MCP servers open on the internet with no login.
- Keep
.claude/settings.local.jsonand.env*in .gitignore. A November 2026 scan found 31,088 secrets on GitHub that came from that one Claude Code settings file.
The Ship goes deeper on all of this in its nine app security checklists, from database rules to Stripe webhooks. More posts on these live under security.
Does UFW protect Docker containers?
No. Docker routes traffic to published ports before UFW checks it, so a container port can be open to the internet while ufw status says it is blocked. Bind each port to 127.0.0.1 in your compose file, and turn on your host's firewall as a second layer.
Should you use Tailscale or Cloudflare Tunnel?
Use Tailscale if you only need private access for yourself, and Cloudflare Tunnel with Access if you need public pages or your own app calling your server. Many people run both.
The catch with Tailscale is the license. Its free Personal plan covers up to 6 users and unlimited devices, but only for non-commercial use, and business use costs about $8 per user per month. Cloudflare Tunnel is free, and Cloudflare Access is free for up to 50 users with business use allowed. Access can also give you SSH in the browser. The tradeoffs on the Cloudflare side are that Cloudflare sees your traffic and the free plan limits uploads to about 100MB per request.
Can an AI agent pentest my own server?
It can help, but check what it tells you. In one test, a cheap AI agent reported 5 "critical" holes on a server and all 5 were false. A better agent found nothing. Treat its report as a list of things to verify, then confirm each one by testing from outside.
Are budget alerts enough to stop a runaway API bill?
No. On most clouds a budget alert only sends an email, and the billing data behind it can be hours late, so spending keeps going. Set hard caps or prepaid credits on every AI and cloud account. For AI apps, put a gateway in front with per-user and per-key daily budgets that reject requests before they are sent.
Where to start tonight
If you only have an hour, do the three things the incidents punish most. Close every inbound port and put your own access behind Tailscale or a tunnel. Rewrite every Docker port as 127.0.0.1. Put a hard cap on every API key and revoke the ones you don't use. Then connect the Ship to your AI and work through the rest one area at a time.