Operations

autoscript CLI

Every Vortexa panel install ships a small on-VPS admin shell, backend/cli.sh, installed as /usr/local/bin/autoscript. It is the only supported way to reset admin credentials, rotate the panel domain/port/secret path, pull an official release, back up panel state, and repair the VPN service stack without SSHing into the database directly.

The CLI must run as root. It reads its configuration from /etc/autoscript/agent.env (ENV_FILE) and refuses to start if that file is missing — it means install.sh has not run yet on this box.

interactive menu
sudo autoscript

Every menu action is also available as a single non-interactive subcommand, so it can be scripted or run over a one-shot SSH command:

non-interactive flags
sudo autoscript status
sudo autoscript update
sudo autoscript backup
sudo autoscript restart
sudo autoscript logs
sudo autoscript maintenance on|off|status

Identity is locked

BRAND_NAME and OFFICIAL_REPO_URL (https://github.com/Ghostrelicc/Vortexa) are hardcoded in the script, not read from config — they are treated as part of the project, not something an install can override.

update_now() is the single most involved action in the CLI. It is documented in full on /docs/updates; in short it: refuses to run on a modified/rebranded remote (check_authenticity), pins origin back to the official repo, diffs the installed release tag against the latest GitHub release, fast-forwards the git checkout to that tag, purges all old code/build artifacts (purge_old_code, data directories untouched), runsbackend/scripts/migrate.sh, refreshes the SSH MOTD helper, reinstalls Python/APT dependencies, refreshes systemd unit files, rebuilds the web UI from a clean tree (build_web_ui), and only then restarts the live stack.

How it authenticates

update_all_nodes loads the node roster straight from the panel's own SQLite (nodes.v1 key) or its JSON fallback, mints a short-lived HS256 JWT signed with the panel's own JWT_SECRET, and calls the panel's own local RPC proxy with that token — it does not talk to nodes directly, and refuses to run if JWT_SECRET is unset.

Scope

  • With no argument: every non-master node whose status is not disabled.
  • With a comma-separated id list: only those node ids.
  • Runs updates concurrently via a thread pool, then exits non-zero if any node failed.

autoscript maintenance on writes /etc/autoscript/maintenance and sets a MAINTENANCE_STICKY flag so the sentinel file survives the script exiting — the operator has to explicitly run autoscript maintenance off to clear it. Every other action (update, restart, repair) also toggles the maintenance page automatically around itself, but always clears it on exit (via an EXIT/INT/TERM trap) unless the sticky flag is set, so a crashed update can never leave the panel stuck behind the maintenance page indefinitely.

bash
sudo autoscript maintenance status
sudo autoscript maintenance on
sudo autoscript maintenance off

Shared by the restart menu entry, the update flow, and the repair flow. It is mode-aware — a single-box install (with a built-in local node) manages a different service list than a bare panel-only install:

Local-node install
Disables/masks the legacy autoscript-ip-limit timer+service, then enables+restarts autoscript-web, autoscript-ssh-ws, autoscript-bot, autoscript-stunnel, xray, nginx, fail2ban.
Panel-only install
Enables+restarts the same set PLUS autoscript-ip-limit.service/.timer (the legacy single-box per-UID shaper is still in use here).
Always
systemctl reload-or-restart nginx; systemctl restart autoscript-agent; then polls http://127.0.0.1:<WEB_INTERNAL_PORT>/ for up to 45s before lifting maintenance, so the first real navigation is never a 502.
  1. 1
    Reinstalls openssh-server curl unzip ca-certificates nginx stunnel4 fail2ban via apt.
  2. 2
    Enables sshd (ssh, falling back to sshd).
  3. 3
    Re-runs backend/scripts/setup_xray.sh if present.
  4. 4
    Re-runs backend/scripts/setup_stunnel.sh and apply_settings.sh if present.
  5. 5
    Mode-aware enable+restart of xray, autoscript-web, autoscript-agent, autoscript-ssh-ws, autoscript-bot, autoscript-stunnel, nginx, fail2ban (plus the legacy ip-limit unit on panel-only installs).

When to use it

Reach for repair before update when only the VPN service plane looks broken (Xray won't start, stunnel is down, nginx config drifted) and you don't need new code — it is far faster than a full release update because it never touches the web bundle.
UnitRole
autoscript-web.serviceThe panel's built-in web UI process (single-box installs).
autoscript-agent.serviceThe Python backend API the panel UI and bot both call.
autoscript-ssh-ws.serviceSSH-over-WebSocket bridge.
autoscript-bot.serviceThe Telegram bot process.
autoscript-stunnel.servicestunnel4 for SSH-over-TLS on 445/447/777 (panel-side; same role as the node-side unit documented in Nodes).
autoscript-ip-limit.service / .timerLegacy single-box per-UID speed/session shaper — only active on panel-only (non local-node) installs; disabled and masked automatically once a local node is enabled.
xray.serviceXray-core VMess/VLESS/Trojan.
nginx.serviceTLS termination + reverse-proxy fan-out.
fail2ban.serviceBrute-force protection for sshd/nginx.
ssh / sshd.serviceNative OpenSSH.