Files
l-ui/deploy/cloud-init/cloud-init.yaml
T
Muse 6a5ee8f77b rename: 3x-ui/x-ui -> L-UI/l-ui/lui-agent (paths, services, env, assets)
Display L-UI; panel binary/process l-ui, agent lui-agent.
Dirs /usr/local/l-ui, /etc/l-ui, /var/log/l-ui; DB /etc/l-ui/l-ui.db
(name file drives it via GetName), probe.db beside it, cert
/etc/l-ui/cert, bin /usr/local/l-ui/bin. Services l-ui.service /
lui-agent.service, OpenRC lui-agent, l-ui.sh, cmd/lui-agent.
Env prefix XUI_ -> LUI_ (code reads new prefix only). Release
assets l-ui-linux-* / lui-agent-linux-*; Gitea repo rogue/l-ui is
a placeholder pending user confirmation (see selfupdate.go note).
Go module path github.com/mhsanaei/3x-ui/v3 intentionally kept.
Versions unchanged: panel V2.6.0 / agent A2.5.0.
2026-10-24 12:00:55 +00:00

82 lines
3.5 KiB
YAML

#cloud-config
# ---------------------------------------------------------------------------
# Generic L-UI unattended install via cloud-init user-data.
#
# Works on any cloud-init platform: Hetzner, AWS, DigitalOcean, Vultr, GCP,
# Azure, Oracle. Paste the whole file as the instance "user data".
#
# It installs the latest L-UI release NON-INTERACTIVELY, generating unique
# random credentials per instance. Full credentials are surfaced ONLY on the
# serial console (owner-only); /etc/motd (world-readable) shows just the access
# URL + username. Nothing is baked in advance — every instance is unique.
#
# Fork note (L-UI): the bootstrap below installs this fork's
# install-master.sh from its own Gitea repository. The fork installer does
# NOT consume the LUI_* non-interactive knobs and does NOT write
# /etc/l-ui/install-result.env, so the LUI_* exports and the credential-
# surfacing block below are inert leftovers from the upstream installer.
# ---------------------------------------------------------------------------
package_update: true
package_upgrade: false
write_files:
- path: /opt/xui-bootstrap.sh
permissions: '0700'
owner: root:root
content: |
#!/usr/bin/env bash
set -euo pipefail
export DEBIAN_FRONTEND=noninteractive
# --- Non-interactive install knobs --------------------------------------
export LUI_NONINTERACTIVE=1
# SSL mode: none (plain HTTP, default) | ip | domain
export LUI_SSL_MODE="${LUI_SSL_MODE:-none}"
# Pin credentials instead of random (leave unset for secure random values):
# export LUI_USERNAME="admin2"
# export LUI_PASSWORD="change-me-please"
# export LUI_PANEL_PORT="2053"
# export LUI_WEB_BASE_PATH="panel"
# Let's Encrypt domain certificate instead of plain HTTP:
# export LUI_SSL_MODE="domain"
# export LUI_DOMAIN="panel.example.com"
# export LUI_ACME_EMAIL="you@example.com"
# PostgreSQL instead of SQLite:
# export LUI_DB_TYPE="postgres"
# export LUI_DB_DSN="postgres://user:pass@host:5432/db?sslmode=disable"
# ------------------------------------------------------------------------
curl -fsSL https://git.881218.xyz/rogue/l-ui/raw/branch/main/install-master.sh | bash
# Surface the generated credentials. Full creds (incl. password + API token)
# go ONLY to the serial console (/dev/console, owner-only). /etc/motd is
# world-readable, so it gets just the access URL + username and a pointer
# to the root-only env file.
if [ -r /etc/l-ui/install-result.env ]; then
{
echo
echo "=== L-UI panel credentials (generated on first boot) ==="
cat /etc/l-ui/install-result.env
echo "========================================================"
echo "Change the password after first login."
} > /dev/console 2>/dev/null || true
# shellcheck disable=SC1091
. /etc/l-ui/install-result.env
{
echo
echo "=== L-UI panel (generated on first boot) ==="
echo "URL: ${LUI_ACCESS_URL:-unknown}"
echo "Username: ${LUI_USERNAME:-unknown}"
echo "Password + API token: sudo cat /etc/l-ui/install-result.env"
echo "============================================="
echo "Change the password after first login."
} >> /etc/motd 2>/dev/null || true
fi
runcmd:
- [bash, /opt/xui-bootstrap.sh]
final_message: "L-UI installed — full credentials in /etc/l-ui/install-result.env (sudo); /etc/motd shows the URL + username only."