Questions tagged [pyngrok]

pyngrok is a Python wrapper for `ngrok` that manages its own binary and puts it on your path, making `ngrok` readily available from anywhere on the command line and via a convenient Python API.

pyngrok is a Python wrapper for ngrok that manages its own binary and puts it on your path, making ngrok readily available from anywhere on the command line and via a convenient Python API.

ngrok is a reverse proxy tool that opens secure tunnels from public URLs to localhost, perfect for exposing local web servers, building webhook integrations, enabling SSH access, testing chatbots, demoing from your own machine, and more, made even more powerful with native Python integration through pyngrok.

52 questions
10
votes
1 answer

Tunnel not found error Pyngrok streamlit collab

I was developing an ui in streamlit and using pyngrok from Colab. everything was working fine till few days earlier the tunnel not found error started occurring. I am using below code. I have also upgraded pyngrok and tried but same problem…
imhaka
  • 37
  • 11
4
votes
5 answers

I'm Getting Ngrok Error 6022 after doing everything properly

You can refer to my images for details. This is the code I'm running on colab: from google.colab import drive drive.mount('/content/drive') cd /content/drive/MyDrive/mini !curl -s https://ngrok-agent.s3.amazonaws.com/ngrok.asc | sudo tee…
Programmer
  • 41
  • 1
  • 1
  • 3
4
votes
0 answers

Uvicorn Detect --reload Main Thread

I have a simple Uvicorn application (built with FastAPI). In development, uvicorn server:app --reload. The --reload paramter means two threads will be started, one with the server, one to monitor file changes—when a file change is detected, the…
alexdlaird
  • 1,174
  • 12
  • 34
3
votes
2 answers

Python OSError: [Errno 98] Address already in use but no port is used

I have problem with my code using flask(http, as main thread), ngrok and tcp server (both ngrok and tcp server is running on two threads) at the same time (see below for error message) Traceback (most recent call last): File…
user1538798
  • 1,075
  • 3
  • 17
  • 42
2
votes
1 answer

How can I prevent my python program from loading when using pyngrok?

I have the following function in my script import os, re from pyngrok import ngrok def server(): os.system('kill -9 $(pgrep ngrok)') ngrok.connect(443, "tcp") while True: ngrok_tunnels = ngrok.get_tunnels() …
1
vote
0 answers

why ngrok does not display css in html webpage?

code and directory structure for files The loaded webpage does not reflect styles.css on public url, this works fine for me localhost. I am running it on google-colab and trying to make a flask web app on it. how can i make index.html reflect the…
1
vote
2 answers

How can I run multiple ngrok sessions using pyngrok and a free account?

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…
Vadim M
  • 11
  • 2
1
vote
1 answer

using ngrok with python

How can I start ngrok with python and copy the public link just executing python script ? I tried with subprocess but it only launched the 'ngrok http 80' command , I want to copy the public link.
1
vote
0 answers

How to open only https port using pyngrok?

When I use PyNgrok library to open http port it creates 2 tunnels with http and https protocols. But when I use ngrok client provided by them, it only opens https tunnel. Is it possible to open only https tunnel with pyngork? ngork http 8080 from…
1
vote
1 answer

Pyngrok & Flask, Your account is limited to 1 simultaneous ngrok agent session

I trying to run both flask and ngrok in the same script for a program for my user so they dont need to setup ngrok manually.I tried pyngrok but i got an error. Script: from flask import Flask, request #ngrok ngrok.set_auth_token("Auth Key…
Najmi
  • 11
  • 1
  • 2
1
vote
2 answers

Python Ngrok get active ngrok agent session for use in Flask App

I am writing a Flask app that filters HTTP requests through an Ngrok tunnel. Everything works fine when I hard code the tunnel URL. The problem presented itself when I tried to introduce some automation logic to my program that checks if the there…
1
vote
1 answer

I Cant Use Pyngrok(certificate verify failed: certificate has expired)

I can't Use Pyngrok Every time I run a script with the module pyngrok it displays the error: Downloading ngrok ... Traceback (most recent call last): File "C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 1348, in…
1
vote
1 answer

How to use pyngrok with multi-threading?

i'm trying to run a python script with 3 threads one of them is to port forward coming connections to localhost using pyngrok using the threading module, but the issue is that whenever the ngrok server starts it hangs all other threads... def…
abuqasem
  • 23
  • 4
1
vote
2 answers

SSL Problem with Installing `ngrok` through `pyngrok`

from pyngrok import ngrok public_url = ngrok.connect(5000).public_url I've taken this 2 lines of code from the twilio's documentation for automating ngrok connection. Basically I'm just trying to establish a connection and take the web url to be…
1
vote
0 answers

Error on ngrok tunnel connection on Google Colaboratory

I'm following an example tutorial, so I am able to use Flask with Google Colab. When i run the code below, everything works fine, but when i try to visit the page i get a tunnel not found error. !pip install flask !pip install flask-ngrok from…
Olive Yew
  • 351
  • 4
  • 13
1
2 3 4