koi
koi copied to clipboard
How do I set my ngrok authtoken?
I ran all of the notebook in colab, but requests fail with responses like:
$ curl -X POST http://2e04-34-90-174-157.ngrok.io/api/img2img
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1201 100 1201 0 0 2327 0 --:--:-- --:--:-- --:--:-- 2332<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta name="author" content="ngrok">
<meta name="description" content="ngrok is the fastest way to put anything on the internet with a single command.">
<meta name="robots" content="noindex, nofollow">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link id="style" rel="stylesheet" href="https://cdn.ngrok.com/static/css/error.css">
<noscript>Before you can serve HTML content, you must sign up for an ngrok account and install your authtoken. (ERR_NGROK_6022)</noscript>
<script id="script" src="https://cdn.ngrok.com/static/js/error.js" type="text/javascript"></script>
</head>
...
</html>
I've signed up for an ngrok account and got an authtoken, but how do I set it in this environment?
The notebook runs pip install ngrok - is that https://pypi.org/project/ngrok/?
Is it supposed to be https://pypi.org/project/pyngrok/ ?
Okay, I got it running by:
- Changing
pip install ngroktopip install pyngrok - Running
!ngrok authtoken <myauthtokenhere>immediately after
have you confirmed wether this is still necessary inside of colab? or is this an issue for non-colab notebooks?
@nousr I'm fairly sure this is an issue in Colab. Ngrok requires an authtoken, and fails if you don't set it, so when the user is setting up a new Colab instance, they somehow need to set their ngrok authtoken.
@guumaster it sounds like you also experienced this? Could you confirm?
Exactly, just followed this instructions. Maybe it should be added to README/notebook guide.