[GH-ISSUE #5582] [Bug]: Xray 26.6.22 fails to start #3903

Closed
opened 2026-10-31 20:35:46 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @yarik2720 on GitHub (Jun 26, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5582

Describe the bug

After update panel from version v3.3.1 to v3.4.1 auto-updated xray to version 26.6.22 which fails to run with error if you have warp settings. Rolling back xray to version 26.6.1 runs fine.
Removing warp and switching to version 26.6.22 makes xray works again.

How to reproduce the problem

  1. Have already installed panel with outbounds to vless tcp and warp
  2. Update xray to 26.6.22

Expected behavior

xray starts successful

Actual behavior

xray fails with error

Relevant logs

2026/06/26 07:06:58 ERROR - X-UI: Failure in running xray-core:exit status 23
2026/06/26 07:06:58 ERROR - XRAY: Failed to start: main: failed to create server > failed to disable ipv4 rp_filter for all: open /proc/sys/net/ipv4/conf/all/rp_filter: read-only file system
2026/06/26 07:06:58 INFO - XRAY: infra/conf/serial: Reading config: &{Name:bin/config.json Format:json}
2026/06/26 07:06:58 DEBUG - XRAY: A unified platform for anti-censorship.
2026/06/26 07:06:58 DEBUG - XRAY: Xray 26.6.22 (Xray, Penetrates Everything.) b99c3e5 (go1.26.4 linux/amd64)

Screenshots

No response

3x-ui version

3.4.1

Xray-core version

26.6.22

How did you install 3x-ui?

Docker / Docker Compose

Operating system

Ubuntu Server 24.04

Which parts of the panel are affected?

Xray config generation

Browser (only if it is a UI bug)

No response

Is the panel behind a reverse proxy or CDN?

No — direct access

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 @yarik2720 on GitHub (Jun 26, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5582 ### Describe the bug After update panel from version v3.3.1 to v3.4.1 auto-updated xray to version 26.6.22 which fails to run with error if you have warp settings. Rolling back xray to version 26.6.1 runs fine. Removing warp and switching to version 26.6.22 makes xray works again. ### How to reproduce the problem 1. Have already installed panel with outbounds to vless tcp and warp 2. Update xray to 26.6.22 ### Expected behavior xray starts successful ### Actual behavior xray fails with error ### Relevant logs ```shell 2026/06/26 07:06:58 ERROR - X-UI: Failure in running xray-core:exit status 23 2026/06/26 07:06:58 ERROR - XRAY: Failed to start: main: failed to create server > failed to disable ipv4 rp_filter for all: open /proc/sys/net/ipv4/conf/all/rp_filter: read-only file system 2026/06/26 07:06:58 INFO - XRAY: infra/conf/serial: Reading config: &{Name:bin/config.json Format:json} 2026/06/26 07:06:58 DEBUG - XRAY: A unified platform for anti-censorship. 2026/06/26 07:06:58 DEBUG - XRAY: Xray 26.6.22 (Xray, Penetrates Everything.) b99c3e5 (go1.26.4 linux/amd64) ``` ### Screenshots _No response_ ### 3x-ui version 3.4.1 ### Xray-core version 26.6.22 ### How did you install 3x-ui? Docker / Docker Compose ### Operating system Ubuntu Server 24.04 ### Which parts of the panel are affected? Xray config generation ### Browser (only if it is a UI bug) _No response_ ### Is the panel behind a reverse proxy or CDN? No — direct access ### 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).
bsakaguchi 2026-10-31 20:35:46 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@github-actions[bot] commented on GitHub (Jun 26, 2026):

Xray-core 26.6.22 introduced a change where, at startup, it attempts to write 0 to /proc/sys/net/ipv4/conf/all/rp_filter whenever a WireGuard outbound is present with noKernelTun left at its default value of false. Docker containers do not permit writing to /proc/sys/ unless that specific sysctl is explicitly granted, which is why the error appears only in the Docker install and why rolling back to 26.6.1 (which did not make this attempt) resolves it.

There are two independent workarounds; either one is sufficient.

Option 1 — enable noKernelTun on the WARP outbound (recommended)

In the panel UI, open the outbound (or xray config template) that uses the WARP WireGuard configuration and set noKernelTun to true. This instructs xray-core to use a userspace TUN implementation instead of the kernel one, so it never tries to touch /proc/sys/. The field is present in the WireGuard outbound form as confirmed in frontend/src/lib/xray/outbound-defaults.ts and frontend/src/schemas/protocols/outbound/wireguard.ts.

If the WARP outbound lives in the xray config template rather than as a named panel outbound, edit the template JSON directly and add "noKernelTun": true inside the settings object of the warp outbound entry.

Option 2 — grant the sysctl in the container

Add a sysctls block to the 3xui service in your docker-compose.yml:

services:
  3xui:
    # ... existing config ...
    sysctls:
      net.ipv4.conf.all.rp_filter: 0

Then restart:

docker compose down && docker compose up -d

If you use a bare docker run command instead of Compose, add --sysctl net.ipv4.conf.all.rp_filter=0.

Note that sysctls requires the host kernel to allow namespace-scoped sysctl overrides for this key. On most Linux distributions (including Ubuntu 24.04) it works without --privileged. If it is rejected, the alternative is to set the value on the host directly:

sysctl -w net.ipv4.conf.all.rp_filter=0

and persist it in /etc/sysctl.d/99-xray-warp.conf.

Root cause summary

The change is in xray-core, not in 3x-ui. The panel generates the outbound config with noKernelTun: false (the library default, confirmed in internal/web/service/xray_setting.go), which was harmless before 26.6.22. The docker-compose.yml in this repository grants NET_ADMIN and NET_RAW for fail2ban but does not set the rp_filter sysctl, which is a separate requirement surfaced by this xray-core version.


This reply was generated automatically; a maintainer may follow up.

<!-- gh-comment-id:4807277377 --> @github-actions[bot] commented on GitHub (Jun 26, 2026): Xray-core 26.6.22 introduced a change where, at startup, it attempts to write `0` to `/proc/sys/net/ipv4/conf/all/rp_filter` whenever a WireGuard outbound is present with `noKernelTun` left at its default value of `false`. Docker containers do not permit writing to `/proc/sys/` unless that specific sysctl is explicitly granted, which is why the error appears only in the Docker install and why rolling back to 26.6.1 (which did not make this attempt) resolves it. There are two independent workarounds; either one is sufficient. **Option 1 — enable `noKernelTun` on the WARP outbound (recommended)** In the panel UI, open the outbound (or xray config template) that uses the WARP WireGuard configuration and set `noKernelTun` to `true`. This instructs xray-core to use a userspace TUN implementation instead of the kernel one, so it never tries to touch `/proc/sys/`. The field is present in the WireGuard outbound form as confirmed in `frontend/src/lib/xray/outbound-defaults.ts` and `frontend/src/schemas/protocols/outbound/wireguard.ts`. If the WARP outbound lives in the xray config template rather than as a named panel outbound, edit the template JSON directly and add `"noKernelTun": true` inside the `settings` object of the `warp` outbound entry. **Option 2 — grant the sysctl in the container** Add a `sysctls` block to the `3xui` service in your `docker-compose.yml`: ```yaml services: 3xui: # ... existing config ... sysctls: net.ipv4.conf.all.rp_filter: 0 ``` Then restart: ```bash docker compose down && docker compose up -d ``` If you use a bare `docker run` command instead of Compose, add `--sysctl net.ipv4.conf.all.rp_filter=0`. Note that `sysctls` requires the host kernel to allow namespace-scoped sysctl overrides for this key. On most Linux distributions (including Ubuntu 24.04) it works without `--privileged`. If it is rejected, the alternative is to set the value on the host directly: ```bash sysctl -w net.ipv4.conf.all.rp_filter=0 ``` and persist it in `/etc/sysctl.d/99-xray-warp.conf`. **Root cause summary** The change is in xray-core, not in 3x-ui. The panel generates the outbound config with `noKernelTun: false` (the library default, confirmed in `internal/web/service/xray_setting.go`), which was harmless before 26.6.22. The `docker-compose.yml` in this repository grants `NET_ADMIN` and `NET_RAW` for fail2ban but does not set the `rp_filter` sysctl, which is a separate requirement surfaced by this xray-core version. --- *This reply was generated automatically; a maintainer may follow up.*
Author
Owner

@Anderhar commented on GitHub (Aug 1, 2026):

For those who interested: workarounds for both Podman and Docker are described here and here. A real fix apparently is not expected.

<!-- gh-comment-id:5153163024 --> @Anderhar commented on GitHub (Aug 1, 2026): For those who interested: workarounds for both Podman and Docker are described [**here**](https://github.com/XTLS/Xray-core/issues/6167#issuecomment-4496295853) and [**here**](https://github.com/XTLS/Xray-core/issues/6167#issuecomment-5129754983). A real fix apparently is not expected.
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#3903
No description provided.