Add XUI.ONE 1.5.13 installer with self-hosted Gitea mirror

Bootstrap installer that downloads the pre-patched XUI 1.5.13 package
from our Gitea generic-package mirror (GitHub fallback), checksum-verifies
it, and runs the bundled ./install. Includes preflight checks (root,
Ubuntu 20/22/24, x86_64, RAM/disk, re-install guard).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Joel Mattison
2026-06-25 20:24:07 -04:00
co-authored by Claude Opus 4.8
commit 9679e424fc
4 changed files with 320 additions and 0 deletions
+119
View File
@@ -0,0 +1,119 @@
# XUI.ONE 1.5.13 Installer
A bootstrap installer for the pre-patched **XUI.ONE 1.5.13** panel, modeled on
the midesi.net `installxui.sh` wrapper. The release package is mirrored to our
own **Gitea generic-package registry** (fast, self-hosted), with the upstream
[XUIPatch](https://github.com/xuione/XUIPatch) GitHub release as an automatic
fallback.
## What it does
`install_xui.sh` is a thin, safe wrapper around the official XUI installer:
1. Pre-flight checks — root, Ubuntu 20.04/22.04/24.04, x86_64, RAM/disk, re-install guard
2. Installs missing deps (`wget`, `unzip`, `tar`)
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`
> 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.
## Usage
On a clean Ubuntu server, as **root**:
```bash
# One-liner — pulls the installer from our Gitea, then runs it:
bash <(wget -qO- https://git.ops01.hprx.zip/api/packages/seed/generic/xui-installer/1.0.0/install_xui.sh)
# Or locally:
chmod +x install_xui.sh
./install_xui.sh
```
The script itself is published to the same Gitea generic registry. To update it,
re-PUT a new version (bump `1.0.0`) and adjust the one-liner accordingly:
```bash
curl -X PUT -H "Authorization: token <TOKEN>" \
-H "Content-Type: application/octet-stream" \
-T install_xui.sh \
"https://git.ops01.hprx.zip/api/packages/seed/generic/xui-installer/<version>/install_xui.sh"
```
## Mirror (where the package lives)
The 661 MB release is hosted on our Gitea, publicly downloadable with **no auth**:
```
https://git.ops01.hprx.zip/api/packages/seed/generic/xui/1.5.13/XUI_1.5.13.zip
sha256: a92e5f21a338c56190d7580f449492c970b5d4219474548ca5ec2f06bc57b2e7
```
Re-uploading later (e.g. a new version) — from any box with the Gitea token:
```bash
curl -X PUT \
-H "Authorization: token <TOKEN>" \
-H "Content-Type: application/octet-stream" \
-T XUI_1.5.13.zip \
"https://git.ops01.hprx.zip/api/packages/seed/generic/xui/<version>/XUI_1.5.13.zip"
```
> `Content-Type: application/octet-stream` is **required** — Gitea's generic
> registry returns HTTP 500 ("isn't multipart/form-data") without it.
## Configuration (env vars)
| Variable | Default | Purpose |
|---------------------|------------------------------------------------------|------------------------------------------------------|
| `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 |
Example pointing at a different mirror:
```bash
XUI_URL="https://cdn.example.com/xui/XUI_1.5.13.zip" \
XUI_SHA256="a92e5f21a338c56190d7580f449492c970b5d4219474548ca5ec2f06bc57b2e7" \
./install_xui.sh
```
## Local archive (`release/`)
The package itself is **not** kept in this repo (661 MB, git-ignored) — the
durable copy is the Gitea mirror above. Only the checksum is tracked:
- `release/XUI_1.5.13.zip.sha256` — feed to `XUI_SHA256` for integrity checks.
Package contents (the three files midesi's tarball also ships):
```
install # the XUI installer (prompts for license + sysctl)
database.sql # initial schema
xui.tar.gz # the panel itself
```
To pull a local copy anytime:
```bash
curl -L -o release/XUI_1.5.13.zip \
"https://git.ops01.hprx.zip/api/packages/seed/generic/xui/1.5.13/XUI_1.5.13.zip"
```
## Credentials
Gitea creds live in `.gitea/` (git-ignored): `token` and `url`. The token is
scoped **public-only + write:repository + write:package**. Rotate it in Gitea
(Settings → Applications) if it's ever exposed.
## System requirements
- Ubuntu 20.04 / 22.04 / 24.04 LTS, clean install, x86_64
- 6+ CPU cores, 1632 GB RAM, 480 GB+ SSD/NVMe, 1 Gbps recommended