-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Settings Reference
Every panel setting, with its default. Read them with GET /apiv2/settings, write them with
POST /apiv2/save using object=settings.
All values are stored and returned as strings, including booleans ("true" / "false")
and numbers ("2096").
| Key | Default | Notes |
|---|---|---|
webListen |
empty | Listen address. Empty means all interfaces |
webPort |
2095 |
Panel port |
webPath |
/app/ |
URL path prefix. The API lives under it, at <webPath>apiv2/. A missing leading or trailing / is added for you |
webDomain |
empty | When set, requests arriving with a different Host are rejected |
webCertFile |
empty | TLS certificate chain. Both files must be set for HTTPS |
webKeyFile |
empty | TLS private key |
webURI |
empty | Overrides the panel URL shown in the UI, for use behind a reverse proxy |
secret |
random | Session signing key, generated at first start |
sessionMaxAge |
0 |
Session lifetime in minutes. 0 means the session lasts until the browser closes |
Changing any of the first seven restarts the panel.
| Key | Default | Notes |
|---|---|---|
subListen |
empty | Listen address |
subPort |
2096 |
Subscription port |
subPath |
/sub/ |
URL path prefix. A missing leading or trailing / is added for you |
subDomain |
empty | When set, requests with a different Host are rejected |
subCertFile |
empty | TLS certificate chain |
subKeyFile |
empty | TLS private key |
subURI |
empty | Overrides the subscription URL shown in the panel |
subUpdates |
12 |
Profile-Update-Interval header, in hours |
subEncode |
true |
Base64-encode the plain-link format |
subShowInfo |
false |
Append remaining traffic and days to link remarks |
| Key | Default | Notes |
|---|---|---|
subJsonExt |
empty | JSON template. Empty means built-in defaults |
subClashExt |
empty | Clash template. Empty means the built-in default config |
subClashNoDefGrp |
false |
Do not add the default Proxy and Auto proxy groups |
subClashSprtAll |
false |
Expand the literal proxy name all to every node |
subClashUdp |
false |
Mark generated Clash proxies as UDP-capable |
| Key | Default | Notes |
|---|---|---|
trafficAge |
30 |
Days of per-tag statistics to keep. Setting it to 0 stops recording and deletes every existing statistics row
|
statsBucketSeconds |
60 |
Size of a statistics bucket, in seconds. Larger means fewer rows and coarser graphs |
globalReset |
empty | Cron expression for resetting every client's traffic, e.g. 0 0 1 * * for the first of each month. Empty or off disables it |
globalResetLast |
0 |
Unix seconds of the last global reset. Maintained by the panel |
| Key | Default | Notes |
|---|---|---|
config |
built-in | The sing-box configuration skeleton for the server's own core |
maintenance |
false |
When true, the core is stopped and held stopped. See below |
version |
build version | Panel version. Maintained by the panel |
A watchdog restarts the core a few seconds after it stops, so stopping it by hand does not
hold. maintenance is the supported way to keep it down — for a certificate renewal or a
migration — and it also tells the panel that the core is down on purpose, so a stopped core
is not reported as a crash.
curl -X POST -H "Token: <Your Token Key>" -d "enable=true" \
"http://localhost:2095/app/apiv2/maintenance"The flag is reported in GET /apiv2/load and in GET /apiv2/status?r=sbd.
| Key | Default | Notes |
|---|---|---|
timeLocation |
Asia/Tehran |
Time zone used for scheduling and for timestamps in the UI |
# Read everything
curl -H "Token: <Your Token Key>" "http://localhost:2095/app/apiv2/settings"
# Change two settings at once
curl -X POST -H "Token: <Your Token Key>" \
-d "object=settings" -d "action=set" \
-d 'data={"subUpdates":"6","subShowInfo":"true"}' \
"http://localhost:2095/app/apiv2/save"Only the keys you send are changed; the rest keep their values. Unlike the other objects,
settings have no new/edit/del distinction — the panel sends set, and the value is
recorded in the change log under that name.