-
Currently I run the script on a linux VPS (5.10.0-23-amd64 #1 SMP Debian 5.10.179-1). It's a terminal only VPS so hosting analytics on there locally doesn't work. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I figured out myself and I will leave this here for other people. Here is what I did:
Warning: If you connect to your VPS via ssh you have to enable that port too on ufw!
Now you can access your Analytics via http://<IP_OF_YOUR_VPS>:5000/ from anywhere on any device! |
Beta Was this translation helpful? Give feedback.
-
i got port error No open ports detected, continuing to scan... |
Beta Was this translation helpful? Give feedback.
I figured out myself and I will leave this here for other people. Here is what I did:
In my script file I run I changed the IP to run analytics on like this: twitch_miner.analytics(host="0.0.0.0", port=5000, refresh=5, days_ago=7)
In the AnalyticsServer.py class I changed the host to host: str = "0.0.0.0", (idk if this is needed but it didnt break it either)
On my VPS I installed ufw and allowed traffic on port 5000
sudo apt update
sudo apt install ufw
sudo ufw allow 5000/tcp
sudo ufw enable
Warning: If you connect to your VPS via ssh you have to enable that port too on ufw!
I looked up the IP of my VPS with curl ifconfig.me.
Launch your script on the VPS. Done.
Now you can …