Operations
autoscript CLI
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.
sudo autoscriptEvery menu action is also available as a single non-interactive subcommand, so it can be scripted or run over a one-shot SSH command:
sudo autoscript status
sudo autoscript update
sudo autoscript backup
sudo autoscript restart
sudo autoscript logs
sudo autoscript maintenance on|off|statusIdentity 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.
sudo autoscript maintenance status
sudo autoscript maintenance on
sudo autoscript maintenance offShared 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.
- 1Reinstalls
openssh-server curl unzip ca-certificates nginx stunnel4 fail2banvia apt. - 2Enables sshd (
ssh, falling back tosshd). - 3Re-runs
backend/scripts/setup_xray.shif present. - 4Re-runs
backend/scripts/setup_stunnel.shandapply_settings.shif present. - 5Mode-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
| Unit | Role |
|---|---|
| autoscript-web.service | The panel's built-in web UI process (single-box installs). |
| autoscript-agent.service | The Python backend API the panel UI and bot both call. |
| autoscript-ssh-ws.service | SSH-over-WebSocket bridge. |
| autoscript-bot.service | The Telegram bot process. |
| autoscript-stunnel.service | stunnel4 for SSH-over-TLS on 445/447/777 (panel-side; same role as the node-side unit documented in Nodes). |
| autoscript-ip-limit.service / .timer | Legacy 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.service | Xray-core VMess/VLESS/Trojan. |
| nginx.service | TLS termination + reverse-proxy fan-out. |
| fail2ban.service | Brute-force protection for sshd/nginx. |
| ssh / sshd.service | Native OpenSSH. |
