Setting up remote access to PioreactorUI

If you would like to expose the PioreactorUI to view over the internet (no authentication is provided however), you can use a service like Ngrok to do so.

⚠️ This exposes your PioreactorUI and RaspberryPi over the internet. You should at the very least have a strong password on your RaspberryPi, and also install a software like fail2ban to restrict malicious SSH attempts. 

The following are the steps to take:

  1. Sign up for Ngrok - the free plan is all we need.
  2. Download app onto the RaspberryPi: wget -o ngrok.zip https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-arm.zip
  3. Unzip unzip ngrok-stable-linux-arm.zip
  4. Make a new folder for the program: sudo mkdir /opt/ngrok
  5. Move ngrok file there: sudo mv ngrok /opt/ngrok
  6. Make a config folder: mkdir ~/.ngrok2
  7. Fill in the following: nano ~/.ngrok2/ngrok.yml
    
    authtoken: <add your ngrok auth token here>
    tunnels:
      ui:
        proto: http
        addr: 9000
        subdomain: <some_name>
        inspect: false
        bind_tls: false
      ws:
        proto: http
        addr: 9001
        subdomain: <some_name>ws
        inspect: false
        bind_tls: false
    
  8. (Optional) Along with ui and ws, you can also add SSH access. It's important to have a strong password on the Rpi if doing this.
    
      ssh:
        proto: tcp
        addr: 22
        inspect: false
    
  9. Run in background nohup /opt/ngrok/ngrok start ui ws --config ~/.ngrok2/ngrok.yml &
  • Alternatively, if you wish to set this up as a service that will launch on start up, the following sudo cp /home/pi/pioreactor/system/systemd/ngrok.service /lib/systemd/system/ && sudo systemctl enable ngrok
  1. On your ngrok dashboard, under Endpoints -> Status, you'll see two urls. One of the unique urls should link to your Pioreactor dashboard.
  2. The other url is added to your config.ini (under Configuration in the Pioreactor UI):
    
    [remote]
    ws_url=<something>.ngrok.io
    
  3. Hit [Save].

  4. You're all done! You can now access the Pioreactor UI anywhere at http://some_name.ngrok.io

← Back to all documentation