The field manual tells you what to type. This volume explains what everything means — and does the two server setups the manual compresses into a paragraph, one click and one screen at a time: Hetzner from a blank account, and an old laptop wiped into a real server.
When a field-manual step feels like a jump, come here, find the matching part, land it, go back. Chips like Field manual · Part 3 tell you where the two books connect.
Almost every beginner mistake is typing a command on the wrong machine. Every code block in both guides is captioned “your laptop” (cockpit) or “your server” (the machine). Read the caption before you paste. That habit alone puts you ahead of most first-timers.
You need this volume for exactly four moments in the field manual:
| When the field manual says… | …come here for |
|---|---|
| “From your laptop's terminal” FM · Part 2 | GS 01 — what a terminal is and how to drive one |
| “ssh root@YOUR_SERVER_IP” FM · Part 2 | GS 02 — what SSH is, making keys, surviving first contact |
| “Route A — Hetzner, step by step” FM · Part 2 | GS 03 — every single click, field by field |
| “Option C — old laptop” FM · Part 2 | GS 04 + GS 05 — full wipe-and-install, then server manners |
Two promises hold throughout: the checkpoint rule (yellow-striped boxes tell you what success looks like — never continue past a failed one), and the no-shame rule: every explanation here assumes you've never done this, because the whole point of owning a server is that nobody was born knowing this.
You know which four doors this book opens, and you'll read code-block captions before pasting. Proceed.
The terminal is just a text conversation with a computer: you type an instruction, press Enter, it answers. That's the entire interface. No icons, no menus — which is exactly why it works identically on a €4 server with no screen.
| You have | Do this |
|---|---|
| Windows 10/11 | Start menu → type Terminal → open Windows Terminal (or PowerShell — same thing for our purposes). ssh is already built in. |
| Mac | Cmd+Space → type Terminal → Enter. |
| Linux | Ctrl+Alt+T, or find “Terminal” in the menu. You already knew that. |
agent@hq:~/agent$
│ │ │ └─ $ = normal user (# would mean root, the all-powerful admin)
│ │ └── the folder you're standing in (~ = your home folder)
│ └───── the machine's name ← glance here to know WHICH computer you're on
└─────────── who you're logged in asThat middle piece is your seatbelt: if it says hq you're on the server; if it says your laptop's name you're in the cockpit.
| Command | Means | Example |
|---|---|---|
pwd | “Where am I?” — prints the current folder | pwd |
ls | List what's in this folder (ls -la = show everything, with details) | ls ~/agent |
cd | Change folder. cd .. = up one. cd alone = go home | cd ~/agent/memory |
mkdir | Make a folder | mkdir test |
nano | Open a file in the beginner-friendly editor (creates it if missing) | nano notes.txt |
cat | Print a file's contents to the screen | cat notes.txt |
cp / mv | Copy / move-or-rename a file | mv notes.txt old.txt |
rm | Delete — no recycle bin, no undo | rm old.txt |
sudo | “Do this as admin” — prefixes another command, asks your password | sudo apt update |
cd ag then Tab → it finishes agent/. Nobody types full paths. Double-Tab lists options.mkdir groundschool
cd groundschool
nano hello.txt # type anything → Ctrl+X → Y → Enter to save & exit
cat hello.txt # your words come back
cd ..
rm -r groundschool # clean up (-r = folder and contents)You created, wrote, read and deleted a file without touching the mouse — and cat hello.txt printed your text. You can now drive any Linux machine on earth. The screen just doesn't scare you anymore.
The shortcut bar at the bottom is the map: ^X means Ctrl+X (exit). It asks “Save modified buffer?” — Y, then Enter to confirm the filename. That three-key dance is the whole editor.
SSH (“secure shell”) turns your cockpit terminal into the server's terminal. You type ssh agent@65.108.1.2, and from that moment every command runs over there, encrypted, until you type exit. That's it — a remote-control cable made of maths.
An SSH key is two files that only work together: a private key (stays on your laptop forever, like a physical house key) and a public key (a lock you can hand out freely — servers install the lock, your key opens it). One command mints the pair. Works identically on Mac, Linux and Windows PowerShell:
ssh-keygen -t ed25519
# "Enter file in which to save…" → just press Enter (default location is correct)
# "Enter passphrase…" → Enter twice for none (fine for starting out),
# or set one — it's a password ON the key itselfYou now own two files in a hidden .ssh folder inside your home folder:
| File | Which half | Rule |
|---|---|---|
id_ed25519 | Private key | Never leaves your laptop. Never pasted anywhere. Ever. |
id_ed25519.pub | Public key (the lock) | Safe to paste into Hetzner, GitHub, anywhere. This is the one ending in .pub. |
# Mac / Linux:
cat ~/.ssh/id_ed25519.pub
# Windows PowerShell:
type $env:USERPROFILE\.ssh\id_ed25519.pubThe output is one long line starting ssh-ed25519 AAAA…. Select it with the mouse, copy it. That single line is what Hetzner's “SSH key” box wants in GS 03. Pasting the private file instead is the classic mistake — if what you copied doesn't start with ssh-ed25519, you grabbed the wrong one.
The cat / type command printed one line beginning ssh-ed25519. Your key pair exists and you know which half is shareable.
ssh-keygen -R YOUR_IP command the error itself suggests, then reconnect.)root@hq:~# or agent@hq:~$. You're now typing on the server.exit # polite goodbye — back to your laptop's prompt
# session frozen (wifi blipped, laptop slept)? the secret escape sequence:
# press Enter, then type ~ then . (tilde, dot — nothing to paste)| Error | Actually means | Fix |
|---|---|---|
Connection timed out | Nothing answered at that address | Wrong IP, server still booting, or (Oracle) cloud firewall. Re-copy the IP, wait 60s, retry. |
Connection refused | Machine exists, but no SSH service listening | On the laptop route: you missed the OpenSSH checkbox in GS 04 — fix is in that part's note. |
Permission denied (publickey) | Reached the door; your key/user didn't open it | Wrong username (Hetzner = root, your laptop install = agent, Oracle = ubuntu) — or the server never got your .pub. |
Nothing to run yet — this pays off the second you have a server. You know: fingerprint → yes, passwords are invisible, exit leaves, Enter ~ . escapes a freeze, and which username each server type expects.
This is FM · Part 2 · Route A in slow motion — every field on every screen, including the two moments that confuse everyone (the identity check, and the forced password change).
Open console.hetzner.com → you'll see a default project (a folder for servers — the default is fine) → big red Add Server button. The form, top to bottom:
| Field | Choose | Why |
|---|---|---|
| Location | Falkenstein or Nuremberg (Helsinki also fine) | All near enough to Lisbon; the bot talks to Telegram, not to you, so latency is irrelevant anyway. |
| Image | OS Images → Ubuntu 24.04 | Everything in both guides assumes it. |
| Type | Shared vCPU → cheapest tier, ~€4/mo: CX22 (x86, 2 vCPU/4GB) or CAX11 (Arm, often a bit cheaper) | Either works — every command in the manual is architecture-agnostic. Shared vCPU is fine; the LLM provider does the heavy thinking. |
| Networking | Keep Public IPv4 ticked (small extra fee) | IPv6-only is cheaper but complicates your life (some networks can't reach it, some APIs neither). Buy the boring option. |
| SSH keys | Add SSH key → paste the one-line .pub from GS 02 → name it (“jelena-laptop”) | Passwordless, phishing-proof logins. If you skip it, Hetzner emails a root password instead — workable, see S3. |
| Volumes · Firewalls · Backups · Placement · Labels · Cloud config | Skip all | The manual's ufw is your firewall; backups are optional money; nothing else applies. |
| Name | hq | It'll appear in your prompt forever — keep it short and pleasing. |
Press Create & Buy now. Thirty seconds later: green dot, and an IPv4 address like 65.108.x.x. Copy it — that number is “YOUR_SERVER_IP” everywhere in both books.
ssh root@YOUR_SERVER_IP # fingerprint question → yesroot@hq:~#. Done.ssh root@YOUR_SERVER_IP again with your new password.Your prompt reads root@hq:~#. You are standing inside a computer in Germany. From here, continue with FM · Part 3 exactly as written.
This turns a forgotten laptop into FM · Part 2 · Option C: a real 24/7 Linux server. It works because the agent only makes outbound calls — a machine behind your home router needs zero network configuration.
This erases the laptop completely — Windows, photos, everything, unrecoverably. Copy anything precious off it first. You'll also need: a USB stick of 4GB+ (it gets erased too), your wifi password, and about 45 minutes.
| Check | Minimum | Comfortable |
|---|---|---|
| Age / CPU | 64-bit — essentially anything from ~2010 onwards | Anything from ~2014 onwards |
| RAM | 2 GB (the field manual's swap step makes this survivable) | 4 GB+ |
| Disk | 30 GB | Any modern disk; an SSD makes everything nicer |
| Battery / screen | Can be half-dead — it'll live plugged in with the lid shut | A working battery is a free mini-UPS for power blips |
Unsure of the specs? They usually appear on the BIOS screen in S3 — or just try; the installer runs fine on anything that meets the minimum.
.iso). Server, not Desktop — no graphical interface means every scrap of the old machine's RAM goes to your agent..iso → select the stick → Start/Flash. Accept the defaults (Rufus may ask about “ISO mode” — keep the recommended option). Five minutes.Plug the stick into the old laptop, power it on, and immediately tap the boot-menu key repeatedly — it's a tiny window. A menu appears; choose the USB entry (often named after the stick's brand, or “UEFI: …”).
| Brand | Boot menu | BIOS (fallback) |
|---|---|---|
| Dell | F12 | F2 |
| HP | Esc then F9 | F10 |
| Lenovo / ThinkPad | F12 (some need the tiny Novo pinhole button) | F1 |
| Acer | F12 (may need enabling in BIOS first) | F2 |
| ASUS | Esc or F8 | F2/Del |
| Toshiba / MSI / Samsung | F12 / F11 / Esc | F2 |
| Old Intel MacBook | Hold ⌥ Option from the chime, pick the orange “EFI Boot” | — |
Missed the window and it booted the old system? Just restart and hammer earlier. If the USB never appears: enter BIOS instead, find Boot Order, put USB first, save-and-exit (F10 usually). On some machines you must also disable “Secure Boot” — Ubuntu normally handles it, so only touch that if the stick refuses to boot.
A text-based installer appears — no mouse; arrows move, Space ticks boxes, Enter confirms, Tab jumps to Done. In order:
wlan… device → Edit → choose your network, type the password → wait for an IP to appear next to it. If no wifi device is listed, the card needs drivers Ubuntu lacks — borrow an ethernet cable for install day; wifi can be sorted after.hq · Username: agent · password twice. Using agent here means you skip the user-creation step later — the field manual's user already exists.The laptop boots to a black screen with a login. Log in on the laptop itself this one time (agent + your password — invisible typing, remember), then ask it for its address:
hostname -I
# prints something like: 192.168.1.47 ← its address on YOUR home networkNow, from your main computer, take remote control — and never touch the laptop's keyboard again:
ssh agent@192.168.1.47 # your number from above · fingerprint → yesYour cockpit prompt now reads agent@hq:~$. The old laptop is officially a server. Continue with FM · Part 3 — skipping S2 (the agent user already exists because you created it during install; the swap step is also skippable if the laptop has 8GB+ RAM).
You missed the OpenSSH checkbox in step 11. On the laptop itself: sudo apt update && sudo apt install -y openssh-server — then ssh works. No reinstall needed.
One home-network truth: 192.168.x.x addresses only work from inside your house. That's fine — the agent talks outward to Telegram, so it works from anywhere in the world regardless. It's only your ssh maintenance that's house-bound; GS 05 fixes that too.
A fresh laptop install still thinks it's a laptop: close the lid and it naps, killing your agent. Four fixes turn it into an appliance you can shut, shelve, and forget.
sudo nano /etc/systemd/logind.confFind these two lines, remove the leading #, and set both to ignore:
HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignoresudo systemctl restart systemd-logind # applies it (your ssh session survives)sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target“mask” = bolts the door shut so nothing — power settings, stray packages — can ever suspend it. With the lid shut the screen is off anyway, which is all the power-saving you need.
Close the lid. Wait a minute. From your cockpit: ssh agent@192.168.1.x still connects, and later your Telegram bot answers with the lid down. The laptop is now furniture with a job.
Home routers hand out addresses by lease; after a router reboot the laptop can come back as .53 instead of .47. The agent doesn't care — only your ssh does. Fix it at the router: open its admin page (address on the router's sticker), find DHCP → Address Reservation (name varies), and pin the laptop (“hq”) to its current address. Two minutes, once.
Want to ssh in from a café when something needs a restart? Tailscale gives your devices a tiny private network across the internet — no ports opened, free for personal use:
curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up # prints a login link — open it, sign in, approve
tailscale ip -4 # its permanent private address, like 100.84.x.xInstall the Tailscale app on your main computer (and phone), sign into the same account, and ssh agent@100.84.x.x works from anywhere on earth. Entirely optional — the bot never needs it; it's purely for your own maintenance access.
Lid closed, tucked on a shelf, plugged in — and the bot answers from your phone on mobile data. If you did S5, ssh from a different network reaches it too. It is now a €0 datacenter.
Six concepts the field manual uses without ceremony. Read once; things stop feeling like incantations.
| Place | What's there |
|---|---|
~ (= /home/agent) | Your home folder. The ~ squiggle is shorthand for it. |
~/agent | The entire project: agent.py, .env, venv/, memory/, projects/. Back this folder up = back everything up. |
/etc | System-wide configuration — where the FM · Part 9 service file and Caddy config live. Editing here needs sudo. |
/var/log & journalctl | The system's diary. Your agent's diary is read with journalctl -u agent. |
/tmp | Scratch space, wiped on reboot. |
sudo — the admin prefixNormal users can't modify the system; sudo in front of a command runs that one command as administrator, after asking your own password (invisible, as always). Files in your home folder never need it; anything touching /etc, installing software, or managing services does. If a command fails with “Permission denied” on a system path, the answer is usually just: same command, sudo in front.
apt — the app storesudo apt update # refresh the catalogue (prices haven't changed — all free)
sudo apt upgrade -y # install updates for everything (-y = stop asking, yes)
sudo apt install -y curl # install a thing by nameModern Ubuntu refuses system-wide pip install (that's the externally-managed-environment error) to stop projects trampling each other. A venv is a private bubble of Python inside your project folder. Two things to remember:
cd ~/agent
source venv/bin/activate # step INTO the bubble → prompt gains a (venv) prefix
pip install whatever # installs affect only this project
deactivate # step outAnd the trick that makes FM · Part 9 work: the service file runs venv/bin/python directly — using the bubble's Python by full path needs no “activation”. Activation is for humans; paths are for robots.
chmod 600 — who may read a fileEvery file has permissions. chmod 600 .env means “owner may read and write; everyone else, nothing”. The manual applies it to .env because that file holds your tokens — on a multi-user system it's the difference between a config file and a leak.
SomethingError: message line is the actual problem; everything above is the route it took to get there.journalctl -u agent -f follows live (Ctrl+C stops following); without -f it opens a scrollable pager — G jumps to the end, /text searches, q quits.You can say what sudo, apt, a venv and chmod 600 each do in one sentence — and you know errors are read bottom-up. That's genuinely the whole survival kit.
| Disaster | Route back in |
|---|---|
| Locked out of SSH (firewall mistake, key chaos) | Hetzner: server page → >_ Console — a browser terminal that ignores SSH entirely. Laptop: it's in your house — open the lid and log in on its own keyboard. |
| Forgot the server password | Hetzner: server page → Rescue → Reset root password. Laptop: log in locally as agent and run passwd; if the login itself is forgotten, honestly — reinstall (GS 04, 45 min) and restore from git. |
| Laptop's IP changed (ssh suddenly times out at home) | On the laptop: hostname -I for the new number; then do GS 05 · S4 so it never moves again. |
| Server feels haunted / half-broken | sudo reboot, wait 60s, ssh back in. Turning it off and on again is legitimate systems administration. |
| Truly wrecked beyond repair | See below — this is the safety net that makes everything else low-stakes. |
Your agent's entire identity is one folder: ~/agent — the code, the .env secrets, the memory/ brain, every project. The field manual already put it under git. Add one habit and total destruction becomes a 30-minute inconvenience — run this from your cockpit every week or two:
scp -r agent@YOUR_SERVER_IP:~/agent/memory ~/agent-backup/
scp agent@YOUR_SERVER_IP:~/agent/.env ~/agent-backup/
# memory = the brain · .env = the keys · agent.py lives in this guide anywayWorst case, ever: new server (GS 03 or GS 04) → field manual Parts 3–5 → copy those two things back → the agent wakes with its memory intact, asking what's next. On Hetzner, a snapshot shortcuts even that.
You know the ritual, the doors back in, and that the blast radius of any mistake is 30 minutes. That knowledge is what "knowing servers" mostly is. Class dismissed — back to the field manual.