Raspberry Pi setup

Set up TekLan VPN on Raspberry Pi

Use the Linux WireGuard or OpenVPN 3 route that matches your Raspberry Pi operating system.

Setup steps

Choose how to connect

WireGuard on Raspberry Pi OS

Install with wg-quick

Use this method on Raspberry Pi OS and other Debian-based distributions. Give the Raspberry Pi its own Dashboard profile rather than reusing one from another device.

Before you begin

  • Update Raspberry Pi OS and make sure the Raspberry Pi has working internet access.
  • Have an account with sudo access.
  • Keep local or SSH access available while changing the network route.

Move the WireGuard profile to the Raspberry Pi

  • Download profile: save the .conf file directly.
  • Email: select Send profile, then Send email.
  • Device access code: select Send profile, then Get code. On the Raspberry Pi, open dash.teklanvpn.com/get, enter the code and download the profile. The code expires after 15 minutes and works once.
WireGuard selected for a Raspberry Pi profile
Create a WireGuard profile for this Raspberry Pi.
WireGuard profile ready for Raspberry Pi
Review, create and download the profile.

Steps

  1. Run sudo apt update && sudo apt install wireguard openresolv. openresolv lets wg-quick apply the profile’s DNS setting.
  2. Move the downloaded file to /etc/wireguard/teklan.conf.
  3. Protect it with sudo chmod 600 /etc/wireguard/teklan.conf.
  4. Start the tunnel with sudo wg-quick up teklan.
  5. When the checks below pass, start it automatically after boot with sudo systemctl enable wg-quick@teklan.

Check the connection

  1. Run sudo wg show and look for a recent handshake.
  2. Run curl https://api.ipify.org and confirm the public IP address changed.
  3. Test the service the Raspberry Pi is intended to run before enabling automatic startup.

If it does not connect

  • Run sudo wg-quick down teklan to restore the previous route.
  • Check the Raspberry Pi date and time and confirm UDP traffic is allowed by the local network.
  • Download a new profile if the Dashboard profile was replaced or revoked.

Still stuck? See the help articles, or open a support ticket with the exact error you see.

OpenVPN alternative

Use OpenVPN 3 Linux

Choose this when WireGuard is unsuitable and OpenVPN 3 Linux supports the installed distribution and CPU architecture.

Get the OpenVPN profile

  • Download the .ovpn file directly or select Send profile, then Send email.
  • Select Show OpenVPN credentials. The displayed password unlocks the private key and is not your TekLan VPN password.
OpenVPN selected for Raspberry Pi
Create an OpenVPN profile.
Linux selected in the Dashboard
Choose Linux and obtain the profile and credentials.

Steps

  1. Install OpenVPN 3 Linux using the official repository instructions for the installed distribution and architecture.
  2. Import the profile with openvpn3 config-import --config /path/to/profile.ovpn --name TekLan --persistent.
  3. Start it with openvpn3 session-start --config TekLan.
  4. Enter the Dashboard OpenVPN password if asked for the private-key passphrase.
  5. Run openvpn3 sessions-list to confirm the session is connected.