agent deploy README.md
12 kB · 258 lines
Markdown

# Deploying to the mini-PC `atproto-server@192.168.86.250`, SSH on the default port. Ubuntu 24.04, x86_64, sudo prompts for a password. The `250` is the last octet of the address — this document used to say `ssh -p 250`, which was never a port anything listened on. Four services, started by systemd at boot, none of them listening on a port anybody outside can reach. The only way in is the Cloudflare tunnel, which is an outbound connection, and it terminates at the auth proxy. aligned-oauth the OAuth sidecar — holds every session, signs every request aligned-opencode the agent — loopback only, password-locked aligned-proxy the auth proxy — the only thing that knows who anyone is aligned-tunnel cloudflared — aligned.click The ordering between them is a safety property rather than a preference. The tunnel `BindsTo` the proxy, so it cannot be what is running if the proxy is not — otherwise a crashed proxy would leave a public door with nothing behind it checking who is asking. ## Getting the code there Clone it. The repo is public, so this needs no key on the server: git clone https://tangled.org/aligned.click/agent ~/aligned.click Updating later is `git pull && sudo deploy/install.sh`. This is how it was first installed, deliberately: doing it from a clone rather than by copying a working directory is also the test of whether anyone else could stand it up. If you must push a working copy instead — an unpushed fix, a bisect — rsync -av --delete --filter=':- .gitignore' --exclude .git \ ./ atproto-server@192.168.86.250:~/aligned.click/ **Nothing untracked may travel**, which is why the excludes are read from `.gitignore` rather than listed here. A hand-written list is a list somebody has to remember to update, and the one this replaced had already fallen behind twice: - `tools/.session*.json` — cached Bluesky session tokens, `accessJwt` and `refreshJwt` for the admin account. Gitignored for exactly that reason, and copied to the server …