chore(install): don't prompt for a domain — install over IP, set it later in the dashboard

The panel domain is a dashboard concern now (System page → panel_domain override + Caddy
on-demand TLS), so the installer no longer asks for it. A fresh interactive install goes
straight to bare-IP/HTTP (prompts only for the HTTP port + admin email). The domain still
works everywhere it needs to: CLUSEV_DOMAIN=… preset for scripted installs is kept, and a
non-interactive re-run (update.sh) still preserves the existing .env domain; the closing
banner and the bare-IP warning now point the operator to Dashboard → System for the domain.

shellcheck clean; bash -n OK.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
feat/v1-foundation
boban 2026-07-02 20:14:29 +02:00
parent dc26dccaa3
commit 2a1ad6595b
1 changed files with 10 additions and 5 deletions

View File

@ -6,8 +6,10 @@
# random password, and installs a themed MOTD. Safe to re-run: existing secrets
# and the clusev user are preserved, never regenerated.
#
# sudo ./install.sh # interactive (prompts for domain + admin email)
# sudo CLUSEV_DOMAIN=app.host.tld CLUSEV_ADMIN_EMAIL=admin@host.tld ./install.sh
# The panel installs over IP/HTTP by default — set a domain (auto-TLS) later in the dashboard
# (System page). Power users can still preset one at install with CLUSEV_DOMAIN=.
# sudo ./install.sh # interactive (prompts for HTTP port + admin email)
# sudo CLUSEV_DOMAIN=app.host.tld CLUSEV_ADMIN_EMAIL=admin@host.tld ./install.sh # preset a domain
set -euo pipefail
cd "$(dirname "$0")"
@ -138,8 +140,8 @@ ADMIN_EMAIL="${CLUSEV_ADMIN_EMAIL:-$(env_get ACME_EMAIL)}"
HTTP_PORT="${CLUSEV_HTTP_PORT:-80}"
if [ -t 0 ]; then
echo; bold "Clusev Installer"; echo "================"
printf '%s' "Domain (leer = Zugriff per IP ueber HTTP): "; read -r in_domain || true
[ -n "${in_domain:-}" ] && DOMAIN="$in_domain"
# The panel domain is NOT asked here — install over IP/HTTP, then set a domain later in the
# dashboard (System page → automatic TLS). Power users can still pass CLUSEV_DOMAIN=… to preset it.
if [ -z "$DOMAIN" ]; then
printf '%s' "HTTP-Port (Standard 80): "; read -r in_port || true
[ -n "${in_port:-}" ] && HTTP_PORT="$in_port"
@ -193,7 +195,7 @@ else
SITE_ADDRESS=":${HTTP_PORT}"
if [ "$HTTP_PORT" = "80" ]; then APP_URL="http://${HOST_IP}"; else APP_URL="http://${HOST_IP}:${HTTP_PORT}"; fi
REVERB_HOST="$HOST_IP"; REVERB_PORT="$HTTP_PORT"; REVERB_SCHEME="http"
warn "Bare-IP-Modus: Panel inkl. 2FA/Audit laeuft ueber KLARTEXT-HTTP. Fuer Produktion Domain + TLS setzen."
warn "Bare-IP-Modus: Panel inkl. 2FA/Audit laeuft ueber KLARTEXT-HTTP. Fuer Produktion spaeter im Dashboard (System) eine Domain setzen — TLS kommt automatisch."
fi
# ── [3/9] .env + secrets (idempotent) ────────────────────────────────
@ -438,4 +440,7 @@ if [ "$USER_CREATED" = 1 ]; then
info " Host-Passwort: ${CLUSEV_USER_PW}"
fi
info "+----------------------------------------------------------+"
if [ -z "$DOMAIN" ]; then
info "Domain + HTTPS spaeter im Dashboard unter System setzen — TLS kommt automatisch."
fi
info "Diese Passwoerter werden nur jetzt angezeigt."