25 Commits
Author SHA1 Message Date
vvvomitandClaude Opus 5.5 d760c42ca0 A machine can host the swarm's files without a homeserver
ActionHost joins the swarm as a seeder and installs a timer running the
new ipfs-follow command, which resolves the newest publish, checks its
signature and pins it (everything, or only the images), then lets the
previous one go. It refuses a publish older than one already hosted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 03:18:00 +03:30
vvvomitandClaude Opus 5.5 bd3bfeff65 Deploys can fetch everything from interzone's IPFS swarm
With the IPFS source, the run first installs kubo on the server, joins
the private swarm, finds the newest signed publish (by IPNS, or over
HTTPS if the swarm is slow) and serves its OCI layout as a local
registry. The playbook, roles, packages and images then all come
through the server's gateway, an SSH forward reaching it from here.
Seeding is a choice the setup asks: seeders keep the daemon running and
listen on 4001, others stop it after the run. The publish's playbook
commit is pinned, so the roles match the images it carries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 01:08:54 +03:30
NarratorandClaude Opus 5.5 c8ab8fddd3 Background checks get their own copy of the answers
The dashboard, mirror, review, users, rooms, tokens and update checks
copied the config with *s.cfg, which still shares the Components,
Values and Overrides maps. They read those maps (VarsYAML, DNSRecords)
while the UI writes them: leaving Settings or saving a Fine-tune value
during a check could abort the app with "concurrent map iteration and
map write". config.Clone copies the maps and slices too, and the deploy
runner and history snapshot use it as well.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 19:28:59 +01:00
NarratorandClaude Opus 5.5 87e848dede Ansible checks the server's host key, and secrets stay off command lines
- Every playbook ran with ANSIBLE_HOST_KEY_CHECKING=False, so anyone in
  the middle could pose as the server and be handed the sudo password
  and every secret in vars.yml. Ansible's ssh now uses
  StrictHostKeyChecking=accept-new, like interzone's own ssh calls: a
  new server is trusted on first sight, a changed key stops the run.
- The ssh connection-sharing folder in /tmp is only used when it's this
  user's own and closed to others; someone else could have made it
  first and planted a socket.
- Registering a user passed the password in --extra-vars, readable with
  ps. It goes through a 0600 vars file, like the other admin actions.
- The restore source and backup destination are passed as JSON, so a
  path with a space no longer breaks them.
- The update preview's git fetch puts "--" before the URL, as every
  other git call does.
- A domain's backup list no longer includes dumps of another domain
  that starts with the same name and a dash (a.org vs a.org-b.net).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 19:28:07 +01:00
NarratorandClaude Opus 5.5 5e6ba0a0a9 A run no longer hangs on a long output line, or crashes without os-release
exec scanned the command's output with a 1 MB line limit. Ansible's
"fatal: ... => {json}" dumps can be longer; the scanner then stopped,
nothing read the pipe again, the command blocked writing to it, and
even ctrl+c only got as far as "aborting…". Long lines now come in
pieces, whatever is left is drained, and Wait gives up on leftover
children after 10 seconds.

serverNeeds indexed the first word of the os-release ID, so a server
(or local machine) without /etc/os-release crashed the whole app when
its mirrors were checked. It now says it doesn't know the OS, as for
any other unknown one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 19:25:47 +01:00
NarratorandClaude Opus 5.5 5e8be12ca8 Keep the answers and secrets safe on disk, and vars.yml parseable
Saving:
- config.json, presets.json, the imported copies and the inventory's
  vars.yml and hosts are written by config.WriteSecret: to a temp file
  that's synced and renamed into place, so a crash or full disk leaves
  the old file instead of half of the new one, and always 0600. Writing
  in place kept the mode of a file that was already 0644, as a hand-made
  inventory or a restored backup often is. Links are followed, so a
  linked inventory stays linked.
- A config.json that isn't valid JSON is moved aside to
  config.json.broken-<time> before the wizard starts afresh. Before,
  the fresh answers' new secrets overwrote it on the next save, and a
  redeploy locked Synapse out of Postgres.
- Importing over a server whose answers can't be read now stops instead
  of replacing them without a .before-import copy.
- The imported vars file is kept as imported/<name>/vars.yml, which is
  where ImportedVars reads it, whatever it was called.

The base domain:
- It has to be a hostname. It becomes directory names in the
  inventory, so 'https://example.org' made nested directories, and an
  imported matrix_domain of '../../tmp/x' wrote outside the playbook.
  The Server step drops a pasted https:// and trailing slash; Missing()
  and the importer refuse anything else.

vars.yml:
- A one-line Fine-tune value that is a block list or mapping ("- a",
  "a: b") is written under the key rather than after it, which wasn't
  YAML.
- A pasted "|" block in a YAML field is indented like an override's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 19:21:45 +01:00
vvvomitandClaude Opus 5.5 77f8335e6b Rooms: names can't garble the screen, and no screen leaves rows behind
A room or user name with a tab, a newline, an escape or some emoji was
drawn wider than measured, so the terminal wrapped and scrolled, and
going on to Users kept Rooms' header and keys on screen. Names from
Synapse and log lines are made printable, cutting to fit counts screen
cells (CJK and emoji take two), the coloured title keeps an emoji whole,
and changing screens repaints the terminal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 16:38:37 +03:30
vvvomitandClaude Opus 5.5 06dbed58b9 ssh and git: a user, host or URL starting with - isn't taken as an option
An answers file passed with --config (or an imported one) could set the
SSH user to -oProxyCommand=... and run it on this machine. '--' before
the destination and the repository stops ssh and git reading them as
options.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 15:55:18 +03:30
vvvomitandClaude Opus 5.5 2cdca76950 Shorter messages: ~ for the home folder, and errors say what to do first
Paths under the home folder are written ~/…, the start-fresh line no
longer runs off the screen with two full paths, and the errors met most
(no install yet, a service stopped) open with what to do about them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 15:07:40 +03:30
vvvomitandClaude Opus 5.5 1412810103 Lock the setup choices a running server can't survive changing
Changing the domain, the homeserver, or MAS on Synapse after install
ruins the server: IDs end in the domain, no homeserver reads another's
database, and MAS holds (or would need migrated) every account. The
config now records what the server was installed or imported as
(backfilled from the deploy history for older installs). The Server,
Homeserver and Components steps mark those choices locked and say why,
presets keep them, and writing vars.yml refuses answers that differ.
Uninstalling clears the record.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 05:31:43 +03:30
vvvomitandClaude Opus 5.5 5560782fe8 Add users: many at once from a CSV file
Onboarding a group meant registering people one by one. Add users can
now read a CSV (username, optional password, optional admin), generate
missing passwords, save them all owner-only beside it, and create the
accounts in one run through the playbook's matrix_user_creator, which
every homeserver and MAS supports and which leaves existing accounts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 05:16:13 +03:30
vvvomitandClaude Opus 5.5 2b981f8dff Updates › d: dry-run the update in check mode, in a copy of the playbook
Shows what an update would change on the server before it does. The new
playbook goes in a copy beside yours, borrowing its git objects, so a dry
run never leaves your checkout half-updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 04:54:44 +03:30
vvvomitandClaude Opus 5.5 4d902b7b95 Alerts: the server checks itself and tells ntfy or a webhook when that changes
Health only helps when someone is looking. A timer on the server, like
scheduled backups, checks for failed services, the homeserver not
answering, a certificate about to expire and a full disk, and sends once
when something breaks and once when it's fixed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 04:41:18 +03:30
vvvomitandClaude Opus 5.5 7a127ada16 Maintenance › Disk: what uses the disk, Docker prune, remote media retention
A full disk is how small Matrix servers usually die, mostly from media
cached from other servers. Choice rows now wrap onto as many lines as
they need instead of going one per line, so the seventh tab fits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 04:37:27 +03:30
vvvomitandClaude Opus 5.5 c6930b12df Maintenance from the playbook's docs: services, vacuum, upgrade, tags, uninstall
just.md, playbook-tags.md, maintenance-postgres.md, maintenance-synapse.md
and uninstalling.md describe runs interzone had no way to start. A new
Maintenance screen (Manage's menu) has one tab each:

- Services: start, stop or reinstall everything or one service group
  (start-all, stop-group, install-X,start-group); reinstalling everything
  is setup-all, which removes turned-off components that install-all
  leaves behind.
- Vacuum with any of the five presets, Upgrade Postgres (the old data dir
  kept), Compress Synapse's state with its threshold.
- Tags: any tags with key=value extra vars, as just run-tags.
- Uninstall: the playbook's remove-all, after typing the domain.

Manage lists each under its group and opens the tab, and its Database
shell runs psql on the server in this terminal. Runs go through the new
ActionTags (tags checked against a safe character set, vars as JSON) and
ActionUninstall.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 22:19:25 +03:30
vvvomitandClaude Opus 5.5 c7c384402f Blackout mode picks mirrors that carry what the server needs
Choosing blackout on the Server step now points every source at the
in-country defaults (playbook and roles on Forgejo, images from zot,
packages and PyPI from infamous), not only the empty mirror fields.

A blackout deploy then checks them before using them and swaps in the
first known mirror that has everything: PyPI before installing Ansible,
the registry against every image the enabled services use (the one
missing fewest when none has all), the OS and Docker package mirrors
against the server's distro and release. Each switch is logged and sent
back as a Sources event, which the UI saves; vars.yml is rewritten when
it names the mirror. The run works on a copy of the config, as migrations
already did, so the UI never reads it mid-change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 22:07:20 +03:30
vvvomitandClaude Opus 5.5 5b9bfb5450 Rename settings the playbook has renamed, on load and on deploy
The playbook fails a deploy whose vars.yml still uses an old name, e.g.
matrix_livekit_jwt_service_container_additional_arguments. interzone now
reads the playbook's own old → new lists from its roles' tasks and moves
values, Fine-tune overrides and extra vars to the current names: when a
config is loaded (so the saved one is fixed) and when vars.yml is written
after the playbook update (for renames the update just brought).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 19:50:01 +03:30
vvvomitandClaude Opus 5.5 d43e68ddc1 Share Ansible failure parsing; drop an unused regexp
The Deploy screen had its own copy of FailureMessage's JSON "msg"
parsing. Using the shared one also drops MDAD's "Full error:" dump from
the failure shown under the error, as the self-check already did.

users.go names its "seen in the last 30 days" check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 02:11:47 +03:30
vvvomitandClaude Opus 5.5 984ba7925d Sign-up through MAS with a token, no email
With Exim off the server sends no email, and MAS asks for one on
sign-up by default. The Public community preset, which promised open
sign-up but never turned it on, now opens MAS password sign-up with a
required token and no email. Other presets keep it closed.

The token is generated once and kept in the config. MAS keeps tokens
in its database, so each install makes it with mas-cli; MAS refusing it
as a duplicate means it's already there (checked against MAS 1.27.1).
It's shown after the install and on Manage, where Open/Close
registration now works for Synapse with MAS too. An imported setup
keeps sign-up open, with a new token.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 00:43:52 +03:30
vvvomitandClaude Opus 5.5 0350eec80e Live logs, cached views, Manage shortcuts, Review diff, header health
- View logs follows journalctl -f until esc instead of fetching 300 lines.
- Dashboard, Users and the logs' service list show what they loaded last
  time (cached per server) and refresh in the background.
- Every Manage action has a one-letter shortcut; actions that change the
  server right away need the letter twice.
- Review shows what changes in vars.yml since the last successful deploy;
  x switches to the whole file.
- The header shows whether matrix.<domain> answers over HTTPS and how many
  days its certificate has left, checked every minute from this machine.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 23:29:21 +03:30
vvvomitandClaude Opus 5.5 e00b68fd2a Add a compact layout for phones; open rows with one click
The compact layout drops the sidebar and borders, opens the menu from
the header, wraps the key hints and narrows lists, forms, checks and the
deploy progress. It is picked automatically for narrow or portrait
terminals; the menu's layout switch and -layout override it.

A click anywhere on a list row now opens it. Manage actions that change
the server at once still take a second click.

ssh and Ansible share one persistent connection per server (10 minute
ControlPersist), so back-to-back actions skip the handshake.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 22:42:55 +03:30
vvvomitandClaude Opus 5.5 297a4509b9 Add server maintenance tools, fine-tuning and multiple servers
- Image pre-check: list the images the enabled services use and check
  each in its registry for the server's CPU, before every install and
  on demand (Manage, `interzone images`).
- Update preview: new playbook commits and changed component versions.
- Rollback: record each successful install's commit and answers; roll
  back with a database backup first, pinning the playbook until the next
  update.
- Self-update from the newest Forgejo release, verified with SHA256SUMS.
- Restore a database dump; scheduled backups via a systemd timer on the
  server, and downloading them.
- User admin for Synapse through the admin API inside its container.
- Server dashboard: load, memory, disks, certificates, containers.
- Move to another server by streaming /matrix and reinstalling.
- Several servers, each with its own answers and playbook copy.
- Fine-tune: browse and override any homeserver role default.
- CLI: changes, images, status, restore, rollback, servers, self-update,
  apply --latest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 04:09:29 +03:30
vvvomitandClaude Opus 5.5 41782c807c Support every distro the playbook does in blackout mode
The OS package step now handles APT (Debian, Ubuntu incl. ports,
Raspbian), dnf (AlmaLinux, Rocky, CentOS Stream, Fedora, EPEL) and
pacman (Arch), rewriting only repositories the mirror carries and
warning about the rest. On RHEL-family servers it writes docker-ce.repo
pointing at the Docker mirror, installs EPEL from the mirror, and lets
dnf skip unreachable repositories.

The mirror catalog records which distros each mirror carries; checks
probe per-distro indexes, and the pre-deploy check matches the server's
distro against the chosen mirrors. CDN.ir becomes the default Docker
mirror (all distros) and Hostbaran the default OS mirror; Runflare's
Linux mirror is dropped (402 Insufficient credit).

Tests: offline probe/regex/needs tests, live catalog test
(INTERZONE_MIRROR_TESTS=1) and a container test running the play on
nine distro images (INTERZONE_CONTAINER_TESTS=1).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 22:33:43 +03:30
vvvomitandClaude Opus 5.5 8fda040f0e Add server checks, self-check, a Manage menu, offline bundles and CLI
- Review now checks the server before deploying (SSH, root access, OS,
  CPU, Python, memory, disk, ports 80/443/8448) and resolves every DNS
  record against the server's addresses. Enter asks twice when a check
  failed.
- Deploys end with the playbook's self-check; results list the services
  that answered and what failed. Certificate validation is turned off for
  self-signed setups.
- Welcome offers a Manage menu once a server is installed: update,
  self-check, restart, add a user, close/open registration, back up
  Postgres to this computer, and view any service's logs.
- `interzone bundle` packs the playbook with its roles, Ansible's Python
  packages and the binary for machines without internet; `unbundle`
  installs it, and deploys fall back to the bundled copy.
- `interzone apply` and `interzone check` run without the TUI.
- Invalid YAML in the extra vars and YAML fields is caught on Review.
- Screens are roomier: padded body, spaced form fields and sections,
  two-line component rows, wider cards and separators.
- The Server step no longer turns the domain matrix.org into org.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 21:16:12 +03:30
vvvomitandClaude Opus 5.5 c5c278952b Initial commit: interzone TUI for matrix-docker-ansible-deploy
Interactive wizard (Bubble Tea, Bubbles, Lip Gloss) that picks a homeserver,
opts into any MDAD component, writes the inventory and runs the playbook.
Supports in-country git, container registry, Docker, APT and PyPI mirrors
for installing during an internet blackout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 14:48:25 +03:30