Mauro Morales

software developer

Tag: Open Source

  • Remote Setup with EdgeVPN

    Last week I started using my old 13″ laptop and left the bulky 15″ workstation permanently at my desk. This setup gives me portability without loosing power when I’m connected to my home network. Today, I decided to configure EdgeVPN on both devices to also have this setup while on the road.

    EdgeVPN makes use of tokens, to connect nodes to a network. Since I have a Nextcloud server, which keeps files in sync on both of my laptops. I decided to put the EdgeVPN configuration file there and created a small script that reads from it to generate the token, and decide which IP to give to each device, based on their hostname:

    TOKEN=$(cat /path/to/Nextcloud/edgevpn-config.yaml | base64 -w0)
    if [ "$(hostname)" = "zeno" ]; then
    elif [ "$(hostname)" = "seneca" ]; then
    if [ "$IP" = "" ]; then
    	echo "IP not configured for $(hostname)"
    	exit 1
    	echo Using IP: $IP
    edgevpn --token="$TOKEN" --address="$IP/24"

    Plus I created systemd services so I can make use of systemctl instead of having to remember the name of that shell script


    On any of the nodes, I can start EdgeVPN’s web UI and list all connected nodes