Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running on Raspberry Pi 3 through noip.com #9

Open
tiaringhio opened this issue Jan 23, 2019 · 10 comments
Open

Running on Raspberry Pi 3 through noip.com #9

tiaringhio opened this issue Jan 23, 2019 · 10 comments

Comments

@tiaringhio
Copy link

Hi! Thanks in advance for all the work you've done!
I successfully installed everything but i was wondering how i should edit the config file to run the dashboard from a pc not connected to the same Wi-Fi network as the raspberry pi on which i'm running InstaPy. My raspberry has port forwarding to a host created with noip and i would like to access the dashboard with somthing like this:

hostexample.hopto.org:3000

Thank you again!

@converge
Copy link
Owner

Hey @tiaringhio, thank you! and it's my pleasure!

I'm preparing some improvements in this aspect for the next weeks.

For now, you could just add your host to the configuration.js file on "allowedHosts" parameter.

@tiaringhio
Copy link
Author

Thank you @converge ! I can't wait

@tiaringhio
Copy link
Author

Just wanted to follow up by saying that it's working the way i described, thanks a lot @converge !
the only thing is that's it does not load te user statistics, i guess they'll come up after a few runs?

@GaWr26
Copy link

GaWr26 commented Mar 19, 2019

Hi guys,

I got this working on localhost and I love it. Thank you for this @converge!
Also I installed port forwarding and use noip to get to my network.
Unfortunately when accessing from a different machine in the same network or even from outside the page loads but I see the loading animation for ever.

Any ideas what could cause this?

Cheers

@GaWr26
Copy link

GaWr26 commented Mar 22, 2019

Managed to get it working from other machines on my network.
I found a different issue where someone mentioned to change:
REACT_APP_API_ENTRY_POINT
from localhost to the actual ip of the machine.

@flyingnobita
Copy link

Managed to get it working from other machines on my network and even from outside.
I found a different issue where someone mentioned to change:
REACT_APP_API_ENTRY_POINT
from localhost to the actual ip of the machine.

Thanks for your tip, I was experiencing the same problem and it helped me get it working from other machines on the same network. However I can't get it working outside my network. i.e. still seeing the loading animation running forever.

I've already:

  1. turned on port forwarding on my router (port 3000 on UDP and TCP)
  2. setup firewall exception on my Windows machine, even tried completely disabling it

But still not working.

Can you share what you did to your network configs?

Thanks.

@flyingnobita
Copy link

flyingnobita commented Apr 27, 2019

Ah, just realized from the browser console that it's due to a blocked CORS request. So not related to my networking setup (which makes sense and got me baffled earlier).

But how did you get around this problem? Did you add cors to the package source yourself or you got a more cleaver way?

@GaWr26
Copy link

GaWr26 commented Apr 29, 2019

@flyingnobita sorry mate, I made a mistake when I wrote the comment. I was actually accessing from inside my network but via the noip url. It doesn't actually work from outside. I also just get the loading animation.
If you find a fix I would be very interested.

@converge
Copy link
Owner

hey guys, it will work anywhere with the right setup, basically:
REACT_APP_API_ENTRY_POINT is the server your running the dashboard (and the API)
ALLOWED_HOSTS are the hosts that can actually connects to the API

Example:
the dashboard is at example.no-ip.com
the API is also running at example.no-ip.com
the setup will be:

REACT_APP_API_ENTRY_POINT=http://example.no-ip.com:3001
ALLOWED_HOSTS=http://example.no-ip.com:3000

In short: hitting http://example.no-ip.com:3000 will load the dashboard, the dashboard will try to connect to its API, the API will be set to http://example.no-ip.com:3001 , CORS will check if http://example.no-ip.com:3000 is allowed to use the API.

@flyingnobita
Copy link

Thank you for your reply. Got it to work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants