Run XUI installer non-interactively with auto-generated license

XUI 1.5.13 is the post-shutdown license-free build: the installer's
isValidLicense() only checks len==16 + hex, and the license servers are
offline. Auto-generate a 16-hex key (openssl rand -hex 8), inject it, and
answer the sysctl prompt — fully unattended by default. Adds XUI_LICENSE,
XUI_SYSCTL, XUI_INTERACTIVE env vars and surfaces the panel setup URL.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Joel Mattison
2026-06-25 20:32:23 -04:00
co-authored by Claude Opus 4.8
parent 796fa5fbd4
commit 863a050413
2 changed files with 100 additions and 15 deletions
+26 -7
View File
@@ -15,13 +15,23 @@ fallback.
3. Downloads `XUI_1.5.13.zip` (~661 MB) from the Gitea mirror (falls back to GitHub)
4. Verifies the SHA-256 checksum (on by default)
5. Extracts `install`, `database.sql`, `xui.tar.gz`
6. Runs the bundled `./install`, which prompts for your **license key** and a
sysctl overwrite (answer **Y**)
7. Panel URL + MySQL credentials are written to `/root/credentials.txt`
6. Runs the bundled `./install` **non-interactively** — auto-generates a valid
license key and answers the sysctl prompt
7. Prints the panel **setup URL**; MySQL credentials are saved to
`<workdir>/credentials.txt`
> The release is **pre-patched/pre-licensed**. You still enter a license key
> when the bundled `install` runs — that behavior comes from the XUI package
> itself, not this wrapper.
### About the "license"
XUI.ONE 1.5.13 is the **post-shutdown, license-free build**. The developer
(GTAXUI) wound down the product and took the license servers offline, then
released a clean 1.5.13 with all license verification patched out (unlocked
extensions for PHP 7.2 / 7.4). It **never phones home**.
The bundled installer still asks for a key, but it only checks the format —
`isValidLicense()` is literally `len == 16 and all hex`. So **any valid 16-char
hex string works** (e.g. `a9f3b7e2c6d8140f`). This wrapper auto-generates a
random one with `openssl rand -hex 8`, exactly like the community auto-installers.
Set `XUI_LICENSE` to pin a specific key.
## Usage
@@ -69,7 +79,16 @@ curl -X PUT \
| `XUI_URL` | Gitea mirror URL (above) | Override the primary download source |
| `XUI_FALLBACK_URL` | GitHub XUIPatch release | Override the fallback source |
| `XUI_SHA256` | baked-in known-good hash | Override, or set to `""` to skip checksum verify |
| `XUI_WORKDIR` | `/opt/xui_install` | Where the package is downloaded/extracted |
| `XUI_WORKDIR` | `/opt/xui_install` | Where the package is downloaded/extracted/run |
| `XUI_LICENSE` | auto-generated 16-hex | Pin a specific 16-char hex license key |
| `XUI_SYSCTL` | `Y` | Answer to the installer's sysctl-overwrite prompt |
| `XUI_INTERACTIVE` | `0` | Set to `1` to answer the installer's prompts yourself|
Example pinning a license and running fully unattended:
```bash
XUI_LICENSE="a9f3b7e2c6d8140f" ./install_xui.sh
```
Example pointing at a different mirror: