An automated Bash script to download, configure, and install the Linux version of v2rayN alongside its bundled system cores (Xray, Sing-box).
- Smart Upgrades: Automatically backs up and preserves your active profiles, proxy subscriptions, and custom configurations (
guiConfigsand.jsonsettings) before applying updates. - Flexibility: Installs stable releases by default, or optionally grabs the newest beta/alpha updates via a dedicated toggle flag.
- Network Proxy Support: Easily passes download traffic through an existing upstream proxy gateway.
- Adaptive Context Deployment: Detects execution context (
sudovs. standard user execution) to switch seamlessly between system-wide or single-user isolation paths.
The deployment engine relies on standard utilities. Make sure they are installed on your distribution:
sudo apt update && sudo apt install unzip wget curl -yClone the repository and jump into the workspace directory:
git clone https://github.com/mammadnet/v2rayN-installer.git
cd v2rayN-installer
chmod +x v2rayN_installer.shSystem-Wide Deployment (All Users):
Installs the binary engine inside /opt/v2rayN, symlinks to /bin, and links desktop shortcut hooks globally.
sudo ./v2rayN_installer.shSingle-User Isolation (Current User Only):
Installs directly inside $HOME/.local/share/v2rayN without requesting root clearance.
./v2rayN_installer.shYou can append flags to modify the script's behavior to handle strict firewalls or trial experimental packages.
If GitHub assets are throttled or blocked on your network, explicitly route the installer's connection payload through a specific gateway:
./v2rayN_installer.sh -s 192.168.1.20 -p 10808To bypass the default production release branch and download the absolute newest code tag available on GitHub:
./v2rayN_installer.sh -r# Update to the latest pre-release using an active local proxy gateway
sudo ./v2rayN_installer.sh -s 127.0.0.1 -p 2080 -r