[GH-ISSUE #6249] [Feature]: Automatic Updates for Panel and Xray Core / لطفاً برای خود پنل و همچنین هسته Xray Core قابلیت به‌روزرسانی خودکار اضافه شود. #4241

Open
opened 2026-10-31 20:38:14 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @montiego on GitHub (Aug 18, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6249

Describe the bug

English
Feature Request

Please add Automatic Update options to the panel for both the panel itself and the Xray Core.

The user should be able to independently enable or disable automatic updates for the panel and Xray Core.

  1. Panel Automatic Update

Add an option such as:

Panel Auto Update: ON/OFF
Update Channel: Stable / Dev

When enabled, the panel should periodically check for new releases and automatically update itself when a new version is available.
Xray Core Auto Update: ON/OFF

When enabled, the panel should periodically check whether a newer version of Xray Core is available. If a new version is released, the panel should automatically download and install the latest version.

The user should be able to keep this feature disabled if they prefer to manually control Xray Core updates.
The main goal is to allow users to choose whether the panel and Xray Core should be automatically updated, without requiring manual updates whenever a new release becomes available.

فارسی
درخواست قابلیت

لطفاً برای خود پنل و همچنین هسته Xray Core قابلیت به‌روزرسانی خودکار اضافه شود.

بهتر است آپدیت خودکار پنل و Xray Core کاملاً مستقل از یکدیگر قابل فعال یا غیرفعال کردن باشند.

۱. به‌روزرسانی خودکار پنل

گزینه‌ای مانند:

Panel Auto Update: ON/OFF
Update Channel: Stable / Dev

اضافه شود.

در صورت فعال بودن، پنل به‌صورت دوره‌ای وجود نسخه جدید را بررسی کرده و در صورت انتشار نسخه جدید، به‌صورت خودکار پنل را آپدیت کند.

۲. به‌روزرسانی خودکار Xray Core

یک گزینه جداگانه مانند:

Xray Core Auto Update: ON/OFF

اضافه شود.

در صورت فعال بودن، پنل به‌صورت دوره‌ای بررسی کند که آیا نسخه جدیدی از Xray Core منتشر شده است یا خیر.

اگر نسخه جدیدی منتشر شده بود، پنل به‌صورت خودکار آخرین نسخه Xray Core را دانلود و نصب کند.

کاربر همچنین بتواند این گزینه را خاموش نگه دارد تا در صورت تمایل، آپدیت Xray Core را به‌صورت دستی انجام دهد.

هدف

هدف این قابلیت این است که کاربر بتواند به‌صورت اختیاری، آپدیت خودکار پنل و Xray Core را فعال کند تا هر زمان نسخه جدیدی منتشر شد، بدون نیاز به آپدیت دستی، سیستم به‌صورت خودکار به آخرین نسخه به‌روزرسانی شود.

در عین حال، کاربر باید بتواند هرکدام از این دو قابلیت را مستقل از دیگری خاموش یا روشن کند.

How to reproduce the problem

English
Feature Request

Please add Automatic Update options to the panel for both the panel itself and the Xray Core.

The user should be able to independently enable or disable automatic updates for the panel and Xray Core.

  1. Panel Automatic Update

Add an option such as:

Panel Auto Update: ON/OFF
Update Channel: Stable / Dev

When enabled, the panel should periodically check for new releases and automatically update itself when a new version is available.
Xray Core Auto Update: ON/OFF

When enabled, the panel should periodically check whether a newer version of Xray Core is available. If a new version is released, the panel should automatically download and install the latest version.

The user should be able to keep this feature disabled if they prefer to manually control Xray Core updates.
The main goal is to allow users to choose whether the panel and Xray Core should be automatically updated, without requiring manual updates whenever a new release becomes available.

فارسی
درخواست قابلیت

لطفاً برای خود پنل و همچنین هسته Xray Core قابلیت به‌روزرسانی خودکار اضافه شود.

بهتر است آپدیت خودکار پنل و Xray Core کاملاً مستقل از یکدیگر قابل فعال یا غیرفعال کردن باشند.

۱. به‌روزرسانی خودکار پنل

گزینه‌ای مانند:

Panel Auto Update: ON/OFF
Update Channel: Stable / Dev

اضافه شود.

در صورت فعال بودن، پنل به‌صورت دوره‌ای وجود نسخه جدید را بررسی کرده و در صورت انتشار نسخه جدید، به‌صورت خودکار پنل را آپدیت کند.

۲. به‌روزرسانی خودکار Xray Core

یک گزینه جداگانه مانند:

Xray Core Auto Update: ON/OFF

اضافه شود.

در صورت فعال بودن، پنل به‌صورت دوره‌ای بررسی کند که آیا نسخه جدیدی از Xray Core منتشر شده است یا خیر.

اگر نسخه جدیدی منتشر شده بود، پنل به‌صورت خودکار آخرین نسخه Xray Core را دانلود و نصب کند.

کاربر همچنین بتواند این گزینه را خاموش نگه دارد تا در صورت تمایل، آپدیت Xray Core را به‌صورت دستی انجام دهد.

هدف

هدف این قابلیت این است که کاربر بتواند به‌صورت اختیاری، آپدیت خودکار پنل و Xray Core را فعال کند تا هر زمان نسخه جدیدی منتشر شد، بدون نیاز به آپدیت دستی، سیستم به‌صورت خودکار به آخرین نسخه به‌روزرسانی شود.

در عین حال، کاربر باید بتواند هرکدام از این دو قابلیت را مستقل از دیگری خاموش یا روشن کند.

Expected behavior

No response

Actual behavior

No response

Relevant logs


Screenshots

No response

3x-ui version

3.2.4

Xray-core version

No response

How did you install 3x-ui?

install.sh script

Operating system

ubuntu24

Which parts of the panel are affected?

No response

Browser (only if it is a UI bug)

No response

Is the panel behind a reverse proxy or CDN?

None

Before submitting

  • I searched existing issues and this bug has not been reported.
  • I am running the latest released version of 3x-ui (or have verified the bug still exists on it).
  • This bug report is written in English.
  • I have redacted any sensitive data (tokens, real domains, client UUIDs).
Originally created by @montiego on GitHub (Aug 18, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6249 ### Describe the bug English Feature Request Please add Automatic Update options to the panel for both the panel itself and the Xray Core. The user should be able to independently enable or disable automatic updates for the panel and Xray Core. 1. Panel Automatic Update Add an option such as: Panel Auto Update: ON/OFF Update Channel: Stable / Dev When enabled, the panel should periodically check for new releases and automatically update itself when a new version is available. Xray Core Auto Update: ON/OFF When enabled, the panel should periodically check whether a newer version of Xray Core is available. If a new version is released, the panel should automatically download and install the latest version. The user should be able to keep this feature disabled if they prefer to manually control Xray Core updates. The main goal is to allow users to choose whether the panel and Xray Core should be automatically updated, without requiring manual updates whenever a new release becomes available. فارسی درخواست قابلیت لطفاً برای خود پنل و همچنین هسته Xray Core قابلیت به‌روزرسانی خودکار اضافه شود. بهتر است آپدیت خودکار پنل و Xray Core کاملاً مستقل از یکدیگر قابل فعال یا غیرفعال کردن باشند. ۱. به‌روزرسانی خودکار پنل گزینه‌ای مانند: Panel Auto Update: ON/OFF Update Channel: Stable / Dev اضافه شود. در صورت فعال بودن، پنل به‌صورت دوره‌ای وجود نسخه جدید را بررسی کرده و در صورت انتشار نسخه جدید، به‌صورت خودکار پنل را آپدیت کند. ۲. به‌روزرسانی خودکار Xray Core یک گزینه جداگانه مانند: Xray Core Auto Update: ON/OFF اضافه شود. در صورت فعال بودن، پنل به‌صورت دوره‌ای بررسی کند که آیا نسخه جدیدی از Xray Core منتشر شده است یا خیر. اگر نسخه جدیدی منتشر شده بود، پنل به‌صورت خودکار آخرین نسخه Xray Core را دانلود و نصب کند. کاربر همچنین بتواند این گزینه را خاموش نگه دارد تا در صورت تمایل، آپدیت Xray Core را به‌صورت دستی انجام دهد. هدف هدف این قابلیت این است که کاربر بتواند به‌صورت اختیاری، آپدیت خودکار پنل و Xray Core را فعال کند تا هر زمان نسخه جدیدی منتشر شد، بدون نیاز به آپدیت دستی، سیستم به‌صورت خودکار به آخرین نسخه به‌روزرسانی شود. در عین حال، کاربر باید بتواند هرکدام از این دو قابلیت را مستقل از دیگری خاموش یا روشن کند. ### How to reproduce the problem English Feature Request Please add Automatic Update options to the panel for both the panel itself and the Xray Core. The user should be able to independently enable or disable automatic updates for the panel and Xray Core. 1. Panel Automatic Update Add an option such as: Panel Auto Update: ON/OFF Update Channel: Stable / Dev When enabled, the panel should periodically check for new releases and automatically update itself when a new version is available. Xray Core Auto Update: ON/OFF When enabled, the panel should periodically check whether a newer version of Xray Core is available. If a new version is released, the panel should automatically download and install the latest version. The user should be able to keep this feature disabled if they prefer to manually control Xray Core updates. The main goal is to allow users to choose whether the panel and Xray Core should be automatically updated, without requiring manual updates whenever a new release becomes available. فارسی درخواست قابلیت لطفاً برای خود پنل و همچنین هسته Xray Core قابلیت به‌روزرسانی خودکار اضافه شود. بهتر است آپدیت خودکار پنل و Xray Core کاملاً مستقل از یکدیگر قابل فعال یا غیرفعال کردن باشند. ۱. به‌روزرسانی خودکار پنل گزینه‌ای مانند: Panel Auto Update: ON/OFF Update Channel: Stable / Dev اضافه شود. در صورت فعال بودن، پنل به‌صورت دوره‌ای وجود نسخه جدید را بررسی کرده و در صورت انتشار نسخه جدید، به‌صورت خودکار پنل را آپدیت کند. ۲. به‌روزرسانی خودکار Xray Core یک گزینه جداگانه مانند: Xray Core Auto Update: ON/OFF اضافه شود. در صورت فعال بودن، پنل به‌صورت دوره‌ای بررسی کند که آیا نسخه جدیدی از Xray Core منتشر شده است یا خیر. اگر نسخه جدیدی منتشر شده بود، پنل به‌صورت خودکار آخرین نسخه Xray Core را دانلود و نصب کند. کاربر همچنین بتواند این گزینه را خاموش نگه دارد تا در صورت تمایل، آپدیت Xray Core را به‌صورت دستی انجام دهد. هدف هدف این قابلیت این است که کاربر بتواند به‌صورت اختیاری، آپدیت خودکار پنل و Xray Core را فعال کند تا هر زمان نسخه جدیدی منتشر شد، بدون نیاز به آپدیت دستی، سیستم به‌صورت خودکار به آخرین نسخه به‌روزرسانی شود. در عین حال، کاربر باید بتواند هرکدام از این دو قابلیت را مستقل از دیگری خاموش یا روشن کند. ### Expected behavior _No response_ ### Actual behavior _No response_ ### Relevant logs ```shell ``` ### Screenshots _No response_ ### 3x-ui version 3.2.4 ### Xray-core version _No response_ ### How did you install 3x-ui? install.sh script ### Operating system ubuntu24 ### Which parts of the panel are affected? _No response_ ### Browser (only if it is a UI bug) _No response_ ### Is the panel behind a reverse proxy or CDN? None ### Before submitting - [x] I searched [existing issues](../issues?q=is%3Aissue) and this bug has not been reported. - [x] I am running the latest released version of 3x-ui (or have verified the bug still exists on it). - [x] This bug report is written in English. - [x] I have redacted any sensitive data (tokens, real domains, client UUIDs).
Author
Owner

@github-actions[bot] commented on GitHub (Aug 18, 2026):

This is a feature request rather than a bug, so I relabelled it and changed the title prefix from [Bug]: to [Feature]: (previous title: "[Bug]: Automatic Updates for Panel and Xray Core / لطفاً برای خود پنل و همچنین هسته Xray Core قابلیت به‌روزرسانی خودکار اضافه شود."). Your text is unchanged.

Most of the machinery you describe already exists in the panel; what is missing is only the periodic, unattended trigger.

Already implemented (verified in the source):

  • Panel self-update from the dashboard. The version button on the overview page opens the update dialog, backed by GET /panel/api/server/getPanelUpdateInfo and POST /panel/api/server/updatePanel (internal/web/controller/server.go:53 and :71). The logic is in internal/web/service/panel/panel.go: GetUpdateInfo (line 131) compares the running build against the latest GitHub release, StartUpdate (line 183) downloads and runs the official update.sh.
  • Stable / Dev channel. Already a toggle in that same dialog: POST /panel/api/server/setUpdateChannel (internal/web/controller/server.go:72) stores the devChannelEnable setting (internal/web/service/setting.go:130, default false), and the dev channel installs the rolling dev-latest pre-release (internal/web/service/panel/panel.go:47).
  • Xray-core version switch. GET /panel/api/server/getXrayVersion and POST /panel/api/server/installXray/:version (internal/web/controller/server.go:52 and :70) call ServerService.UpdateXray (internal/web/service/server.go:987), which verifies the downloaded archive against the official SHA-256 digest before installing (internal/web/service/server.go:941).
  • On a multi-node setup the master can start the same update on a node from the Nodes page.

Not implemented, which is exactly your request: nothing schedules any of the above. startTask() in internal/web/web.go (lines 303-399) registers no update job, and internal/web/job/ contains none. The closest existing pattern is the WARP IP rotation, which is interval-driven from a stored setting (warpUpdateInterval plus internal/web/job/warp_ip_job.go), so the shape you are asking for does fit the codebase.

One design detail for whoever picks this up: the panel release tarball ships the Xray binary (bin/xray-linux-<arch>, see install.sh:1544-1551), so a panel update already replaces Xray with the version pinned to that release. The two toggles would therefore not be fully independent without extra handling.

Until such a feature exists, you can schedule the official updater yourself. x-ui update asks for interactive confirmation (x-ui.sh:143), so it is not usable from cron; run update.sh directly instead:

# /etc/cron.d/x-ui-update — stable channel, daily at 05:00
0 5 * * * root curl -Ls https://raw.githubusercontent.com/MHSanaei/3x-ui/main/update.sh | bash >> /var/log/x-ui-update.log 2>&1

For the dev channel, set the same tag variable the panel uses (update.sh:986):

0 5 * * * root curl -Ls https://raw.githubusercontent.com/MHSanaei/3x-ui/main/update.sh -o /tmp/x-ui-update.sh && XUI_UPDATE_TAG=dev-latest bash /tmp/x-ui-update.sh >> /var/log/x-ui-update.log 2>&1

Two caveats: an unattended update restarts the panel and Xray, and there is no automatic downgrade, so a rollback is manual via item 5 "Legacy Version" in the x-ui menu. Dev builds track every commit on main and are not stable releases.

You reported 3.2.4 while the current release is v3.6.0, so updating first is worthwhile in any case: the dev-channel toggle landed in the v3.4.x line (commits dated 24-26 June 2026) and is not present in your build. Note that the published release list goes from v3.2.0 to v3.2.5 with no v3.2.4 tag, so I could not verify that exact version; it does not change the conclusion.

Related prior request: #484 (panel auto-update, 2023), closed as not planned before the in-panel updater existed.

خلاصه فارسی

  • بخش عمده‌ای از آنچه درخواست کرده‌اید هم‌اکنون در پنل وجود دارد، اما به‌صورت دستی: به‌روزرسانی خود پنل با یک کلیک از صفحه اصلی، به‌همراه انتخاب کانال
    Stable / Dev
    و همچنین تغییر نسخه Xray-core از داخل پنل.
  • آنچه وجود ندارد دقیقاً همان بخش خودکار است: هیچ زمان‌بندی دوره‌ای برای بررسی و نصب نسخه جدید در
    internal/web/web.go
    یا
    internal/web/job/
    ثبت نشده است.
  • نکته طراحی: باینری Xray داخل بسته انتشار خود پنل قرار دارد
    (install.sh:1544-1551)،
    بنابراین به‌روزرسانی پنل عملاً نسخه Xray را هم عوض می‌کند و مستقل بودن کامل این دو گزینه نیاز به طراحی بیشتری دارد.
  • تا آن زمان می‌توانید اسکریپت رسمی
    update.sh
    را با cron زمان‌بندی کنید (نمونه‌های بالا). دستور
    x-ui update
    تأیید تعاملی می‌خواهد و برای cron مناسب نیست.
  • نسخه شما 3.2.4 است و آخرین نسخه منتشرشده v3.6.0 است؛ گزینه کانال Dev بعد از نسخه شما اضافه شده است.

This reply was generated automatically; a maintainer may follow up. / این پاسخ به‌صورت خودکار تولید شده است و ممکن است یکی از نگهدارندگان پروژه پیگیری کند.

<!-- gh-comment-id:5324957208 --> @github-actions[bot] commented on GitHub (Aug 18, 2026): This is a feature request rather than a bug, so I relabelled it and changed the title prefix from `[Bug]:` to `[Feature]:` (previous title: "[Bug]: Automatic Updates for Panel and Xray Core / لطفاً برای خود پنل و همچنین هسته Xray Core قابلیت به‌روزرسانی خودکار اضافه شود."). Your text is unchanged. Most of the machinery you describe already exists in the panel; what is missing is only the periodic, unattended trigger. Already implemented (verified in the source): - **Panel self-update from the dashboard.** The version button on the overview page opens the update dialog, backed by `GET /panel/api/server/getPanelUpdateInfo` and `POST /panel/api/server/updatePanel` (`internal/web/controller/server.go:53` and `:71`). The logic is in `internal/web/service/panel/panel.go`: `GetUpdateInfo` (line 131) compares the running build against the latest GitHub release, `StartUpdate` (line 183) downloads and runs the official `update.sh`. - **Stable / Dev channel.** Already a toggle in that same dialog: `POST /panel/api/server/setUpdateChannel` (`internal/web/controller/server.go:72`) stores the `devChannelEnable` setting (`internal/web/service/setting.go:130`, default `false`), and the dev channel installs the rolling `dev-latest` pre-release (`internal/web/service/panel/panel.go:47`). - **Xray-core version switch.** `GET /panel/api/server/getXrayVersion` and `POST /panel/api/server/installXray/:version` (`internal/web/controller/server.go:52` and `:70`) call `ServerService.UpdateXray` (`internal/web/service/server.go:987`), which verifies the downloaded archive against the official SHA-256 digest before installing (`internal/web/service/server.go:941`). - On a multi-node setup the master can start the same update on a node from the Nodes page. Not implemented, which is exactly your request: nothing schedules any of the above. `startTask()` in `internal/web/web.go` (lines 303-399) registers no update job, and `internal/web/job/` contains none. The closest existing pattern is the WARP IP rotation, which is interval-driven from a stored setting (`warpUpdateInterval` plus `internal/web/job/warp_ip_job.go`), so the shape you are asking for does fit the codebase. One design detail for whoever picks this up: the panel release tarball ships the Xray binary (`bin/xray-linux-<arch>`, see `install.sh:1544-1551`), so a panel update already replaces Xray with the version pinned to that release. The two toggles would therefore not be fully independent without extra handling. Until such a feature exists, you can schedule the official updater yourself. `x-ui update` asks for interactive confirmation (`x-ui.sh:143`), so it is not usable from cron; run `update.sh` directly instead: ```bash # /etc/cron.d/x-ui-update — stable channel, daily at 05:00 0 5 * * * root curl -Ls https://raw.githubusercontent.com/MHSanaei/3x-ui/main/update.sh | bash >> /var/log/x-ui-update.log 2>&1 ``` For the dev channel, set the same tag variable the panel uses (`update.sh:986`): ```bash 0 5 * * * root curl -Ls https://raw.githubusercontent.com/MHSanaei/3x-ui/main/update.sh -o /tmp/x-ui-update.sh && XUI_UPDATE_TAG=dev-latest bash /tmp/x-ui-update.sh >> /var/log/x-ui-update.log 2>&1 ``` Two caveats: an unattended update restarts the panel and Xray, and there is no automatic downgrade, so a rollback is manual via item 5 "Legacy Version" in the `x-ui` menu. Dev builds track every commit on `main` and are not stable releases. You reported 3.2.4 while the current release is v3.6.0, so updating first is worthwhile in any case: the dev-channel toggle landed in the v3.4.x line (commits dated 24-26 June 2026) and is not present in your build. Note that the published release list goes from v3.2.0 to v3.2.5 with no v3.2.4 tag, so I could not verify that exact version; it does not change the conclusion. Related prior request: #484 (panel auto-update, 2023), closed as not planned before the in-panel updater existed. خلاصه فارسی - بخش عمده‌ای از آنچه درخواست کرده‌اید هم‌اکنون در پنل وجود دارد، اما به‌صورت دستی: به‌روزرسانی خود پنل با یک کلیک از صفحه اصلی، به‌همراه انتخاب کانال `Stable` / `Dev` و همچنین تغییر نسخه Xray-core از داخل پنل. - آنچه وجود ندارد دقیقاً همان بخش خودکار است: هیچ زمان‌بندی دوره‌ای برای بررسی و نصب نسخه جدید در `internal/web/web.go` یا `internal/web/job/` ثبت نشده است. - نکته طراحی: باینری Xray داخل بسته انتشار خود پنل قرار دارد (`install.sh:1544-1551`)، بنابراین به‌روزرسانی پنل عملاً نسخه Xray را هم عوض می‌کند و مستقل بودن کامل این دو گزینه نیاز به طراحی بیشتری دارد. - تا آن زمان می‌توانید اسکریپت رسمی `update.sh` را با cron زمان‌بندی کنید (نمونه‌های بالا). دستور `x-ui update` تأیید تعاملی می‌خواهد و برای cron مناسب نیست. - نسخه شما 3.2.4 است و آخرین نسخه منتشرشده v3.6.0 است؛ گزینه کانال Dev بعد از نسخه شما اضافه شده است. *This reply was generated automatically; a maintainer may follow up. / این پاسخ به‌صورت خودکار تولید شده است و ممکن است یکی از نگهدارندگان پروژه پیگیری کند.*
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#4241
No description provided.