Skip to main content

Setup a Tunneling Solution (for local dev)

This guide walks you through setting up a Tunneling solution for local development.

To test locally, you need to install a tunnel solution to get an external url

Option 1: Using localtunnel ​

Install​

npm install -g localtunnel

Start​

Assuming supervaizer server runs on port 8000 (which it does by default)

lt --port 8000
# your url is: https://silly-peaches-chapter.loca.lt

# or optionally, set your own subdomain (if available)

lt --port 8000 --subdomain my_supervaizer_agent
# your url is: https://my_supervaizer_agent.loca.lt
Keep track of your url

Make note of the full url, for example https://my_supervaizer_agent.loca.lt. Store it in the SUPERVAIZER_PUBLIC_URL environment variable.

Option 2: Using ngrok ​

Installation​

brew install ngrok

Setup & Deploy​

Sign up to ngrok (free with limitations) to get a token

Configure
ngrok config add-authtoken <token>
Run
ngrok http 8000

# Or -optionally try to set the url (paid plans)
ngrok http 8000 --url my_supervaizer_agent.ngrok.dev
Ngrok Running
Update update available (version 3.26.0, Ctrl-U to update)
Version 3.22.1
Region United States (us)
Web Interface http://127.0.0.1:4040
Forwarding https://e83bc6b8acec.ngrok-free.app -> http://localhost:8000
Keep track of your url

Make note of the full url, for example https://my_supervaizer_agent.ngrok.dev. Store it in the SUPERVAIZER_PUBLIC_URL environment variable.

Set the public url​

Give the url to the controller with an environment variable or with an option of supervaizer start.

export SUPERVAIZER_PUBLIC_URL=https://my_supervaizer_agent.loca.lt
supervaizer start

# or use the option
supervaizer start --public-url https://my_supervaizer_agent.loca.lt

The --public-url option has priority over the environment variable.

SUPERVAIZER_HOST

SUPERVAIZER_HOST is the address that the server binds to. Do not put the tunnel host name in it.

What's next?​

Export your enviornment variable and start the server