Install VpnHood! CLIENT on Linux
One command installs the app, with a window on a desktop and a set of commands everywhere, so it also runs on a machine with no screen.
Before you start
- An access key from whoever runs the server, as VpnHood! CLIENT has no servers of its own.
- Check that your machine meets the Linux requirements.
Install
Run this command, and answer its one question: whether the VPN service starts at boot. It picks the right build for your processor.
sudo su -c "bash <( wget -qO- https://github.com/vpnhood/VpnHood/releases/latest/download/VpnHoodClient-linux.sh)"It installs the VPN service and the vhclient command. On a machine with a desktop, it also adds VpnHood! CLIENT to the application menu.
Connect
On a desktop, open VpnHood! CLIENT from the application menu, add your access key and connect.
From a terminal, or on a machine with no desktop, add your access key, connect, and check the connection:
vhclient profile add 'vh:...'vhclient connectvhclient statusvhclient profile add also takes the path of a file holding the key. With several profiles, choose the one to connect with: vhclient profile set-default.
Commands
They work from any administrator's terminal, without sudo. vhclient --help lists them all, and vhclient connect --help explains one.
| Command | What it does |
|---|---|
vhclient connect | Connects, and waits for the result. --location chooses a location, as vhclient locations lists them.
|
vhclient disconnect | Disconnects. The service keeps running. |
vhclient status | Shows the connection and any update on its way. --watch keeps printing it.
|
vhclient locations | Lists the server locations you can connect to. |
vhclient profile list | Lists your profiles, and marks the one that connects. |
vhclient profile add | Adds a profile from an access key, or from a file holding one. |
vhclient profile remove | Removes a profile. |
vhclient profile set-default | Chooses the profile vhclient connect uses.
|
vhclient ui | Opens the app's window. |
vhclient service status | Shows whether the service is running. |
vhclient service log | Shows the service's log. -f follows it.
|
vhclient service restart | Restarts the service, which disconnects the VPN. It asks for your password. |
Connect at startup
With Always On, the VPN connects as the computer starts, before anyone signs in. While the server is out of reach it tries again, waiting longer each time. It stops when you disconnect, when another VPN app takes over, or when the server refuses the connection. Switch it on in the app's Settings, or with this command:
vhclient always-on onKill switch
The kill switch lets nothing out but the VPN tunnel, through an error, a crash and a reboot. With until-disconnect the block ends when you disconnect, and with lockdown it stays after a disconnect too:
vhclient kill-switch until-disconnectTo lift the block, run vhclient kill-switch off. With the service stopped, run it with sudo.
Updates
The app updates itself: at boot and every 12 hours it looks for a newer version, downloads it, and installs it while the VPN is disconnected. Automatic Updates in the app's Settings turns this off. This command installs a newer version at once, even with updates off, and the VPN disconnects while it installs:
vhclient updateInstaller options
For a script, or a machine with no desktop, add these to the install command, after its closing bracket:
| Option | What it does |
|---|---|
-q | Asks no questions. A new install starts at boot and updates itself; an update keeps the choices you made. |
-noautostart | Does not start the service at boot. |
-noautoupdate | Does not update the app by itself. |
-autoupdate | Updates the app by itself again, after -noautoupdate.
|
-nodesktop | Installs the service and the commands only: no menu entry and no libraries for the window. |
-desktop | Installs the menu entry and the window's libraries even where no desktop is found. |
-help | Lists the options. |
For example, with no questions and no desktop:
sudo su -c "bash <( wget -qO- https://github.com/vpnhood/VpnHood/releases/latest/download/VpnHoodClient-linux.sh) -q -nodesktop"Uninstall
Right-click VpnHood! CLIENT in the application menu and choose Uninstall, or run this command:
sudo /opt/VpnHoodClient/vhuninstallIt keeps your settings in /opt/VpnHoodClient/storage for a later install. Add -purge to delete them too.
When something is wrong
| What you see | What to do |
|---|---|
The VpnHoodClient service is not running.
| Run sudo vhclient service start, then read vhclient service log.
|
| The menu entry does nothing | Run vhclient ui in a terminal to see why. It is usually a library missing after an install with -nodesktop.
|
| The window says only an administrator can use the app | Add your account to the sudo group, or to wheel where the system uses that one, then sign in again.
|
| The app says another VPN app took over | Only one app made with VpnHood! connects at a time, so connecting another one disconnects this one. It stays off, even with Always On, until you connect it again. |
Could not set the VPN's DNS servers.
| Run sudo systemctl enable --now systemd-resolved, then link /etc/resolv.conf to /run/systemd/resolve/stub-resolv.conf, as the message says.
|
The kill switch needs nftables (nft), which is not installed.
| Install the nftables package, or turn the kill switch off.
|
| Connected, but nothing loads | Read vhclient service log -n 100.
|
The VPN cannot use its interface name
| Another VPN has an interface called VpnHoodClient, and the message says whose it is. Stop that VPN, or if it is gone and left the interface behind, run sudo ip link delete VpnHoodClient.
|