From 634b83fe97156e9bdb32f55cd43f1bcbd090a5eb Mon Sep 17 00:00:00 2001 From: Gavin Nugent Date: Sat, 6 Jun 2026 10:39:59 +0100 Subject: [PATCH] Swap Once install for omaterm prep (docker group + image pre-pull) --- arch-setup.sh | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/arch-setup.sh b/arch-setup.sh index 890219c..1c37aa6 100755 --- a/arch-setup.sh +++ b/arch-setup.sh @@ -1,7 +1,7 @@ #!/bin/bash # ============================================================================= # VPS Setup & Hardening Script for Arch Linux -# For use with ONCE (Basecamp) + Docker deployments +# Prepares a fresh box for OMATERM (docker-only) + Docker deployments # Run as root on a fresh Arch Linux VPS # ============================================================================= @@ -55,7 +55,7 @@ fi echo -e "${CYAN}" echo "╔══════════════════════════════════════════════════════════════╗" echo "║ VPS Setup & Hardening Script ║" -echo "║ Arch Linux · Docker · ONCE · Git ║" +echo "║ Arch Linux · Docker · OMATERM · Git ║" echo "╚══════════════════════════════════════════════════════════════╝" echo -e "${NC}" @@ -157,8 +157,8 @@ pacman -S --noconfirm --needed \ docker \ docker-compose -# Docker must be running before ONCE installs (the ONCE installer does not -# install Docker on Arch — only on apt-based distros) +# Docker must be running before omaterm installs — the new omaterm is +# docker-only (everything runs in the ghcr.io/omacom-io/omaterm container) systemctl enable --now docker.service log "System updated, packages installed, Docker running" @@ -352,24 +352,28 @@ log "Weekly auto-update timer enabled (pacman-update.timer)" warn "Rolling release: check 'journalctl -u pacman-update' if anything misbehaves after an update" # ============================================================================= -# 8. ONCE (Docker already installed via pacman in step 1) +# 8. OMATERM PREP (Docker already installed via pacman in step 1) # ============================================================================= -step "8/8 · ONCE" +step "8/8 · Omaterm prep" -log "Installing ONCE..." -su - $DEPLOY_USER -c 'curl https://get.once.com | ONCE_INTERACTIVE=false sh' || { - warn "ONCE auto-install had issues — you can install manually:" - warn " ssh $SSH_ALIAS" - warn " curl https://get.once.com | sh" -} +# Omaterm itself is installed interactively after first login as the deploy +# user — here we just make sure the box is ready for it: -# Ensure deploy user is in docker group +# Deploy user needs docker group membership to run the omaterm container if getent group docker &>/dev/null; then usermod -aG docker $DEPLOY_USER log "$DEPLOY_USER added to docker group" fi +# Pre-pull the omaterm image so the installer doesn't have to +log "Pre-pulling omaterm image (this may take a while)..." +if docker pull ghcr.io/omacom-io/omaterm:latest; then + log "Omaterm image pre-pulled" +else + warn "Image pre-pull failed — the omaterm installer will pull it instead" +fi + # ============================================================================= # SWAP (2GB) # ============================================================================= @@ -582,7 +586,7 @@ echo " └─ 443/tcp HTTPS" echo "" echo -e " ${GREEN}Services${NC}" echo " ├─ Docker: $(docker --version 2>/dev/null || echo 'installed')" -echo " ├─ ONCE: run 'once' as $DEPLOY_USER to manage apps" +echo " ├─ Omaterm: image pre-pulled — install after first login (see below)" echo " ├─ Fail2ban: active (systemd backend)" echo " └─ Auto-updates: weekly pacman-update.timer" echo "" @@ -609,8 +613,13 @@ echo "" echo -e " ${CYAN}────── COPY ABOVE THIS LINE ──────${NC}" echo "" echo " 2. Test SSH: ssh $SSH_ALIAS" -echo " 3. Run ONCE: ssh $SSH_ALIAS 'once'" -echo " 4. Deploy: ssh $SSH_ALIAS '~/deploy.sh /opt/apps/myapp'" +echo " 3. Install omaterm (interactive SSH session, NOT a one-liner —" +echo " the installer needs a real terminal with TERM set):" +echo "" +echo -e " ${CYAN}ssh $SSH_ALIAS${NC}" +echo -e " ${CYAN}curl -fsSL https://omaterm.org/install | bash${NC}" +echo "" +echo " If it complains about the terminal: TERM=xterm-256color first." echo "" echo " Once step 1 is done, Claude Code can control this server." echo ""