In the following, we give examples for Debian-based operating systems using the
apt
package manager. If you are using an OS with a different package manager (for example, Fedora Linux with theyum
package manager), please adapt the commands shown to your specific system.
First, please ensure that your system is up-to-date and has the latest OS kernel installed.
sudo apt-get update
sudo apt-get upgrade
Next, install the Docker
runtime, as well has the docker compose
plugin. Create a file install-docker.sh
with the following contents:
#!/bin/bash
# This file is install-docker.sh
# Set terminal output
set -xe
# Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
# Install docker compose plugin, adjust version as necessary
mkdir -p ~/.docker/cli-plugins/;
curl -SL https://github.com/docker/compose/releases/download/v2.18.1/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose;
chmod +x ~/.docker/cli-plugins/docker-compose;
Then set this file as executable and run it to add the docker
and docker compose
commands to your system:
chmod a+x install-docker.sh
./install-docker.sh
The following commands should run successfully and print the version numbers for docker
and docker-compose
:
docker -v
docker compose version
Finally, install the native WireGuard® network protocol and kernel extensions for your OS:
sudo apt-get update
sudo apt-get install -y wireguard wireguard-dkms wireguard-tools
The following command should run successfully and print the version number for wireguard-tools
:
wg -v
Now it is time to reboot the host:
sudo reboot now