setup-server
Skill1 starsChanged 25 days agoMITView on GitHub
Guides the user through preparing a fresh Ubuntu VPS to host AI Tutor (Docker, a deploy user, firewall, Caddy with HTTPS, read-only deploy key, first account, GitHub Actions secrets) by following deploy/setup-server.md, and verifies the result. Use when the user wants to host AI Tutor on their own server for the first time, or to rebuild or audit an existing server.
- Reads credentials
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 53
Never publish the app port without an address (8000:8000).
- Distinctive: line 54
Never give the server's deploy key write access to the repository.
- Very specific: line 55
Never turn on REGISTRATION=open or COOKIE_SECURE=false on a public server unless the user asks for it and understands the consequence.
- Distinctive: line 56
Never stop the firewall rollback timer before a fresh SSH login has worked.
- Distinctive: line 57
Never change the server by hand without copying the change into the repository the same day.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Set up a server
The procedure is deploy/setup-server.md. Follow it step by step and do not reinvent or shorten it: every command there is part of the security baseline. This skill adds how to run it safely as an agent and how to know each step is done. docs/deploy.md explains the moving parts.
Before you start
Collect from the user:
- the server's public IP address and SSH access as
rootor a sudo user (Ubuntu 22.04 or 24.04); - the domain, with its DNS
Arecord pointing at the server (needed before step 6); - the GitHub repository (
owner/name) the server will deploy from; - the username for the first account in the app;
- whether Caddy runs on the host (variant A, recommended) or in a container (variant B).
Who runs the commands. If you have a shell on the server, run each step's commands yourself, one step at a time, and show the output. Otherwise give the user one step at a time and wait for its output before the next. Either way, never ask for passwords or private keys in the chat: the user types the account password into the CLI prompt, and private keys go straight into GitHub secrets.
Steps and their "done" checks
Step in deploy/setup-server.md | Done when |
| 1. Install Docker | docker compose version prints a version. |
2. Create the deploy user | id deploy lists the docker group. Tell the user plainly: membership in docker is equivalent to root, so this account is for deploys only. |
| 3. Firewall | ufw status verbose allows 22/tcp, 80/tcp, 443/tcp, 443/udp and 172.16.0.0/12 (containers to host), nothing else; iptables -S DOCKER-USER shows the -i <interface> -j DROP line; a new SSH login works; only then is the rollback timer stopped. |
| 4. Get the code | The deploy key was added in GitHub with Allow write access unchecked; GitHub's host-key fingerprint was compared with the published one; /srv/ai-tutor is a clone owned by deploy. |
| 5. Configure and start | .env exists (registration closed, COOKIE_SECURE=true, TRUST_PROXY=true); data/ belongs to 10001; docker compose ps shows app running; the first account exists (docker compose exec app python -m app.cli list-users). |
| 6. Reverse proxy | https://<domain> opens the sign-in page with a valid certificate; the access log folder exists. |
| 7. Check the setup | All four checks below pass. |
| 8. Backups | The user knows where backups are and copies them off the server. |
| 9. GitHub Actions | The forced-command key is in authorized_keys; the secrets DEPLOY_HOST, DEPLOY_SSH_KEY, DEPLOY_KNOWN_HOSTS are set; local copies of the private key are deleted; the next push to main deploys (see the deploy skill). |
Step 3 needs extra care
A wrong firewall rule locks everyone out. Before any firewall change: arm the rollback timer exactly as the guide shows, and keep the current SSH session open. Confirm with the user that a second, fresh SSH login works before stopping the timer. If that login fails, do nothing: the timer turns the firewall off within five minutes.
Final checks (step 7 of the guide)
Report each result to the user:
curl -fsS https://<domain>/api/healthanswers"status":"ok", andgit_shaequalssudo -u deploy git -C /srv/ai-tutor rev-parse HEADon the server.- From outside the server,
curl -m 5 http://<server-ip>:8000/fails (timeout or connection refused). curl -s --path-as-is https://<domain>/%2e%2e/VERSIONreturns the app's HTML start page, never the bare version string.- On the server,
docker ps --format '{{.Names}}\t{{.Ports}}'shows no0.0.0.0:or[::]:, except the proxy's 80 and 443 when Caddy runs in a container.
A failure in 2, 3 or 4 means the server is exposed: stop, tell the user, and fix it before anything else.
Never
- Never publish the app port without an address (
8000:8000); keep127.0.0.1:8000:8000, plusdocker-compose.edge.ymlonly for a proxy in a container. - Never give the server's deploy key write access to the repository.
- Never turn on
REGISTRATION=openorCOOKIE_SECURE=falseon a public server unless the user asks for it and understands the consequence. - Never stop the firewall rollback timer before a fresh SSH login has worked.
- Never change the server by hand without copying the change into the repository the same day; the next deploy resets the checkout.
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- smixs/disruptor-skills★ 19same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-contentSkill
- choose-exercisesSkill
- deploySkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

