Subspace install

Subspace install

apt update && apt upgrade -y

Step 1 — Install WireGuard

add-apt-repository ppa:wireguard/wireguard

apt update

apt install wireguard

apt autoremove dnsmasq


nano /etc/network/interfaces
echo nameserver | sudo tee /etc/resolv.conf

netplan apply

sudo ufw allow 80
sudo ufw allow 443

Also, as port 51820/udp is the default WireGurad port, we need to make sure that it is open as well:

sudo ufw allow 51820/udp

Step 2 — WireGuard modules

modprobe wireguard
modprobe iptable_nat
modprobe ip6table_nat

Once the modules have been enabled you need to run the following commands in order to enable the modules when the server gets rebooted:

echo "wireguard" | sudo tee /etc/modules-load.d/wireguard.conf
echo "iptable_nat" | sudo tee /etc/modules-load.d/iptable_nat.conf
echo "ip6table_nat" | sudo tee /etc/modules-load.d/ip6table_nat.conf

Finally check if systemd-modules-load service is active:

sudo systemctl status systemd-modules-load.service

Step 3 – Enable packet Packet forwarding

In order to get WireGuired to work as expected, we need to make sure that package forwarding is enabled. Packet forwarding means allowing packets to go from one network to another.

To do that you need to run the following commands:

sudo sysctl -w net.ipv4.ip_forward=1
sudo sysctl -w net.ipv6.conf.all.forwarding=1

apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common

curl -fsSL | sudo apt-key add

sudo add-apt-repository “deb [arch=amd64] bionic stable”

sudo apt update

install docker….
apt-get install docker-ce docker-ce-cli

systemctl start docker
systemctl status docker

systemctl enable docker
systemctl daemon-reload

docker create \
–name subspace \
–restart always \
–network host \
–cap-add NET_ADMIN \
–volume /usr/bin/wg:/usr/bin/wg \
–volume /data:/data \
–volume /lib/x86_64-linux-gnu/ \
–volume /lib64/ \

Then start your container:

sudo docker start subspace

docker logs subspace

WordPress Appliance - Powered by TurnKey Linux