For first-time v2rayN setup on a Linux desktop, or when the app does not start after a reboot. Choose a package for your distribution and CPU architecture, install it with the package manager, and complete the first launch from your desktop account. Then enable autostart and check the process, tray, listening port, and browser proxy.
Choose a package: distribution, architecture, and format
The file extension determines which installer to use; the architecture determines whether the program can run on your machine. Check both. Run the commands below to identify your distribution, OS version, and machine architecture. Linux packages are not interchangeable just because both machines run Linux.
grep -E '^(ID|VERSION_ID)=' /etc/os-release
uname -m
Native packages
RecommendedUse DEB for Debian and Ubuntu, and RPM for Fedora. Installing with the matching package manager registers the package and resolves its declared dependencies from enabled repositories.
Best for: everyday desktop use, with package-manager support for checking, upgrading, and uninstalling.
Portable archive for the matching architecture
Consider this only if the download page offers a build for your system. Running an extracted archive does not register it as a system package, so you must handle dependency checks, desktop shortcuts, and future upgrades yourself.
Best for: a temporary trial or a distribution with no compatible native package.
When uname -m returns x86_64, the matching DEB is usually labeled amd64, while the RPM is usually labeled x86_64. For aarch64, check for arm64 and aarch64, respectively. Use the builds actually listed on the download page. If there is no matching build, changing the filename or extension will not change the package's architecture.
Install a DEB or RPM and resolve dependencies
Find the downloaded package
Choose a Linux package on the download page, locate it in your file manager, and copy its absolute path. The command below uses
readto capture the path. When prompted, paste the path starting with a slash and press Enter. Do not paste a file manager URI or include extra quotation marks.Check package details
Use the relevant command to check the package name, version, and architecture. If the architecture does not match, choose another package. If the command says the file does not exist, fix the path first; do not mistake a path error for a dependency issue.
Install with the package manager
Use
apton Debian or Ubuntu, anddnfon Fedora. Run only the command set for your system, and check the package name and dependency changes in the installation summary before proceeding.Launch as a regular user
After installation, launch v2rayN from your desktop application menu. Do not use
sudoto open the main window. Go to Settings → Parameter Settings and note the local listening configuration. If you already have a working subscription, select a node and test the connection before setting up autostart.
Debian and Ubuntu: use apt
printf '%s' 'Enter the absolute path to the DEB file: '
IFS= read -r pkg
dpkg-deb -f "$pkg" Package Version Architecture && sudo apt install "$pkg"
If a dependency has no installation candidate, run sudo apt update first and check for repository errors, then try again. If an earlier dpkg -i left packages unconfigured, you can run sudo apt --fix-broken install. Read the summary carefully first: if dependencies cannot be satisfied, the proposed fix may remove the partially installed package.
Fedora: use dnf
printf '%s' 'Enter the absolute path to the RPM file: '
IFS= read -r pkg
rpm -qp --queryformat '%{NAME} %{VERSION}-%{RELEASE} %{ARCH}\n' "$pkg" && sudo dnf install "$pkg"
If you see nothing provides, note the dependency or library name that follows and check your distribution version and enabled repositories. If repository metadata is stale, retry with sudo dnf --refresh install "$pkg". If the dependency is still unavailable, use a build compatible with your system. Do not skip dependency checks or mix in system libraries from another distribution.
Set up autostart and keep the app in the tray
On a desktop, “autostart” usually means launching after you sign in to the graphical session, not at the login screen. Once the app works when launched manually, use only one autostart method. If your build has an autostart option under Settings → Parameter Settings, enable it and verify that it works. Otherwise, use the desktop session's autostart mechanism.
Start at login
- When it starts
- When the current user signs in to the graphical desktop
- Launch method
- Use the application launcher installed by the package
- User directory
${XDG_CONFIG_HOME:-$HOME/.config}/autostart
Choose either the app's built-in autostart or a manually added startup entry to avoid launching it twice.
Keep running in the system tray
- Window behavior
- If there is a minimize-to-tray option, enable it and test it
- Desktop support
- Check that the desktop panel can show status icons
- Quit behavior
- Use Quit to end the process; hiding the window is not the same as quitting
Tray visibility depends on the desktop environment. If the icon is missing, check whether the process is running before changing settings.
If you need to add an entry manually, use dpkg -L or rpm -ql with the package name you found earlier to locate the package's main .desktop file. Open it in a text editor and check Name= and Exec= to confirm that it launches v2rayN, then copy it to your user autostart directory. Run the commands below in a regular user's terminal and enter the launcher's absolute path, not the package path.
printf '%s' 'Enter the absolute path to v2rayN's .desktop file: '
IFS= read -r launcher
autostart_dir="${XDG_CONFIG_HOME:-$HOME/.config}/autostart"
if [ -f "$launcher" ]; then
mkdir -p -- "$autostart_dir" && cp -i -- "$launcher" "$autostart_dir/"
else
printf '%s\n' 'Launcher not found. Check the path you entered.'
fi
If a launcher already exists, do not overwrite it without checking whether it is already enabled in the desktop's autostart settings. If launching from the application menu works but the app does not start after signing in again, check the user copy for Hidden=true, OnlyShowIn, and NotShowIn, and make sure the program referenced by TryExec still exists. To disable a manually added autostart entry, remove only the copy in your user directory; keep the system application-menu entry.
After signing in again, check the process, port, and proxy
Save your work, sign out, and sign back in to the same desktop account. Do not launch the app from the menu yet, so you can tell whether it started with the session. Check the system monitor for a v2rayN process. Once the main program is running, check the core logs and local ports. The address and port below are examples; use the values shown under Settings → Parameter Settings.
ss -ltnp 'sport = :10808'
- Main process not running: Check the autostart entry, account, and desktop session first; reinstalling the package is unnecessary. If the app still fails to start manually, check
Exec=in the application launcher and review the error output. - Main process running, but no listening port: First confirm that the command is checking the configured port. Then check the client logs for a core process exit or an address already in use. If another process is listening, identify it before deciding whether to stop the old instance or change the port.
- Port is listening, but the browser is not using the proxy: A listening port only confirms that the local endpoint is open. Check v2rayN's system proxy mode and whether the browser follows the system proxy. If the browser is configured manually, its address, port, and proxy type must match the local endpoint. Visit a site that normally loads and compare the connection logs from the same time to see whether the request reached the client and which outbound route it matched.
Common installation and autostart issues
apt says it cannot find the DEB package, even though it was downloaded. Why?
When passing a local file to apt install, include its path. For a file in the current directory, prefix the filename with ./, or use its absolute path. If you provide only the filename, apt searches the repositories for a package with that name. If the path contains spaces, pass the entire path as a single argument.
No tray icon after signing in—does that mean autostart failed?
Check the system monitor for a v2rayN process first. If the process is running but there is no icon, check whether the desktop panel supports status icons and whether the client is configured to minimize to the tray. If your desktop cannot show tray icons, keep the main window visible or minimize it to the taskbar so you do not lose access to it.
It starts manually, so why did autostart stop working after an upgrade?
Use the new package's file list to find the system launcher again, then compare its Exec= and TryExec= entries with the user autostart copy. If the executable has moved, replace the old copy with the new launcher and remove any duplicate entries that point to the old path. Sign out and back in to verify.