pyngrok multiple sessions setup
Hi, i'm trying to run 2 python files with pyngrok, but i receive next error:
The ngrok process errored on start: authentication failed: Your account is limited to 1 simultaneous ngrok agent session.
You can run multiple tunnels on a single agent session using a configuration file.
To learn more, see https://ngrok.com/docs/ngrok-agent/config/
i tried to change ngrok.yml file:
version: "2"
authtoken: *********
tunnels:
first:
addr: 8443
proto: http
second:
addr: 8444
proto: http
And my .py files
1 file:
public_url = ngrok.connect(8443, "http").public_url
2 file
public_url = ngrok.connect(8444, "http").public_url
How to use multiple sessions with free acc and pyngrok?
Make sure you are using the latest version of pyngrok that uses version 3.x of the ngrok Agent. The older version uses version 2.x of the ngrok Agent which starts both an http and https tunnels for the same endpoint by default. Defining two tunnels in the config file actually starts 4 tunnels. Version 3.x only starts the https tunnel by default.