I've made a server on my raspberry and a mobile app to control it. I can connect to it when my mobile is connected to the same net, but I cannot do it outside of the net.
Actually I'm using ngrok to reach it but the session expires in 8 hours.
Is there any way to keep it on all the time I want? (or kind of, like a script that auto execute ngrok if the system detects that is not running)
And without ngrok how could I reach that server?
There's a bunch of things happening here, so let's break it down. Session Status and Session Expires – ngrok limits your sessions to eight hours on the free version. You can pay to get longer sessions.
If you sign up for an account on ngrok.com, whether free or paid, you will have tunnels that run with no time limit (aka "forever"). It is only limited to 2 hours for anonymous sessions, but if you sign up on the website and use an ngrok authtoken associated with that account, you will have no time limit.
You can keep the ngrok on all the time by using the authtoken. https://ngrok.com/docs#authtoken
First, go to ngrok website and login with an account. Then, go to the dashboard and get the token from Step 3 (Connect your account).
Run the command
ngrok authtoken <YOUR_TOKEN>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With