Landing: moving into your own house
The picture
At Albatros you live in a flat with a caretaker: they lock the front door, change the locks and take a photo of the flat every night. In your own house you do that yourself.
The move isn't a new build. Your project is already packed in boxes that fit anywhere: the logbook (Git), the building instructions (Dockerfile, compose.yaml) and the conveyor belt (workflow). You pack the rest, move and change your address. Only the harbour belongs to the Albatros house: your logbook gets a new harbour, for example GitHub.
Anyone who never moved in with Albatros builds straight on their own plot: the boxes (the logbook and the built folder seite/) are already waiting on the computer (part “Direkt vom Computer ins Netz”, straight from the computer to the web).
How to use the picture: Tell the person in your first answer, before you ask questions or show commands, even if they want a solution straight away.
How you talk
- Don't just ask: If the project or a detail is missing, still give the concrete steps, or write the file as a draft with assumptions marked
[Annahme: …]. The markers[Annahme: …]and[offen: …]stay in German, like the line names indocs/: that's howlagerecognises what is assumed or still open. Only ask about what's missing at the end. - Casual “you”. Be honest about the effort: an own server often saves money, but costs time for upkeep.
- The person rents and pays for the server themselves with the provider.
- The old home only gets switched off once the new one is proven to work.
- The Albatros tools answer in German. Pass everything on in English, and always talk to the person in English.
Direkt vom Computer ins Netz (straight from the computer to the web)
If the site is hosted by the person themselves from the start (skill lancieren, “hosting it yourself”), there's nothing to move. The logbook is on the computer (skill git-logbuch, part “Logbuch ohne Hafen”), the released site built in seite/. No Albatros harbour is involved.
- A copy of the logbook outside the computer: usually GitHub. The person creates the account themselves and signs in with
gh auth loginin the browser. Thengh repo create <repo> --private --source . --remote origin --push. Public (--public) only if they know thatdocs/with the plan and the concept is then readable by everyone. - A site without a building block needs no server: GitHub Pages, Cloudflare Pages or Netlify deliver the folder
seite/. How to set them up and upload the first time (with the conveyor belt for GitHub Pages) is in the skilllancieren, part 2, “Selbst, mit GitHub” and “Selbst, ohne Repo”. You read the terms and limits of the free offers with the person on their pricing page. - A site with a building block needs its own server: then steps 3 to 5 below apply (the new house, logbook and conveyor belt, data and secrets). For the logbook there's nothing to rename, there's only
originon GitHub. The building instructions (Dockerfile,compose.yaml,nginx.conf) and the conveyor belt you take from the foldervorlage/in albatros-skills. - Your own domain the person buys from a registrar of their choice, with their own account. You take the entries for the phone book (DNS) exactly from the provider's instructions, never from memory: for GitHub Pages under Settings, Pages, “Custom domain”, for Netlify under “Domain management”, for Cloudflare Pages under “Custom domains”, for your own server A and AAAA pointing at its address. The certificate (the padlock in the browser) is fetched by the provider or by Caddy itself. You never touch the email entries (MX). Check as in the skill
domain, step 6:dig +short <domain>, thenhttps://<domain>in the browser. - What the person takes over themselves: monitoring and backup, as noted in
docs/betrieb.md(skillbetrieb), and with their own server also the updates.
Albatros can't check the Albatros missions that look at a server or the harbour. You still report the steps on the island with schritt_melden.
Steps: moving away from Albatros
1. Is the move worth it?
Go through it briefly with the person (see skill kosten): Does the project need more than Albatros offers? Do they want to have everything in their own hands? Do they have an hour or two every month for upkeep? If not, staying is a good decision.
With Light the move is small: the seite/ folder runs with any provider for static sites. Take the logbook to GitHub (step 4, points 1 and 2) and switch the site on there, for example with GitHub Pages. Server and conveyor belt fall away; the moving checklist stays. If the site has its own domain, switch it over as in step 6, with the records the new provider gives you (on GitHub Pages under Settings → Pages → Custom domain).
2. Moving checklist
docs/landung.md in the project:
# Moving to my own server
## Boxes
- [ ] Logbook: everything pushed (`git status` clean)
- [ ] Logbook in the new harbour (e.g. GitHub), all entries arrived there
- [ ] Secrets: list of the names from `.env.example` (never the values here!)
- [ ] Data: database, uploaded files (folder: …)
- [ ] Settings: domains, email entries in DNS (don't touch), cron jobs
- [ ] Domain bought through Albatros? Then move it to a new registrar with the auth code (`domain_mitnehmen`)
## What I take over myself
- [ ] Updates (automatic, security updates only)
- [ ] Backups (nightly, off site, encrypted, test restore every month)
- [ ] Monitoring (does the site answer? is the disk full?)
## Steps and date
…
3. The new house
- Rent a server, Ubuntu 24.04, at least as much memory as before. When ordering, store the person's lock (the public key).
- Set it up with a script that's safe to run several times (as root, read it first, then run it):
- Updates, Docker from the official source
- User
deploywith your lock, folder~/projekt - SSH with keys only:
PasswordAuthentication noin/etc/ssh/sshd_config.d/10-haerten.conf, checksshd -tfirst - Firewall: first
ufw allow 22/tcp,80/tcp,443, only thenufw enable(otherwise you lock yourself out). Keep an open SSH session as a lifeline. fail2ban, automatic security updates (unattended-upgrades)- Limits for logs, so the disk doesn't fill up
- Caddy as the doorman in front of the website: gets the certificate for HTTPS by itself as soon as the address points to the server. It goes into
compose.yamlas its own service, and the website itself then only binds to127.0.0.1. One mistake in theCaddyfilebrings everything down: runcaddy validatebefore every reload, and check from outside afterwards.
4. Take the logbook and conveyor belt along
At Albatros, the conveyor belt's worker lives in the house. In your own house, a worker from GitHub takes over: it doesn't build things itself, but rings at the new server with its own key and has it deliver.
- New harbour: The person creates an account on github.com themselves. Then install
gh(Mac:brew install gh) and rungh auth login; signing in happens in the browser. - Move the logbook:
The old harbour stays reachable asgit remote rename origin albatros gh repo create <projektname> --private --source . --remote origin --pushalbatrosuntil you move out. - Read-only key for the new server: It fetches the logbook itself, read-only. Its house key stays on the server, only the lock goes to GitHub:
Compare the fingerprint of github.com with the one on docs.github.com.ssh deploy@<neue-adresse> 'ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -N "" -C eigener-server' ssh deploy@<neue-adresse> 'cat ~/.ssh/id_ed25519.pub' > server-schloss.pub gh repo deploy-key add server-schloss.pub --title "eigener-server" # read-only, that's the default rm server-schloss.pub ssh deploy@<neue-adresse> 'ssh-keyscan -t ed25519 github.com >> ~/.ssh/known_hosts && git clone git@github.com:<benutzer>/<projektname>.git ~/projekt' - A key of its own for the conveyor belt, never the person's house key. That way it can be blocked on its own:
The key goes straight from the file into GitHub's safe (secrets), never into the chat and never into the logbook. After that,ssh-keygen -t ed25519 -f ~/.ssh/fliessband -N "" -C fliessband ssh deploy@<neue-adresse> 'cat >> ~/.ssh/authorized_keys' < ~/.ssh/fliessband.pub gh secret set DEPLOY_KEY < ~/.ssh/fliessband gh secret set DEPLOY_KNOWN_HOSTS --body "$(ssh-keyscan -t ed25519 <neue-adresse> 2>/dev/null)" gh variable set SERVER --body "deploy@<neue-adresse>" gh variable set SEITE_URL --body "https://<domain>"~/.ssh/fliessbandmay be deleted from the computer. - Adjust the workflow: In
.github/workflows/deploy.yml, the worker and the way to the server change. The rest stays:
Secrets only get into the commands throughjobs: fliessband: runs-on: ubuntu-latest # a GitHub worker instead of your server permissions: contents: read # as few rights as possible concurrency: group: ausliefern cancel-in-progress: false # never cancel a delivery that's running env: ZIEL: ${{ vars.SERVER }} SEITE: ${{ vars.SEITE_URL }} SHA: ${{ github.sha }} steps: - name: Schlüssel des Fliessbands einsetzen env: DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} DEPLOY_KNOWN_HOSTS: ${{ secrets.DEPLOY_KNOWN_HOSTS }} run: | [ -n "$DEPLOY_KEY" ] || { echo "::error::Secret DEPLOY_KEY fehlt"; exit 1; } install -d -m 700 ~/.ssh printf '%s\n' "$DEPLOY_KEY" > ~/.ssh/id_ed25519 && chmod 600 ~/.ssh/id_ed25519 printf '%s\n' "$DEPLOY_KNOWN_HOSTS" > ~/.ssh/known_hosts - name: Bauen und ausliefern, notfalls zurück run: | ssh "$ZIEL" "SHA=$SHA bash -s" <<'EOF' # paste the block from the Albatros version here, from "set -euo pipefail" to "echo "läuft: $SHA"", without the line with willkommen EOF - name: Endkontrolle von aussen run: | # unchanged from the Albatros versionenv:, never directly as${{ secrets.… }}in arunline. Thengh workflow run deploy.ymlandgh run watch. It has to turn green.
5. Take data and secrets along
.envdirectly from server to server, or via your own computer withscp, never through Git.- Database: back it up on Albatros (e.g.
sqlite3 app.sqlite ".backup kopie.sqlite"orpg_dump), restore it on the new server. - Uploaded files with
rsync -a.
6. Switch the address
First test through the new server's address, without changing the phone book: curl --resolve <domain>:443:<neue-ip> https://<domain>/. Then it depends on where the address is rented.
Bought through Albatros (konto_status shows it under “Eigene Domains”, own domains): Albatros keeps the phone book for it. The address moves along to a registrar the person chooses:
- The person creates an account with the new registrar themselves.
- Only call
domain_mitnehmenafter their yes. From then on, Albatros no longer renews the address. Until the move, it keeps pointing to your site or server at Albatros. - The tool gives the auth code, the key for moving the address. Show it only to the person, never in a file or in the logbook. They enter it at the new registrar and start the move there (transfer). Usually they pay for a year's renewal while doing so. With
.comand.net, a move often isn't possible in the first 60 days after buying. - Once the move is through, they set the entries at the new registrar: A and AAAA to the new server,
wwwand the email entries (MX), if there were any.
Rented somewhere else:
- The day before, lower the validity (TTL) of the entries to 300 seconds. Then the switch goes faster.
- A and AAAA record to the new server. You don't need to deregister anything at Albatros for that.
Then check: https://<domain> answers, www redirects, the padlock is there.
7. Only then move out
Watch it for a week. If everything runs, adjust or cancel the plan at Albatros (cockpit). A domain the person bought through Albatros moves first (step 6), otherwise it expires with their plan. There are no more photos (snapshots) after that: from now on, your own backups are what counts.
8. Check the mission
docs/landung.md into the logbook and over the conveyor belt (skills git-logbuch, pipeline), then mission_pruefen with flugschule-10-landung. The check looks at whether the moving checklist docs/landung.md is in the project (with Pilot on the Albatros server, with Light in the harbour). Ideally, the person writes the checklist while they still live at Albatros. If the site was hosted by the person from the start, there's nothing for Albatros to check.
Stumbling blocks
- No certificate: the address doesn't point to the new server yet, or port 80 is closed.
- Docker ports bypass the firewall: internal services only on
127.0.0.1. - Backups set up but never restored: a backup only counts once a test restore has worked.
- Automatic restart after updates: only if everything comes back up by itself afterwards.
Final message
Your last message in this step starts with one sentence on the picture “moving into your own house” that sums up the core once more. Then: what's done, where the result is, what's still open and what comes next.
