1. Via ngrok (Preferred)
- Install pyngrok on the remote machine using the command
pip install pyngrok. - Create a free account on ngrok and verify your email. Find ‘Your Authtoken’ on the dashboard.
- In jupyter notebook, after launching phoenix set its port number as the
portparameter in the code below. Preferably use a default port for phoenix so that you won’t have to set up ngrok tunnel every time for a new port, simply restarting phoenix will work on the same ngrok URL. -
- “Visit Site” using the newly printed
public_urland ignore warnings, if any.
NOTE:
Ngrok free account does not allow more than 3 tunnels over a single ngrok agent session. Tackle this error by checking active URL tunnels usingngrok.get_tunnels() and close the required URL tunnel using ngrok.disconnect(public_url).2. Via SSH
This assumes you have already set up ssh on both the local machine and the remote server. If you are accessing a remote jupyter notebook from a local machine, you can also access the phoenix app by forwarding a local port to the remote server via ssh. In this particular case of using phoenix on a remote server, it is recommended that you use a default port for launching phoenix, sayDEFAULT_PHOENIX_PORT.
- Launch the phoenix app from jupyter notebook.
-
In a new terminal or command prompt, forward a local port of your choice from 49152 to 65535 (say
52362) using the command below. Remote user of the remote host must have sufficient port-forwarding/admin privileges. - If successful, visit localhost:52362 to access phoenix locally.
Closing ssh tunnel:
Simply runexit in the terminal/command prompt where you ran the port forwarding command.
