For users with a Linux desktop environment who are ready to install v2rayN. First check your distribution and CPU architecture, then install the package with your system package manager. Next, verify the desktop launcher, core, and local proxy port, and configure the app to start when you log in. Here, “autostart” means launching the client after signing in to your desktop session—not running a background service before login.
Before you install: check your distribution, architecture, and package
v2rayN is a desktop client for managing nodes, updating subscriptions, and starting a proxy core. The Linux version requires a working graphical session; this desktop setup is not intended for terminal-only servers. v2rayNG and v2flyNG are Android clients, not alternatives to the Linux package.
Your distribution determines the package format, while your processor determines the architecture. Run these two commands first. Don’t choose a package based on how the machine looks, and don’t try to install the Windows executable with a Linux package manager.
cat /etc/os-release
uname -m
Ubuntu / Debian
- Package format
- deb
- Package manager
- apt
- x64 identifier
- x86_64; package architecture: amd64
- ARM64 identifier
- aarch64; package architecture: arm64
Check the distribution requirements too. A matching package format does not guarantee compatibility with every system release.
Fedora / openSUSE
- Package format
- rpm
- Fedora package manager
- dnf
- openSUSE package manager
- zypper
- Common architectures
- x86_64 / aarch64
Use an architecture actually offered for the current release. Don’t force-install a package built for another architecture.
Choose a Linux package from the download page. This guide isn’t tied to a specific version: package names, dependencies, and the interface may change between releases. Note the version and architecture before installing so you have a clear reference when troubleshooting.
DEB and RPM packages: install dependencies with your package manager
Use apt, dnf, or zypper to install the local package whenever possible. These tools read the package’s dependency declarations and fetch the required components from your configured system repositories. Lower-level tools may only unpack the files, leaving an incomplete installation with unresolved dependencies.
Install a DEB package on Ubuntu or Debian
cd "$HOME/Downloads/v2rayn-linux"
ls -lh ./*.deb
dpkg-deb -f ./*.deb Package Version Architecture Depends
sudo apt update
sudo apt install ./*.deb
The ./ prefix tells apt this is a local file, not a package name from a repository. Check Architecture before proceeding. If another installation method left unmet dependencies, you can run sudo apt --fix-broken install, but review the packages it plans to install or remove before confirming—don’t approve everything without checking.
Install an RPM package on Fedora
cd "$HOME/Downloads/v2rayn-linux"
ls -lh ./*.rpm
rpm -qp --queryformat '%{NAME} %{VERSION}-%{RELEASE} %{ARCH}\n' ./*.rpm
rpm -qp --requires ./*.rpm
sudo dnf install ./*.rpm
Install an RPM package on openSUSE
cd "$HOME/Downloads/v2rayn-linux"
ls -lh ./*.rpm
rpm -qp --queryformat '%{NAME} %{VERSION}-%{RELEASE} %{ARCH}\n' ./*.rpm
sudo zypper refresh
sudo zypper install ./*.rpm
Don’t guess which runtime libraries are needed. Builds may use different release methods, and not every Linux package requires a separate .NET installation. Check the package dependencies and startup errors first; if a shared library is missing, find the package that provides it for your distribution. Don’t apply Windows runtime fixes to Linux.
First launch: check the desktop launcher, nodes, and ports
After installation, search for v2rayN in your applications menu and launch it as your regular user. Installing software requires administrator privileges, but running a graphical client usually does not. Launching with sudo may save configuration under another user’s home directory, making it seem to disappear the next time you start the app normally.
-
Check the desktop launcher
Search for v2rayN in your applications menu. If it doesn’t appear, run
grep -il 'v2rayn' /usr/share/applications/*.desktopto check whether the package installed a desktop launcher. Verify the launcher first; don’t configure autostart yet. -
Import nodes
For a single-node share link, copy the full link and choose “Servers” → “Import bulk URLs from clipboard” in the main window. For a subscription, open “Subscription Groups” → “Subscription Group Settings,” enter the URL, and save it. Then select “Update all subscriptions (without proxy).”
-
Verify that it’s running
Select a node and set it as the active server. Check the log at the bottom for core startup errors. VMess and VLESS are node protocols; an open interface does not confirm that the selected core and node settings are working.
-
Check the port
Open “Settings” → “Parameter Settings” and check the local listening port shown by your version. Compare it with the actual listening sockets using
ss -lntp. If you change the port in the settings, update the test command and your apps’ proxy address as well.
The ports below are examples for explanation and testing; they aren’t guaranteed defaults for every version. Some versions use a mixed port that supports both HTTP and SOCKS, while older configurations may use separate ports. Trust the interface and logs rather than carrying a port over from an outdated guide.
ss -lntp | grep -E ':(10808|10809)\b'
curl --proxy socks5h://127.0.0.1:10808 --connect-timeout 10 --max-time 20 -I https://example.com
Use the second command only if the actual SOCKS port is 10808. socks5h sends the destination hostname to the proxy for resolution. An HTTP response confirms that this request passed through the specified endpoint; it does not mean every app is using the proxy. Linux apps vary in their support for desktop proxy settings, and terminal programs may ignore them entirely.
Autostart at login: choose a desktop entry, not a background service
Search for “v2rayN Linux autostart” and you’ll find two different tasks often treated as one: launching the graphical client after a user signs in to the desktop, and running a background process when the system starts. This guide covers the first. The display environment, desktop proxy settings, and user configuration belong to the login session; a system-level service is not a drop-in replacement.
XDG autostart entry
RecommendedCopy the existing desktop launcher to the current user’s ~/.config/autostart/ directory. Keep the launch command supplied by the package. This works with desktop environments that support XDG Autostart.
Best for: everyday users who want v2rayN to open automatically when they log in to the desktop.
Desktop startup applications
Manage the same type of login startup entry with your desktop environment’s startup applications tool. The tool’s name varies by desktop. If an entry already exists, enable it once rather than adding a duplicate manually.
Best for: users who prefer a graphical tool and want to toggle autostart easily.
systemd service
A service requires separate handling for the session environment, configuration path, and process lifecycle. A system service should not be used as a shortcut for autostarting a regular desktop client.
Best for: administrators who specifically need a background core service and can maintain its configuration independently.
Copy the desktop launcher provided by the package
Close any duplicate client windows first. Run the code below in Bash: it searches for desktop launchers and copies one only if exactly one match is found. If there are none or multiple matches, stop and check the package’s launcher files instead of guessing the executable path.
bash <<'BASH'
mapfile -t launchers < <(grep -il 'v2rayn' /usr/share/applications/*.desktop 2>/dev/null)
if [ "${#launchers[@]}" -ne 1 ]; then
printf 'Found %s desktop launchers; check the launcher files provided by the package first.\n' "${#launchers[@]}"
printf '%s\n' "${launchers[@]}"
exit 1
fi
autostart_dir="${XDG_CONFIG_HOME:-$HOME/.config}/autostart"
mkdir -p "$autostart_dir"
install -m 644 "${launchers[0]}" "$autostart_dir/v2rayn.desktop"
grep -E '^(Type|Exec|TryExec|Path|Hidden|OnlyShowIn|NotShowIn|X-GNOME-Autostart-enabled)=' \
"$autostart_dir/v2rayn.desktop"
BASH
Execis the launch command. Keep the value from the original file; don’t replace it with a path you guessed.- If
TryExecis present, it must point to an available program. Otherwise, the desktop environment may skip the autostart entry. Hidden=truedisables the entry.X-GNOME-Autostart-enabled=falsemay also cause the desktop environment to skip it.OnlyShowInandNotShowInrestrict which desktop environments can use an entry. If the restriction doesn’t match your desktop, check what the original launcher is for before changing your user copy.- If the client has already created an autostart entry, don’t copy a second one. Two windows for the same app don’t make startup more reliable.
Save the file with 644 permissions; it doesn’t need to be executable. Desktop environments read it according to their login startup conventions. Whether a desktop file needs to be marked “trusted” before you can click it is a separate matter; don’t loosen its permissions just to enable autostart.
Verify and undo: log out once, then check startup
After saving the autostart entry, log out of your desktop session and sign in again. Locking and unlocking the screen won’t trigger login autostart. You don’t need to reboot the whole computer for the first check; verify the startup flow step by step.
- After logging in, check that v2rayN appears. Whether it opens a window or shows a tray icon depends on the client settings and your desktop’s tray support.
- Check the current user’s processes with
pgrep -a -i v2rayn. A running process doesn’t prove the core started successfully; check the client log too. - Confirm your nodes are still there, the correct server is active, and the local port is listening.
- Repeat the explicit proxy request from the previous section, then test the apps that need a proxy individually.
- If the client should connect automatically after login, check whether it restores the active server. A desktop autostart entry opens the app; it can’t fix a broken node.
To remove the login startup entry created in this guide, delete the user copy. This won’t remove the launcher from the system applications menu. The command targets only the file named in this guide; disable entries created by other methods in the tools that created them.
rm -f "${XDG_CONFIG_HOME:-$HOME/.config}/autostart/v2rayn.desktop"
To upgrade, install the newer package from the same source with apt, dnf, or zypper. This usually replaces the old application files. Back up the data directory the client actually uses before upgrading; don’t assume the configuration always lives in a fixed location. Subscription URLs, node credentials, and custom routing rules are data you should protect.
Troubleshooting: installed successfully, but something isn’t working
The app appears in the menu, but clicking it does nothing?
Read the Exec line in the desktop file, then launch the program in a terminal as the current user using its actual path. Keep the error output. If the line contains desktop field codes such as %U or %F, remove them for manual testing; don’t pass the unchecked line to the shell. For a missing shared library, check the dependencies. For an architecture error, choose the correct package.
It starts manually, but not after you log in?
Check that the file exists in your user autostart directory, that Hidden hasn’t disabled it, and that the program referenced by Exec is still available. Confirm that your desktop supports XDG Autostart. You can inspect the current boot’s user logs with journalctl --user -b, though some desktop environments may not record every startup failure there.
Subscription update timed out—is the installation broken?
First separate installation issues from network issues. A working main window doesn’t mean the subscription URL is reachable. Check the full URL, system clock, and network connection. Then connect using a working node and select “Update all subscriptions (through proxy).” Redact subscription tokens and node credentials before sharing logs.
The client is running, but terminal requests still go direct?
Terminal tools may not use the desktop system proxy. First test with curl --proxy, specifying the local endpoint you verified. If the explicit proxy works, check the app’s own proxy settings. Don’t treat “the app is running,” “the system proxy is on,” and “the routing rule selects a proxy outbound” as the same thing.
Two client processes appear after an upgrade?
Check the client’s autostart setting, your desktop startup applications tool, and the user autostart directory. Keep one entry, and check whether the old version is still running. A package upgrade may not stop an existing process; exit the client normally, then launch it from the new desktop entry and check the logs.
Here’s the complete checklist in one line: the package architecture is correct, the app starts manually as a regular user, the core reports no startup errors, the local proxy port works, and only one instance starts after you log in again. Each check covers a different layer; verify them one at a time instead of repeatedly uninstalling and reinstalling.