Setting up custom VPS
This setup is primarily designed for Raspberry Pi, but it also supports any Debian-based Linux distribution.
For the best performance and lowest latency, we recommend renting a VPS from a hosting provider located in your country.
When setting up the VPS, make sure to select Debian or Ubuntu as the operating system and confirm that the server offers enough bandwidth.
After your hosting provider gives you the server’s IP address and login credentials, you can connect to it using SSH. Once logged in, update the system packages and then proceed with the setup.
Install PiVPN
Official sources: https://www.pivpn.io/ and https://github.com/pivpn/pivpn
Run command in terminal:
curl -L https://install.pivpn.io | bashPress Enter to confirm until next step.

Select yes .

Select your user.

Select WireGuard.

Confirm default port 51820

Select DNS provider.
We recommend CloudFlare or Google. Use arrows and press space to confirm selection.

Choose static IP or DNS
If your server uses a static IP address, select the IP option.
If you’re using a hostname or have configured Dynamic DNS, choose the DNS option and enter the hostname.

Enable security patches.

Select No to "Reboot now?"

Update VPN's IP address range (optional)
We recommend updating your VPN’s IP address range by editing the file:
/etc/pivpn/wireguard/setupVars.confLocate the line that starts with
pivpnNETand replace the default randomly generated subnet with a custom range, for example:10.10.10.0
Run installation command again
curl -L https://install.pivpn.io | bashSelect Repair .

Run PiVPN
Run PiVPN using command:
pivpn -dIf the diagnostic detects an issue (such as the
missing iptables MASQUERADE rule), typeYwhen prompted. This will automatically fix the problem that prevents VPN clients from accessing the internet.

Reboot your system
Creating Clients
You will need a separate config for each client (Jetson, Ground stations, Android devices…)
To create a new config use:
pivpn -aThis will prompt you to choose a virtual ip address and name for this client. We recommend keeping a similar structure:
10.10.10.2 – 10.10.10.9 Ground stations
10.10.10.10 – 10.10.10.250 Jetsons

The generated client configurations are stored in
~/configs.Copy the appropriate file to each Jetson device as:
/etc/wireguard/air.confCopy the corresponding file to your ground station as:
/etc/wireguard/ground.conf
For Android devices
You can use the WireGuard app’s
Scan from QR codefeature.Run:
Select a client, and a QR code will be displayed in your terminal, ready to scan.
Last updated
