logo elektroda
logo elektroda
X
logo elektroda

Configuration of a local Blynk server for external access on Windows

omnixcrs 2559 29
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 19880124
    omnixcrs
    Level 11  
    Hello,
    as you all know Blynk 1.0 is coming to an end. For me it's a problem because I use the application in my home in the cloud as it's important for me to have access from outside (outside the network at home). I have set up a local server on windows, the server is running - locally of course. A simple question: since I have an external IP address, can I somehow use this server from outside my home network?
  • ADVERTISEMENT
  • #2 19880158
    Anonymous
    Level 1  
  • ADVERTISEMENT
  • #3 19880427
    omnixcrs
    Level 11  
    Erbit wrote:
    Another solution is TeamViewer or Anydesk - this is such a remote connection to your home computer. These do not require a public IP.
    .

    I think we've misunderstood each other. I am not asking about accessing a computer from outside the home. I mean whether the Blynk app on my phone can be operated by me when I am away from home.
  • #4 19880440
    Anonymous
    Level 1  
  • ADVERTISEMENT
  • #5 19880474
    omnixcrs
    Level 11  
    I don't really know what this VPN is, but if I understand you correctly. That after creating "something" like this, every time before launching the Blynk app on the phone I will have to connect to something ?? - a somewhat unsatisfactory solution.
    I currently have the Blynk server running on an IP like this: 192.168.1.21:9443 - this is the IP I enter in the app. Is it not possible to redirect something so that I enter a different address in the application and so that the connection works when I am simply connected to the internet on the phone, be it via some wifi or simply LTE?
  • #6 19880480
    khoam
    Level 42  
    omnixcrs wrote:
    What I mean is whether the Blynk app on my phone can be operated by me when I am away from home.
    .
    It can be, provided you forward the relevant (network) ports on your internet access router - if you have one.
    This is described here: Link .
    It is not that simple.
  • #7 19880518
    omnixcrs
    Level 11  
    Thanks for the link Khoam, the whole thing is indeed complex, but I was curious about the ending which I don't understand:

    "Alternative (simpler) solution
    Although the solution above is somewhat complex, it allows me to use the same domain+port for internal and external purposes.
    If you simply want to access your blynk server from the internet, just forward homeip:8443 to 10.0.0.25:443 — but you already knew that… ;) "

    what is this option and what is it about ?
  • ADVERTISEMENT
  • #8 19880545
    Anonymous
    Level 1  
  • #9 19880551
    omnixcrs
    Level 11  
    Erbit wrote:
    Ani safe.
    .
    I wouldn't worry about that, in the application I only have to read some information and ask for irrelevant variables.
  • #10 19880563
    Anonymous
    Level 1  
  • #11 19880568
    omnixcrs
    Level 11  
    Erbit wrote:
    I would be concerned because it's not about the data you are sending but about the possibility of attacking a server on your network.
    .
    No exaggeration, I don't think some hacker would want to attack my server where there is nothing interesting or valuable.....
  • #12 19880577
    Anonymous
    Level 1  
  • #13 19880653
    khoam
    Level 42  
    If VPN connectivity to the local Blynk server is to be initiated from outside, then the only safe solution is to put your own VPN server behind the router (on your home network), so you still need to open the appropriate ports on the edge router for VPN incoming.

    In the solution I pointed out in post #6 it's not just a simple redirect on the edge router to the local Blynk server. It's a redirect to a virtual router (nginx in a docker container with packet filtering - so reasonably secure), and only then to the local Blynk on the same physical server.
  • #14 19881210
    omnixcrs
    Level 11  
    Ok, back to the substance of the problem, can you please write me how to simply redirect this port ? As I wrote above currently the server is on IP 192.168.1.21:9443.

    Added after 1 [hour] 13 [minutes]: .

    These are the settings I have in my router:

    Configuration of a local Blynk server for external access on Windows .

    Added after 2 [hours] 37 [minutes]:

    OK, I can see that the issue is difficult and complex. I must therefore seek paid help to organise this. However, before I start bothering someone I would like your confirmation that such a thing is at all possible, namely:
    I have two houses, one where I live permanently and the other a holiday home. In both I have devices set up Blynk are two separate projects on one account in BLYNK.
    I would like to create one server (Cloud). This could be done on a raspberry, NAS, or computer - whatever. I have an external IP at home so the location of this server needs to be at home. I only have mobile internet access at the holiday home. Is such a configuration possible ?
  • #15 19881812
    Anonymous
    Level 1  
  • #16 19881820
    kaczakat
    Level 34  
    Every router has this slightly differently, so look for your settings in your router's forum. In my case it's not the NAT tab, it's generally for something else. In my case it's in the WAN section and it's called port forwarding. E.g. I have an FTP server on a device with IP .244 then on the router I enter port forwarding, set the IP of the local host e.g. 192.168.0.244 and its port 21, protocol TCP/UDP or OBA, port from WAN e.g. 5467 and now to log in to this FTP from another location I enter IPexternal:5467 in the program.
    And you can do something like this even without an external IP if you can make a deal with the provider, in one location I didn't have an external IP, but the guy redirected a range of 20 ports and I could put out into the world FTP and a few devices to control them from the Internet. In the same way, I forwarded these ports to individual ports of my choice. There are also (used to be) VPS servers for a few $/year where there is no external IP, but you get a few ports included and you can also connect to e.g. Blink. But that's a thing of the past I used to have one for $3/year, now at the same company I see the cheapest one is $4/month, well but with an external IP.
    Helpful post? Buy me a coffee.
  • #17 19882077
    Anonymous
    Level 1  
  • #18 19882333
    omnixcrs
    Level 11  
    Gentlemen I have gone a little different way. I set up a Blynk server in a cloud from Google Cloud, obtained an external IP address and the server is running. I access it via the browser, log in to it without any problems via the Blynk app. Unfortunately, for a reason unknown to me, I cannot connect to a device, such as nodemcu or wemos.
    I log into the application via the server IP 34,125,xx,xxx and port 9443. I create a project, add the device, peak the token, upload the firmware on the NodeMcu and nothing ! I have used various, below listed, ways of zaspisu fuckji Blynk.begin and still offline. What could I be doing wrong?
    Blynk.begin(auth, ssid, pass, IPAddress(34,125,xx,xxx), 9443);
    Blynk.begin(auth, ssid, pass, IPAddress(34,125,xx,xxx), 8080);
    Blynk.begin(auth, ssid, pass, IPAddress(34,125,xx,xxx));
  • Helpful post
    #19 19882850
    khoam
    Level 42  
    omnixcrs wrote:
    I set up the Blynk server in a cloud from Google Cloud, obtained an external IP address and the server is running.
    .
    Have you unblocked ports 9443 and 8080 in your VM firewall settings (by creating new rules)?

    Configuration of a local Blynk server for external access on Windows .

    Two identical rules: for Ingress (incoming) and Egress (outgoing) traffic.
  • #20 19883289
    omnixcrs
    Level 11  
    I have it rather done, take a peek:
    Admittedly I have ports 9443 and 8443 there....
    Configuration of a local Blynk server for external access on Windows .
  • Helpful post
    #21 19883458
    kaczakat
    Level 34  
    I think I know what tutorial you were watching, yesterday I made myself this Google server based on this https://www.youtube.com/watch?v=YEZumoGXunk, but this video is out of date. The standard ports used to be 9443 for applications and 8443 for ESP (hardware), now it's 8080 as @khoam wrote. Swap that port and it will work, or force the server to run on port 8443, there is then a parameter to add at startup. I checked and it works OK, but I took the commands in the VM to download the java directly from Blink's GIT.
    Google's 3m free is a nice option, but for longer term there are slightly cheaper providers to be found here: http://lowendstock.com/ with IPs from $10/year, although prices are still rising.
    Helpful post? Buy me a coffee.
  • #22 19883769
    omnixcrs
    Level 11  
    Hello,
    kaczakat wrote:
    now it is 8080 as written
    - you are right, after the change it works :) .
    I just have a problem with setting so that even though SSH is closed, the server still works. Do you know maybe how to do it ??

    Added after 9 [minutes]: .

    kaczakat wrote:
    There are slightly cheaper providers to be found here: http://lowendstock.com/ with IP from $10/year, although prices are still rising.

    As for your suggestion of a cheaper VPS provider, which of their options would be suitable for Blynk ? They have quite a large selection, and I'm not quite sure what you might need. Just setting up a server on this won't be super difficult ???
  • Helpful post
    #23 19884066
    kaczakat
    Level 34  
    Choose such a VPS, for which you can find a tutorial on Youtube :D . And exactly the same operating system.
    Run blynk like this: java -jar server-0.41.16-java8.jar -dataFolder /home/pi/Blynk & , this should start in the background and you can then close the SSH connection without shutting down (worked for me). Further it depends on your system and version, there should be a line like the above. in crontab or rc-local, it is described on the git blynk page, I installed it yesterday and I am checking what blynk is, I am not an expert, and in linux even less so.
    Helpful post? Buy me a coffee.
  • #24 19888532
    omnixcrs
    Level 11  
    kaczakat wrote:
    Choose such a VPS, for which you can find a tutorial on Youtube
    .
    The problem is that the only one I found on YT is about Google Cloud
    kaczakat wrote:
    java -jar server-0.41.16-java8.jar -dataFolder /home/pi/Blynk &

    Thanks, this solution works as well as possible
  • #25 19888866
    kaczakat
    Level 34  
    To do it in autostart, useful as you combine with the server and check what happens after a reset, the entries from Blynk's GIT don't quite fit in this case, crontab works, but it has to be fired from user level to create a file for it, because that's how the server starts in GOOGLE after a reboot. And the working entry is:
    "@reboot sudo java -jar server-0.41.16-java8.jar -dataFolder /home/pi/Blynk &". , because this file is immediately visible in the root directory, not where its dataFolder is.
    Check where the serverXX.jar file is because it is different in the GIT examples.
    There was a post about Blynk on your own server here: https://www.elektroda.pl/rtvforum/topic3602108.html , just as a warning, because there was a VPS for $3 for years at wishosting, and then they wouldn't let you extend and there were only options at x10 price. Still cheaper than Google, but electricity is getting more expensive. As someone had a Blynk server there with saved projects, you need to do regular backups, because rather the projects are saved just on the server. Or join some blynk group in PL, they have a blog/forum, then probably servers as well, maybe they do some kind of $1 drop. One VPS can probably handle dozens of accounts without a problem.
    Helpful post? Buy me a coffee.
  • #26 19905834
    omnixcrs
    Level 11  
    Hello again,
    I have however decided to put the server on some mini laptop with windows, the server is already standing locally. The place where it will work has internet without fixed IP. Here is my request for your help on how to access the server from outside the local network where it works. I am guessing that I need to use some external service. I heard something about no-ip.com, not sure if this will solve my problem. Can you recommend a solution?
  • Helpful post
    #27 19907970
    kaczakat
    Level 34  
    You need to have a dynamicDNS client on your router or computer with that Blynk server, and an account set up on no-ip.com and the service running. Of course, it doesn't matter if it's fixed or variable, but the IP has to be external. This is the tab in no-ip dynamic DNS host name, you choose this name (host name) from the available ones, e.g. omnixcrs , then you connect e.g. omnixcrs.ddns.net to the selected port, this port in your router is redirected to the IP of the server, for Blynk it is of course two ports as on the VPS server, or one if only for the application in Android when all hardware modules of blynk are in this internal network. They can be different ports, e.g. you connect to the router with omnixcrs.ddns.net:15566 , and in the router you redirect the port from 15556 to 192.168.0.15:8080. In the app you then specify omnixcrs.ddns.net and port 15556, being at home on the local WIFI it can be interchangeably 192.168.0.15 and 8080 with the Internet bypassed. On the internal network you have to mess around to make sure it's always the same server IP, you can enter a rule after the laptop's MAC address into the router's DHCP, or you can enter an address from your finger outside of the IP numbers assigned by the router's DHCP.
    A laptop is a bad idea, some of the cheapest little ones cost a few dozen PLN - I was about to write, but I glanced at current prices and they are x4 !
    Helpful post? Buy me a coffee.
  • #28 19913811
    omnixcrs
    Level 11  
    Ok, I've embraced it somehow and it works.
    kaczakat wrote:
    the cheapest raspberries cost a few tens of zł
    .
    Initially this was the plan, but the realistic price for a raspberry today is 700-1000 zł which is absurd.
    kaczakat wrote:
    Laptop is a bad idea,
    .
    Why do you say that ?
  • #29 19913897
    kaczakat
    Level 34  
    As I mentioned "I was about to write like this", but I have glanced at the prices in the meantime, at current prices I would prefer a VPS though, even relative to the raspberry prices of two years ago it would easily last 5 years.
    Helpful post? Buy me a coffee.
  • #30 20056074
    omnixcrs
    Level 11  
    Hello,
    I'm refreshing the topic because something has gone awry for me, namely:
    As I wrote above, I set up a server on win 10 and it worked for about a month. One day no connection in the app. I go into windows and the server seems to be running, but well I did a reset. I restarted the server, the standard command line fired up and it says the server fired up at 192….... etc. What is strange – when I enter through the browser on this computer where the server is installed using the address “https://192.168.1.74:9443/admin” then I can log in without any problem, etc. but when I try the same thing on a laptop or PC that stand next to it (Obviously connected to the same network) then no connection can not display the page, etc.. How is this possible ?

Topic summary

The discussion revolves around configuring a local Blynk server on Windows for external access, especially after the discontinuation of Blynk 1.0. Users explore various methods to access the server remotely, including setting up a VPN, port forwarding, and using dynamic DNS services like no-ip.com. Concerns about security with port forwarding are raised, with suggestions leaning towards VPNs for safer connections. The conversation also touches on the challenges of connecting devices like NodeMCU to the Blynk server hosted on cloud services and the importance of correctly configuring firewall settings and port numbers. Ultimately, users share experiences and solutions for maintaining server accessibility and security.
Summary generated by the language model.
ADVERTISEMENT