mhsanaei / 3x-ui
Get started
Taken from the repository's own files on 24 Oct 2026. RepoPilot has not run these commands.
Prerequisites
Go 1.27.3from go.mod
Commands
Makefile| Task | Run | What it runs |
|---|---|---|
| build | make build | go build ./... |
| test | make test | runs test-go test-fe |
| lint | make lint | runs lint-go lint-fe |
Install and use
README.mdbash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh)
To install a specific version, append its tag (e.g. v3.7.0):
bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh) v3.7.0
To install the rolling dev build (latest per-commit pre-release from main, not a stable release), pass dev-latest:
bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh) dev-latest
During installation a random username, password, and access path are generated. After installation, run x-ui to open the management menu, where you can start/stop the service, view or reset your login credentials, manage SSL certificates, and more.
Every release asset is published with a .sha256 sum next to it. Both install.sh and the updater verify the archive against that sum and abort on a mismatch.
For full documentation — installation, configuration, operations, and the complete API reference — visit docs.sanaei.dev.
Unattended install
The installer also runs non-interactively for cloud-init.
Set XUI_NONINTERACTIVE=1 (or pipe with no TTY) and it installs end-to-end with
zero prompts, generating random credentials and writing them to
/etc/x-ui/install-result.env. See deploy/ for:
- Cloud-init user-data — unattended install on any cloud (Hetzner/AWS/DO/Vultr/GCP/Azure/Oracle)
- Hetzner Cloud notes — cloud-init deployment on Hetzner
Developing
CONTRIBUTING.mdRunning
| Goal | Command |
|------|---------|
| Standard run | go test ./... |
| Hygiene — data races + order-dependence | go test -race -shuffle=on -count=1 ./... (-race needs the C compiler from Prerequisites) |
| Coverage gaps | go test -coverprofile=cov.out ./<pkg>/... && go tool cover -func=cov.out |
| Fuzz a parser briefly | go test -run '^$' -fuzz 'FuzzName$' -fuzztime=30s ./<pkg>/... |
Frontend: cd frontend && npm run test (vitest), or npm run test -- --coverage.