- New Discover.vue (app store redesign) - Fleet.vue dashboard for .228 - MeshMap.vue component - Fixed Discover.vue type errors (unused var, type predicate) - Various UI updates (Apps, Dashboard, Marketplace, Mesh, Web5) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5.3 KiB
Plan: Seamless Tailscale Migration for Alpha Testers
Context
Tailscale nodes (Arch 1/2/3) are alpha tester machines. They need full deployment — binary, frontend, infrastructure, and containers — with zero friction. Currently deploy-tailscale.sh only deploys binary + frontend (85 lines), missing ALL infrastructure that deploy-to-target.sh --live provides (rootless prereqs, UID mapping, containers, nginx, Tor, HTTPS, dev mode, UFW, etc.).
These nodes may also have old rootful containers that need migrating to rootless.
Approach
Don't refactor the 1615-line deploy-to-target.sh — too risky during beta freeze. Instead:
- Rewrite
deploy-tailscale.shas a full-deploy script with split-mode SSH resilience - Add
--tailscaleflag todeploy-to-target.shas a convenience wrapper - Add rootful→rootless migration as an automatic pre-step
- Fix
first-boot-containers.shfor rootless (separate concern, for ISO builds)
Changes
1. Rewrite scripts/deploy-tailscale.sh (~400 lines)
Currently 85 lines doing only binary+frontend. Rewrite to be a full deploy for any node, using split-mode SSH (each step = separate short SSH session) for Tailscale stability.
Steps the new script will run (each as its own SSH session):
- SSH connectivity check
- Install prerequisites (rsync, node, npm) if missing
- Rsync code to target
- Rootful→rootless migration (detect
sudo podman ps -a, stop & remove old rootful containers) - Build frontend (nohup + poll, or skip if copy-only node)
- Build backend (nohup + poll, or skip if copy-only node)
- Create rollback backup
- Deploy binary (build locally or copy from .228)
- Deploy frontend (build locally or copy from .228)
- Deploy AIUI
- Sync nginx config + HTTPS snippets
- Sync systemd service
- Setup rootless prereqs (sysctl, linger, podman.socket)
- Create data dirs + UID mapping (full chown table from deploy-to-target.sh:670-689)
- Dev mode (ARCHIPELAGO_DEV_MODE=true for HTTP cookies over Tailscale)
- Deploy nostr-provider.js
- Deploy Claude API proxy (if ANTHROPIC_API_KEY available)
- Setup NTP + swap
- Restart services
- Setup HTTPS (with node's own IP in SAN)
- Read Bitcoin RPC credentials from server secrets
- Create all containers (Bitcoin, Mempool, BTCPay, ElectrumX, LND, Fedimint, Immich, HA, Grafana, Jellyfin, Vaultwarden, SearXNG, FileBrowser)
- Setup Tor hidden services
- Fix UFW forward policy
- Fix IndeedHub NIP-07 (if running)
- Transfer custom images for copy-only nodes (individual tarballs, never combined)
- Run container doctor
- Write deploy manifest
- Post-deploy health check
Copy-only mode: When target can't build (Arch 1/3), script detects no cargo/npm on target and copies pre-built artifacts from .228 via SSH pipe.
Key sections to port from deploy-to-target.sh:
- Lines 646-689 — rootless prereqs + UID mapping
- Lines 629-641 — dev mode
- Lines 839-1474 — all container creation
- Lines 1143-1234 — Tor setup
- Lines 1477-1485 — UFW fix
- Lines 1487-1545 — IndeedHub NIP-07
2. Add --tailscale flag to deploy-to-target.sh (~30 lines)
Wrapper that calls deploy-tailscale.sh for each node sequentially. Also add --tailscale-node=arch1|arch2|arch3 for single-node targeting.
3. Rootful→rootless migration (in deploy-tailscale.sh step 4)
Auto-detect and handle:
ssh TARGET 'ROOTFUL=$(sudo podman ps -a 2>/dev/null | wc -l); if [ $ROOTFUL -gt 1 ]; then sudo podman stop --all; sudo podman rm --all; fi'
Data safe — /var/lib/archipelago/ never deleted, only ownership fixed by UID mapping step.
4. Fix scripts/first-boot-containers.sh (5 targeted edits)
- Line 15: Change root check → archipelago user check (UID 1000)
- Line 140: Change
10.88.0.0/16→0.0.0.0/0(match deploy-to-target.sh) - After line 111: Add rootless prereqs (sysctl, linger, podman.socket)
- After line 113: Add full UID mapping block
- Pin
:latesttags: photoprism, ollama, searxng, nginx-proxy-manager, penpot
5. Update scripts/setup-https-dev.sh
Dynamic SAN — detect node's own IPs (including Tailscale interface) instead of hardcoding .228/.198.
Files Modified
| File | Change | ~Lines |
|---|---|---|
scripts/deploy-tailscale.sh |
Full rewrite — complete deploy with split-mode SSH | ~400 |
scripts/deploy-to-target.sh |
Add --tailscale / --tailscale-node flags |
~30 |
scripts/first-boot-containers.sh |
Fix for rootless (subnet, UID mapping, prereqs) | ~40 |
scripts/setup-https-dev.sh |
Dynamic SAN with Tailscale IPs | ~15 |
docs/BETA-PROGRESS.md |
Update TASK-11 status | ~5 |
Auth State Preservation
All user state in /var/lib/archipelago/ is never touched by deploys:
sessions.json,user.json,identities/,secrets/,federation/
Verification
- Deploy to Arch 2 first (has build tools, safest test)
- Then Arch 1/3 (copy-only mode)
- For each node:
podman psshows containers,curl /healthreturns 200, UI loads, login works - Run container doctor — 0 fixes needed
Order
- Rewrite
deploy-tailscale.sh(main deliverable) - Add
--tailscaleflags todeploy-to-target.sh - Fix
first-boot-containers.sh - Update
setup-https-dev.sh - Test: Arch 2 → Arch 1 → Arch 3
- Update BETA-PROGRESS.md