This installation assumes you have a clean Debian installation.
apt update
apt upgrade
apt dist-upgrade
apt install vim
reboot
apt install ufw
ufw allow OpenSSH
ufw enable
systemctl start ufw
curl -O https://raw.githubusercontent.com/angristan/wireguard-install/master/wireguard-install.sh
chmod +x wireguard-install.sh
./wireguard-install.sh
After script:
ufw allow in on wg0
ufw allow {WIREGUARD_PORT}/udp
apt install wget gpg coreutils
wget -O- https://apt.releases.hashicorp.com/gpg | \
gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" \
| tee /etc/apt/sources.list.d/hashicorp.list
apt update && apt install nomad
Edit the file /etc/nomad.d/nomad.hcl
and replace it with this content.
mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
apt update
apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin
ufw allow in on docker0
touch /etc/systemd/system/nomad.service
Edit the file /etc/systemd/system/nomad.service
and insert this content.
systemctl enable nomad.service
systemctl start nomad.service
Done! A sample task which contains traefik can be found here.