Clash Verge on Ubuntu: How to Import a Subscription and Enable systemd Autostart
Why Ubuntu Desktop Users Ask About Autostart
On Ubuntu and other Linux desktops, the most frustrating failure mode for a proxy client is deceptively simple: everything works during the first session, then a restart leaves you wondering why the browser suddenly behaves as if no Clash Verge instance exists. Unlike mobile operating systems that aggressively revive VPN-style tunnels, a traditional desktop session starts clean. Unless you wire an explicit autostart path, the graphical client simply does not come back, which feels like a broken install even when the package itself is fine.
This article focuses on Clash Verge Rev, a maintained desktop GUI built around the Mihomo kernel (the lineage commonly called Clash Meta). The goal is practical: install the app, import a subscription, confirm traffic flows, and then make that state survive logout, reboot, and the occasional kernel update. Where possible, we will prefer mechanisms you can audit in plain text—systemd unit files and standard XDG autostart entries—rather than opaque click-only toggles that differ between releases.
What You Need Before You Begin
Collect three things before touching packages. First, know your CPU architecture. Most Ubuntu laptops and desktops are amd64; ARM Chromebooks and some SBCs need an arm64 build. Installing the wrong architecture is an immediate hard failure. Second, keep a private copy of your subscription URL in a password manager or encrypted note. That URL is effectively a long-lived credential; screenshots and chat logs are the fastest way to leak it. Third, decide whether you will rely on system proxy mode (applications that honor HTTP_PROXY / GNOME proxy settings) or on TUN transparent routing for stubborn binaries that ignore environment variables. The import flow is the same; only the follow-up toggles change.
If you are migrating from Windows or macOS, skim our Clash Verge Rev tutorial for Windows and macOS first. The vocabulary—profiles, proxy-groups, rule order—maps directly to Linux, even though packaging and permissions differ.
Installing Clash Verge Rev on Ubuntu
Linux distributions rarely ship Clash GUIs in the main archive, so you will almost always install from an upstream release artifact. Two common shapes appear in the wild: a self-contained AppImage you mark executable and run, or a .deb package that drops binaries and desktop metadata into predictable paths. Both are legitimate; pick the one your provider documents and that you can verify.
For an AppImage, download the file, run chmod +x ./Clash*.AppImage (adjust the filename), and launch it once from a terminal so you can read any missing library errors immediately. Ubuntu usually has enough GTK stack for modern Electron-style GUIs, but if the binary complains about a specific .so, install the suggested package from the error text rather than guessing. For a .deb, prefer sudo apt install ./package.deb so dependencies resolve through apt, then start the app from the applications menu to confirm the desktop file registers correctly.
Whichever route you choose, avoid running random scripts that curl-to-bash from untrusted mirrors. If you need a curated list of installers for end users, start from our download page and treat GitHub or vendor pages as secondary references for checksums and release notes, not as the only navigation path.
Permissions, Polkit, and TUN on Linux
Clash Verge Rev on Linux may prompt for elevated assistance when enabling TUN mode or installing a helper that creates a virtual interface. Those prompts exist because creating tun devices and altering routing tables crosses a privilege boundary. Accept prompts only when you understand what the app is asking for; if your desktop environment blocks Polkit dialogs, run the app from a terminal once to surface the error text.
For readers who plan to live in TUN rather than manual proxy variables, continue with our Clash TUN mode guide after you finish subscription import. It explains how transparent capture interacts with DNS, fake-ip, and capabilities in more depth than a single Ubuntu appendix allows.
Subscription Import on Linux
Open Clash Verge Rev and locate the subscription or profile panel—wording shifts slightly between releases, but the workflow is stable. Choose import from URL, paste the HTTPS link your provider issued, give the profile a memorable name, and save. Trigger an immediate update so the client fetches YAML or the provider-specific format and expands it into outbound nodes. If the list stays empty, the problem is almost never “Linux is special”; it is TLS interception, a typo in the URL, an expired token, or a captive portal on the network you used while testing.
Set a sane refresh interval. Aggressive polling every few minutes wastes bandwidth and can trigger provider rate limits; extremely rare updates leave you on dead nodes without noticing. Many home users land near thirty minutes to a few hours, but follow whatever your operator documents. After the first successful fetch, open the proxy-group selector and run a latency test if the UI offers one, then pick a stable node before turning system proxy or TUN on globally.
For a cross-platform refresher on URLs, QR codes, and file imports, see how to add Clash subscription links on every platform; the Linux section there complements the Verge-specific screens described here.
System Proxy vs TUN for Everyday Ubuntu Use
On Ubuntu with GNOME, system proxy mode can be enough for browsers and CLI tools that respect environment variables, especially if you export HTTP_PROXY and HTTPS_PROXY in your shell profile. The trade-off is coverage: anything that hard-codes direct sockets or uses its own certificate store may bypass those hints. TUN mode pushes routing to the kernel path and catches far more traffic at the cost of complexity—helper installation, occasional conflicts with other VPN software, and stricter DNS alignment expectations.
Pick one primary strategy for your workstation, document it, and avoid flipping modes while debugging unrelated issues. Mixed states—TUN half enabled, environment variables pointing at a dead port—produce logs that look like total failure when each layer is merely inconsistent.
Making the Client Return After Reboot
Here is the heart of the user complaint: autostart. Some Clash Verge Rev builds expose an in-application “start with system” toggle. When it exists and works on your desktop, it is the lowest-friction option. Treat that toggle as a convenience layer, not a guarantee: upstream updates occasionally relocate settings, and desktop environments differ between stock Ubuntu, KDE spins, and window-manager-only setups.
When you need something you can version-control, two patterns dominate. The lightweight pattern is an XDG autostart .desktop file in ~/.config/autostart/ that executes the same command you already use manually. The heavier—but extremely reliable—pattern is a systemd user service that starts after the graphical session is available and restarts the client on failure. Both are standard Ubuntu skills and translate to other distributions with minimal edits.
Option A: XDG Autostart Desktop File
Create ~/.config/autostart/clash-verge-rev.desktop if the directory does not exist, create it first. The file should reference the absolute path to your AppImage or the packaged binary, set Terminal=false, and include StartupNotify=true so the session manager shows a coherent launch state. If you rely on a wrapper script that exports proxy variables before launching the GUI, point Exec= at that script instead of the raw binary.
Log out and back in to validate. Autostart entries load at session start; they will not retroactively fix a session that is already running. If nothing appears, open Startup Applications in GNOME and confirm the entry is not disabled.
Option B: systemd User Service
systemd user services live under ~/.config/systemd/user/. They integrate cleanly with systemctl --user enable --now, show up in journalctl --user -u, and restart according to policy you define. Below is a template you must adapt: replace the ExecStart path with your real binary or AppImage path, and adjust After= if your desktop targets a different milestone than graphical-session.target.
# Save as ~/.config/systemd/user/clash-verge-rev.service
[Unit]
Description=Clash Verge Rev (user)
After=graphical-session.target
[Service]
Type=simple
ExecStart=/home/YOUR_USER/Apps/clash-verge-rev.AppImage --no-sandbox
Restart=on-failure
RestartSec=5
[Install]
WantedBy=default.target
Reload the user daemon, enable the unit, and start it once:
systemctl --user daemon-reload
systemctl --user enable --now clash-verge-rev.service
Check status with systemctl --user status clash-verge-rev.service. If the service starts before your keyring or display server is ready, insert a short ExecStartPre=/bin/sleep only as a last resort—prefer correct After= dependencies. On Wayland-heavy sessions, some users keep the XDG desktop autostart path because it naturally aligns with the session manager; there is no moral superiority, only what is stable on your machine.
Enable Lingering if You Need the User Service Before Login
By default, systemd user services stop when the last session of that user ends. That is usually what you want on a shared computer. If you explicitly need the user service to survive logout on a single-user workstation, administrators can enable lingering with loginctl enable-linger $USER. Do not enable lingering casually on multi-user systems; it keeps user-level daemons alive even without an active graphical session, which can surprise people who expect logout to halt all their processes.
Verification Checklist After a Reboot
Reboot once on purpose after configuring autostart. Log in, wait for the desktop to settle, then confirm three facts before opening email or heavy browsers. First, the Clash Verge Rev window or tray icon is present without manual launch. Second, the subscription timestamp is fresh or the manual refresh succeeds. Third, a trivial probe—curling a small endpoint or loading a test page through your intended mode—shows the path you expect. If any step fails, capture logs immediately while the failure is reproducible; guessing after the fact wastes time.
When TUN was enabled before reboot, verify routes and DNS quickly. Stale resolv.conf overrides or a competing NetworkManager profile can mimic a “broken Clash” symptom even when the core is healthy. Disable other VPN clients temporarily while you bisect.
Troubleshooting Common Ubuntu Pitfalls
Empty node lists after import usually trace to TLS or URL mistakes. Try fetching the subscription with curl -v from the same machine; if curl fails, the GUI will fail for the same reason. Corporate intercept proxies and school networks are frequent culprits.
Autostart duplicates happen when both an in-app toggle and a systemd unit launch the client twice. Disable one path. Two instances fight over ports and produce chaotic logs.
Sandbox flags on Electron bundles sometimes require --no-sandbox on specific kernels or when certain security modules are strict. Treat that flag as a diagnostic lever, not a permanent comfort feature; if you need it permanently, read upstream guidance for your exact version.
Permission prompts every boot suggest the helper for TUN was not installed persistently or Polkit policy denies the action without a password. Re-run the in-app installer for the service component and watch for errors in journalctl --user or system logs.
Security and Hygiene Habits
Rotate subscription URLs when your provider allows it, especially after you suspect a leak. Keep release downloads on official channels, verify checksums when published, and delay auto-updating production laptops on day zero of a major release if you carry sensitive work. Back up a minimal YAML snippet or URL list outside the client so reinstalls are boring rather than catastrophic.
Closing Thoughts
Clash Verge on Ubuntu is not fundamentally different from other platforms once you respect Linux session lifecycle: the kernel and network stack are ready, but your GUI must be invited back after every boot. Pair a clean subscription import with an explicit systemd or XDG autostart path, validate once with a deliberate reboot, and the “works until restart” story goes away. Compared with ad-hoc scripts and forgotten terminal sessions, a declared unit file is easier to reason about six months later when you upgrade distributions.
When you want installers grouped by platform without chasing scattered release pages, consolidate discovery through our hub, then return here for Linux-specific startup wiring. → Download Clash for free and experience the difference.
Need YAML examples and rule concepts after the client is running? Browse our documentation page for structured next steps. Go to the download page →