This guide is for Linux desktop users. First identify your distribution and CPU architecture, then install v2rayN with your package manager. Import a subscription, verify the local proxy, and configure the app to start at login. Keep these three states separate: the app is running, the core is listening, and applications are using the proxy. A successful installation alone does not mean your traffic is routed through it.
1. Choose the Package Format and Match Your CPU Architecture
Ubuntu and Debian users will generally need a DEB package; Fedora users will generally need an RPM. The package format depends on your distribution, while the architecture must match the system you’re running. v2rayN is a graphical client, not a system service that automatically routes all traffic after installation. Follow these steps in a regular desktop session.
cat /etc/os-release
uname -m
The first command identifies your distribution; the second reports your machine architecture. If the output is x86_64, choose the x64 package; if it’s aarch64, choose arm64. Don’t assume “64” means a package works on every 64-bit processor: x64 and arm64 use different instruction sets.
Ubuntu / Debian
- Package format
- deb
- Package manager
- apt
- Package details
- dpkg-deb -f
- Architecture
- amd64 / arm64
amd64 corresponds to x64 on the download page and isn’t tied to a particular processor brand.
Fedora
- Package format
- rpm
- Package manager
- dnf
- Package details
- rpm -qip
- Architecture
- x86_64 / aarch64
Check the package architecture before installing to avoid fixing dependencies after choosing the wrong build.
Open the Linux section of our downloads page and choose a package. The commands below assume the package is in ~/Downloads; change the directory if your system uses a different download location. Keep only one v2rayN package of the relevant format in that directory so the search doesn’t pick an older file.
2. Install the Package with apt or dnf
Use your package manager to install the local package so it can also resolve dependencies from your configured repositories. Don’t just extract the package to an arbitrary directory and run it, and don’t force past dependency checks to silence errors. Run the appropriate command group below in Bash for your distribution.
Ubuntu and Debian: Install the DEB Package
deb=$(find "$HOME/Downloads" -maxdepth 1 -type f -iname '*v2rayn*.deb' -print -quit)
if [ -n "$deb" ]; then
dpkg-deb -f "$deb" Package Version Architecture
sudo apt update
sudo apt install "$deb"
else
printf 'No DEB package found. Check the download directory and filename.\n'
fi
dpkg-deb -f only reads package metadata; it doesn’t install the package. Check that Architecture matches your system, then review apt’s proposed installation plan. If dependencies can’t be satisfied, note the first dependency error and check your distribution version and repository configuration. Don’t add repositories from another distribution.
Fedora: Install the RPM Package
rpmfile=$(find "$HOME/Downloads" -maxdepth 1 -type f -iname '*v2rayn*.rpm' -print -quit)
if [ -n "$rpmfile" ]; then
rpm -qip "$rpmfile"
sudo dnf install "$rpmfile"
else
printf 'No RPM package found. Check the download directory and filename.\n'
fi
3. First Launch: Import a Subscription and Check the Core
After installation, search for v2rayN in your desktop applications menu. Menu labels and locations may vary by version. Look for features such as Settings, Subscription Groups, and System Proxy. If your interface differs, use the menus in your installed version rather than following tray instructions for another platform.
-
Open the main window
Launch v2rayN from the applications menu. Check the log area for missing core files, permission errors, or address-in-use errors before importing a configuration.
-
Add a subscription
Open “Subscription Group” → “Subscription Group Settings,” add a group, and paste the subscription URL from your provider. Treat this URL as a credential; don’t include it in public screenshots or terminal history.
-
Update and select a node
Choose Update Subscription from the “Subscription Group” menu. If you don’t have a working proxy yet, update without using one. Once nodes appear, set a working node as the active server.
-
Note the local port
Open “Settings” → “Parameter Settings” and check the local listening port and address. The examples below use a mixed inbound on
127.0.0.1:10808. If your settings differ, replace the example values accordingly. -
Check the runtime logs
After applying the configuration, check the core startup logs. VLESS and VMess are protocol types; Xray and V2Fly are cores. Choose the core that matches your configuration rather than switching based on similar names.
A populated node list only shows that the subscription was parsed. It doesn’t prove the remote server is reachable or that your browser is using the local proxy. First confirm that the local port is listening, then configure the desktop proxy. Change one layer at a time to make errors easier to pinpoint.
4. Test the System Proxy and Command-Line Proxy Separately
On Linux, “system proxy” usually means the proxy settings for your desktop environment; it doesn’t transparently route traffic from every process. GNOME, KDE, and individual apps handle these settings differently, and curl in a terminal won’t necessarily use them. TUN is a separate routing method, so leave it disabled during initial setup.
First check whether the example port is in LISTEN state. If your port isn’t 10808, replace the number at the end of the command. If there’s no output, check the core logs instead of changing browser settings.
ss -ltnp 'sport = :10808'
curl --proxy socks5h://127.0.0.1:10808 --connect-timeout 5 --max-time 15 -I https://v2raytv.com/
socks5h sends the destination hostname to the proxy for resolution, helping keep local DNS from affecting this test. This command checks only one request and doesn’t change system settings. An HTTP response means the request received a response; a status such as 403 may reflect the destination’s policy and doesn’t by itself mean the proxy connection failed.
Desktop system proxy
RecommendedFirst try “System Proxy” → “Set System Proxy” in v2rayN. In GNOME, check the result under “Settings” → “Network” → “Network Proxy.” For manual setup, enter the mixed port for HTTP, HTTPS, and SOCKS, and keep localhost and loopback addresses in the bypass list.
Best for: Browsers and everyday apps that follow desktop proxy settings.
Set the proxy explicitly for one command
Use curl’s --proxy option to specify the address directly, without relying on the desktop session. If you need persistent proxy settings for terminal tools, check each tool’s own options first. Don’t start by adding global variables to every shell configuration file.
Best for: Connectivity troubleshooting, terminal downloads, and comparing behavior with the desktop proxy.
In KDE Plasma, search for “proxy” in System Settings to find the network proxy page. If desktop settings are in place but an app still connects directly, quit and reopen it, then check its own proxy settings. A successful browser test doesn’t prove that every app or protocol is using the proxy.
5. Set Up Autostart Without Treating a Desktop App as a System Service
Desktop users usually need the app to start after login, not before the login screen appears. v2rayN’s graphical interface depends on a desktop session. Running it as a system-level service can cause problems with the display environment, session bus, and permissions. Use your desktop’s autostart feature instead.
- If your version has a startup option under “Settings” → “Parameter Settings,” enable it first, then verify it by logging out and back in.
- In KDE Plasma, search for “Autostart” in System Settings, then choose “Add” → “Add Application” and select v2rayN.
- You can also copy the desktop launcher provided by the package into your user’s autostart directory. Keep its existing Exec, icon, and working directory settings.
The following is the third method. It applies only to the current user and doesn’t require sudo. The command looks for the launcher installed by the package in the system applications directory. If it can’t find one, add the app through your desktop’s autostart settings rather than guessing the executable path.
desktop=$(find /usr/share/applications -maxdepth 1 -type f -iname '*v2rayn*.desktop' -print -quit)
if [ -n "$desktop" ]; then
mkdir -p "$HOME/.config/autostart"
target="$HOME/.config/autostart/$(basename "$desktop")"
cp "$desktop" "$target"
sed -i '/^Hidden=/d; /^X-GNOME-Autostart-enabled=/d' "$target"
printf 'Created: %s\n' "$target"
grep -E '^(\[Desktop Entry\]|Exec=|TryExec=|OnlyShowIn=|NotShowIn=)' "$target"
else
printf 'Launcher not found. Add the app through your desktop autostart settings.\n'
fi
Check that Exec points to the installed application and that OnlyShowIn and NotShowIn don’t exclude your desktop environment. If those restrictions don’t match your desktop, first find out where the launcher came from. Don’t enable the client’s startup option and manually copy a launcher at the same time; duplicate entries can start multiple processes or cause port conflicts.
6. Common Issues: Find the Next Step Based on What You See
Installed, but clicking the icon opens no window?
First check whether the app is minimized to the system tray. If there’s no running process, find the matching desktop file under /usr/share/applications and check its Exec entry. Run that program command in a terminal, removing desktop field codes such as %U and %F. Note the first error and don’t retry with sudo.
The log says “address already in use”—what now?
Run ss -ltnp 'sport = :10808' to check the example port. If it belongs to another v2rayN instance, quit the duplicate. If another required app is using it, choose a free port under “Settings” → “Parameter Settings” and update the desktop proxy and test command to match.
curl works, but the browser won’t load pages?
Start by checking whether the browser is using the proxy. Verify the address and port in your desktop’s network proxy settings, then check whether the browser follows the system proxy. Temporarily disable conflicting proxy settings in the browser, restart it, and test the same URL again.
No tray icon after autostart—does that mean the app didn’t launch?
First search for v2rayN in a process viewer, then use ss to check for a local listener. Some GNOME desktop environments don’t display all status icons by default, so a missing icon doesn’t mean the app has exited. Reopen the main window from the applications menu to check the logs; don’t repeatedly launch the app.
The browser loses all connectivity after you quit the client?
Your desktop may still be set to use a manual proxy pointing to the local port. In GNOME, go to “Settings” → “Network” → “Network Proxy” and set it to Disabled, or restore the previous settings in your desktop’s proxy panel. Then reopen the browser. Don’t reset all network settings to fix a leftover proxy address.
7. Upgrade or Roll Back: Keep Your Settings and Recheck Autostart
For future upgrades, use a package with the same architecture and format, and install it with apt or dnf. Quit the client normally before upgrading, and back up your subscriptions, routing rules, and application configuration in your user directory. Check the path used by your current version; don’t delete the entire user configuration directory.
- Note the current local listening port, active node, and system proxy mode, and make sure you can restore them.
- After installing the new package, launch it manually, check the logs, and test one request with an explicit proxy before enabling normal proxy routing.
- Check the desktop file copied to
~/.config/autostart. A manually copied launcher won’t update when the system launcher changes; copy it again if the Exec path has changed. - Before uninstalling or pausing use, clear the desktop proxy, disable autostart, then remove the installed package through your package manager.
You’ve now checked the package, desktop session, local proxy, and application proxy settings separately. If something breaks later, work through these checks in order: can the app start → is the port listening → does an explicit proxy request get a response → is the desktop app using the proxy? This is more likely to find the cause than reinstalling repeatedly.