VpnHood!

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 connect
vhclient status

vhclient 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.

CommandWhat it does
vhclient connectConnects, and waits for the result. --location chooses a location, as vhclient locations lists them.
vhclient disconnectDisconnects. The service keeps running.
vhclient statusShows the connection and any update on its way. --watch keeps printing it.
vhclient locationsLists the server locations you can connect to.
vhclient profile listLists your profiles, and marks the one that connects.
vhclient profile addAdds a profile from an access key, or from a file holding one.
vhclient profile removeRemoves a profile.
vhclient profile set-defaultChooses the profile vhclient connect uses.
vhclient uiOpens the app's window.
vhclient service statusShows whether the service is running.
vhclient service logShows the service's log. -f follows it.
vhclient service restartRestarts 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 on

Kill 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-disconnect

To 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 update

Installer options

For a script, or a machine with no desktop, add these to the install command, after its closing bracket:

OptionWhat it does
-qAsks no questions. A new install starts at boot and updates itself; an update keeps the choices you made.
-noautostartDoes not start the service at boot.
-noautoupdateDoes not update the app by itself.
-autoupdateUpdates the app by itself again, after -noautoupdate.
-nodesktopInstalls the service and the commands only: no menu entry and no libraries for the window.
-desktopInstalls the menu entry and the window's libraries even where no desktop is found.
-helpLists 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/vhuninstall

It keeps your settings in /opt/VpnHoodClient/storage for a later install. Add -purge to delete them too.

When something is wrong

What you seeWhat to do
The VpnHoodClient service is not running. Run sudo vhclient service start, then read vhclient service log.
The menu entry does nothingRun 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 appAdd 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 overOnly 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 loadsRead 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.

Next steps