Containerized Linux desktop build of v2rayN with X11/XWayland desktop integration.
1.0K
Please to https://github.com/Ali-Nasrolahi/v2rayn-gui for the project's source.
A containerized Linux desktop build of v2rayN for Podman or Docker.
The goal of this project is to make running v2rayN inside a container as straightforward as possible while still integrating with the host desktop. Instead of installing the application directly on the host, the container runs the official Linux release and exposes its graphical interface through the host's X11/XWayland session. This allows the application to remain isolated while behaving like a regular desktop application.
The image is built directly from the official v2rayN release packages during the build process, so no application binaries are stored in this repository.
Most Xray-based containers are designed as headless services and require managing Xray configurations manually. While that works well for automation, it is much less convenient when you want to:
Running the GUI inside a container provides the same management experience while keeping the application isolated from the host operating system.
The container executes the official Linux build of v2rayN and displays its interface using the host's graphical session.
To integrate correctly with the desktop, the container shares a few host resources:
These allow the application to:
An example Compose configuration is included in this repository. It demonstrates the required environment variables, bind mounts, and desktop integration needed for a functional setup.
Build the image yourself or pull it from Docker Hub.
Then use the provided Compose file as a starting point.
In particular, make sure to forward the appropriate desktop environment resources from the host, including:
DISPLAYXAUTHORITYDBUS_SESSION_BUS_ADDRESSXDG_RUNTIME_DIRas well as the corresponding bind mounts used by the example Compose configuration.
If you are using SELinux (for example on Fedora), ensure the bind mounts are labeled appropriately or otherwise configured for container access.
On some systems the application may occasionally feel sluggish or briefly freeze while interacting with the UI.
This has been observed on:
v2rayN currently stores both application files and user data under /opt/v2rayN.
As a result, if you want your subscriptions, configuration, downloaded cores, and other state to persist across container recreation, you should bind mount /opt/v2rayN (or at least the directories containing the mutable configuration) to persistent storage.
Content type
Image
Digest
sha256:c1cfc1a32…
Size
181.9 MB
Last updated
2 months ago
docker pull 4zephyr/v2rayn