RepoPilot

mhsanaei / 3x-ui

Search mhsanaei/3x-ui

GitHub

Get started

Taken from the repository's own files on 24 Oct 2026. RepoPilot has not run these commands.

Prerequisites

Commands

Makefile
TaskRunWhat it runs
buildmake buildgo build ./...
testmake testruns test-go test-fe
lintmake lintruns lint-go lint-fe

Install and use

README.md
bash <(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:

Open README.md

Developing

CONTRIBUTING.md

Running

| 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.

Read the rest of CONTRIBUTING.md