Link Search Menu Expand Document

Remote Access with PiVPN

Install PiVPN

Log into your Pi

This guide assumes that your Pi is at the address octopi.local. If it is at a different address, substitute octopi.local with that address in the following steps.
By default, OctoPi uses the username pi and the password raspberry. If you have changed the default password, use that instead in the following steps.

First, you will have to log in to a shell on your Raspberry Pi.

If you use macOS or Linux, open the Terminal app. Type ssh pi@octopi.local. When prompted for a password, enter the password (default raspberry).

If you use Windows, download, install, and run PuTTY. Enter octopi.local as the host name. Click open, and when prompted enter the username (default pi) and the password (default raspberry).

Run the PiVPN Installer

  1. First, update your package index files:
    sudo apt-get update
  2. Then, download and run the PiVPN installer:
    curl -L | bash
  3. Follow the steps in the setup wizard. Use the tab key to navigate between options, and the spacebar to select them. When asked to choose a VPN server to install, choose ‘WireGuard

You should now have a WireGuard server installed on your Raspberry Pi.

Setup WireGuard Client

  1. On your iOS device, download and install the WireGuard app from the App Store
  2. On your Raspberry Pi, run the pivpn add command to create a client configuration. When prompted, enter a name for the client (e.g. iPhone-12-Pro)

  3. Run the pivpn -qr command. This will show a list of clients. Enter the ID of the client you want to show a setup QR code for. Resize the terminal window to show all the QR code if necessary.

  4. Open the WireGuard app on your phone. Tap the add (+) button, then tap ‘Create from QR code’. Scan the code shown in the terminal window.
  5. Turn the switch on. If you are asked to enter your device password to allow WireGuard to add VPN configurations, do so.

You should now be able to use Polymer remotely! Make sure to turn on the VPN each time first.

Copyright © 2017–2022 Lachlan Bell

OctoPrint is a registered trademark of Gina Häußge. iOS, iPhone and iPad are trademarks of Apple Inc., registered in the U.S. and other countries.