Take the server your AI agent runs on off the public internet: put it behind Tailscale or a Cloudflare Tunnel so only you can reach it: AI agent prompt
Lots of people now run AI agents around the clock on a rented server (a VPS). On Oct 23, 2026, as reports of hacks spread, Pieter Levels (@levelsio) reposted his advice to get any VPS off the public internet and into a Tailscale network and Cloudflare Tunnel, noting that SSH key login alone doesn't protect you from exploits and vulnerabilities; the post drew hundreds of thousands of views and thousands of bookmarks. This prompt has an AI walk you through it step by step, checking each step before you close the old door so you don't lock yourself out.
SecurityAgent server lockdownintermediateThe prompt
I run an AI agent (or other apps) on a rented Linux server: [provider, e.g. Hetzner/DigitalOcean], [OS, e.g. Ubuntu 24.04]. Right now I reach it by [SSH on a public IP / a public web address]. Services on it: [list, e.g. agent dashboard on port 3000, n8n on 5678]. Help me take it off the public internet using Tailscale for my own access and, only if something must stay public, a Cloudflare Tunnel. Give me one step at a time with the exact command, what I should see if it worked, and wait for me to confirm before the next step. Order it so I can't lock myself out: install and test Tailscale access first, then close public ports in the firewall last, and tell me how to get back in through my provider's web console if something goes wrong. Finish with a short checklist to confirm nothing is still reachable from the public internet. Don't ask me for passwords or keys; tell me where to enter them myself.
How to use it
- Copy the prompt above.
- Replace every [bracket] with your own details (or fill in the blanks on AgentPlaybook Real Estate, which remembers your answers for the next prompt).
- Paste it into Tailscale, Cloudflare Tunnel, ChatGPT and review the answer before you use it.
Works with: Tailscale, Cloudflare Tunnel, ChatGPT, Claude
Real-world example: x.com/levelsio/status/2113587042185576853
Featured in: AI prompts for writing SOPs, reports, policies and checklists
Before you use it: what to check
Already built into this prompt
- Don't ask me for passwords or keys; tell me where to enter them myself.
- Give me one step at a time with the exact command, what I should see if it worked, and wait for me to confirm before the next step.
- Finish with a short checklist to confirm nothing is still reachable from the public internet.
Check yourself
- Read and edit the draft before it reaches a customer or goes public. If you later automate this prompt, start with "draft and notify me", not "send automatically".
- Check names, dates, numbers and any claim against your own source material before you use the answer. AI can misread or invent details.
Using an AI agent? Download this prompt as a SKILL.md agent skill with these checks built in, or get the .zip for Claude.ai. How to install skills.
Want to make this prompt even better? Grade it with the free prompt grader or build your own with the AI prompt generator.
32 copy-paste agent prompts (PDF) plus 5 new prompts every week.
Get it free