Installer options
The install commands ask a few questions as they run. Their options answer them in advance, so a script can install the server with no one at the keyboard.
The Linux installer
The standalone install command asks up to four questions: Start the server at boot (Y/n)?, Keep the server up to date by itself (Y/n)?, Keep the operating system patched, restarting at night when a fix needs it (y/N)? and Minimum client protocol version (8-15, Enter for 8)?. For the first two, Enter picks the capital letter: yes on a new install, and on a server installed before, what it does now. The third comes only where the installer can set up operating system updates, and Enter keeps what the machine has: no on a new install. For the fourth, Enter keeps the server's minimum, 8 on a new install, which lets every app in.
| Option | What it does |
|---|---|
-q | No questions. Without the options below, a new install starts at boot, updates itself and lets every app in, and a server installed before keeps its choices. |
-noautostart | Answers no to the first question: the server does not start at boot. A new install then has no service, so you start the server yourself. |
-noautoupdate | Answers no to the second question: the server does not update itself. |
-osupdate | Answers yes to the third question: the operating system installs its security fixes every night, and restarts when one needs it. See Operating system updates. |
-minClient | Answers the fourth question with a number from 8 to 15: the oldest app protocol the server accepts. Turn away probes says when to set 15. A managed server takes its minimum from its server profile.
|
-help | Lists the options, and installs nothing. |
Options go at the end of the install command, inside its quotes.
For example, in a script, with no questions
sudo bash -c 'u=https://github.com/vpnhood/VpnHood.App.Server/releases/latest/download/VpnHoodServer-linux.sh; bash <(wget -qO- $u 2>/dev/null || curl -fsSL $u) -q'To change an answer later, run the install command again, without -q, and give the new answer. The server keeps its settings and access keys, and is updated to the latest release.
Operating system updates
With -osupdate, or a yes to its question, the installer has the system's own updater install its security fixes every night, at a time it picks between 02:00 and 04:30 on the machine's clock, and restart the machine shortly after when a fix needs it. Each server picks its own time, so the servers of a farm seldom restart together. This works on Debian, Ubuntu and the distributions based on them, and on the Red Hat family from version 9, such as AlmaLinux and Rocky Linux. Elsewhere, and in Docker, the installer says it can't, and installs the server anyway.
To turn them off, run the install command again without -q and answer n. The installer removes only what it set up, and the system's own update settings stay as they were: Debian and Ubuntu, for one, keep installing security fixes but no longer restart. The uninstaller leaves them on, as they serve the machine rather than the server, and shows the commands that turn them off.
The Docker installer
The Docker install command asks one question: Install Docker (y/n)?. Type y to have it install Docker and its compose plugin, which it can do on Ubuntu, Debian and the distributions based on them, or n if the machine has them already.
| Option | What it does |
|---|---|
-install-docker | Answers yes to the question: installs Docker and its compose plugin, unless the machine has them already. |
-q | No question: Docker is installed only with -install-docker.
|
For example, in a script, installing Docker too if the machine does not have it
sudo bash -c 'u=https://github.com/vpnhood/VpnHood.App.Server/releases/latest/download/VpnHoodServer.docker.sh; bash <(wget -qO- $u 2>/dev/null || curl -fsSL $u) -install-docker -q'Options MANAGER fills in
Both installers also take -httpBaseUrl, -httpAuthorization and -managementSecret. They replace the server's /opt/VpnHoodServer/storage/appsettings.json with one that connects it to VpnHood! MANAGER, which makes it a managed server. You do not type them: the install command MANAGER shows for a server has them filled in, as Add a server shows.
The uninstaller
The uninstaller of a server installed without Docker takes one option, -purge, which deletes the server's settings, access keys and certificates too. See Uninstall.
Next steps
- Create the access keys your devices connect with, on Linux or in Docker
- Set the IP addresses the server listens on and puts in its keys
- Use a domain name and a trusted certificate
- Keep your server's IP address from being blocked