Subscription
Run the 3x-ui subscription server — base64/JSON/Clash formats, ports and paths, TLS, response headers, and custom templates.
A subscription is a single URL that returns all of a client's configurations. Client apps refresh it periodically, so when you change an inbound, clients pick up the change automatically. The subscription server runs as a separate server from the panel.
Enable and configure
The subscription server is on by default (subEnable). Configure it in the
panel's subscription settings:
| Setting | Default | Meaning |
|---|---|---|
subPort | 2096 | Listen port (separate from the panel). |
subListen | (all) | Bind address. |
subPath | /sub/ | Base path for raw subscription URLs. |
subDomain | (none) | Public host; if set, the server only answers for that Host. |
subCertFile / subKeyFile | (none) | TLS cert + key — when set, the server serves HTTPS. |
subEncrypt | true | Base64-encode the raw subscription body. |
subUpdates | 12 | Suggested refresh interval (hours) sent to clients. |
A subscription URL looks like:
https://<sub-host>:<sub-port>/sub/<sub-id>where <sub-id> is the client's Sub ID.
Output formats
The format is chosen by path, each with its own enable toggle:
| Format | Path | Enabled by | Output |
|---|---|---|---|
| Raw links | /sub/ | always (if on) | A list of vless://, vmess://, … links (base64-encoded when subEncrypt is on). |
| JSON | /json/ | subJsonEnable | Full Xray client config(s). |
| Clash / Mihomo | /clash/ | subClashEnable | YAML profile. |
Only enabled inbounds using VLESS, VMess, Trojan, Shadowsocks, or Hysteria2
appear in a subscription, ordered by their sub-sort index. Requesting /sub/
with an Accept: text/html header (or ?html=1) returns a human-readable info
page instead of the raw body.
Response headers
Subscriptions return standard headers that compatible apps read:
Subscription-Userinfo—upload,download,total(bytes;total=0means unlimited) andexpire(Unix seconds).Profile-Update-Interval— refresh interval in hours (subUpdates).Profile-Title,Support-Url,Profile-Web-Page-Url,Announce— optional branding shown by some clients.
Custom page templates
Point subThemeDir at a folder containing a custom info-page template to brand
the HTML subscription page. The per-client remark on each link is fully
templated — see Share links → remark variables.
Put the subscription server behind TLS (set subCertFile/subKeyFile, or a
reverse proxy) so subscription contents
aren't exposed in transit.

3x-ui