Do I need port forwarding to implement local server on Mac?

I have downloaded and have successfully started the local Blynk server on my Macbook Pro, but cannot seem to pass the “Syncing Profiles” step and receive the common error “Server cannot talk right now…”. As I am using the correct IP (I believe…the one that Mac System Preferences says is correct) according to the docs on this forum (or should it be, instead, the “external IP” that outside connection would see the Mac with?), I am suspicious that it’s a matter of port forwarding to enable the cloud Blynk server to communicate with my Mac which is behind the cable router. If I need this for some reason, then I’d bet I need the external IP address, maybe to download some widget/app info to my local instance?

But this got me wondering if this is actually going to work when away from any Internet access. I have read the posts which discuss port forwarding, but am not certain if this will apply, say, to a situation where there is no Internet access just a LAN with a plain switch/router. Can you please verify that I can move the whole Blynk environment down to my local server, and access the mobile app with all of the widgets from there, sans any Internet connection? Thanks!

You can run a Blynk local server without Internet access. So to clarify you can have your smartphone connect to your local Blynk server without Internet as long as they are both on the same local network.

Port forwarding is required for accessing your local network from WAN (Internet)

Hope this helps

1 Like

In case your phone is in same local network as your Mac no port forwarding needed. If you try to access your Mac from let’s say 3G network you need to have external IP + prot forwarding in case your Mac is behind router.

Or use Weaved websocket or P2P direct rather than port forward?

Thanks all for your helpful suggestions but have not been successful in getting connected to the local Mac (El Capitan) server. Java V1.8 JDK Server installs with Sudo and inits ok; I put it in /Developer. Both the Mac and the iPhone (IOS 9.2.1) are on the same LAN, according to System Preferences/Network. When I attempt to connect, I get “Connecting” and then (most times, after about 30 seconds) “Syncing Profiles” and then " Sorry, server can’t talk right now. Try later". I have tried extending the Blynk.log data by specifying “trace” as the log option, but see nothing different in the log file (indeed, there is nothing after the server init.) One hint is that I can’t seem to ping the server from outside of the Mac.
Any additional things I might try? Thanks much…want to make this excellent tool work!

169.x.x.x is a self induced local address. It doesn’t work with the rest of your LAN. Are you sure the Mac is hooked up to the network correctly? I never had a problem using a Mac.

Just stating the obvious: is the firewall turned off…?

That IP address was assigned by the DHCP server and is what I regularly use on my home network. It seems to work fine for the day to day tasks that the Mac is used for. I do notice though when I use, say, other routers at different locations that the IP can vary to the more typical 192.168.x.x. I can try a fixed IP rather than DHCP to see if it makes a difference. Not sure what you are asking regarding the firewall since others above have told me that I don’t need outside Internet to utilize the local server. Thanks much!

All, thanks much for your help…Blynk local server seems to be working now. Issue seems to have been my missing the fact that one needs an additional userid (Blynk account) for the local server! This wasn’t clear to me at the start but in retrospect seems logical. You might want to add to the excellent set of instructions for Local Server that it needs it’s own user registration as you would (and probably have done) for the cloud version. Thanks again for your help!

Your Mac also has a firewall :wink:

Also please post here output of ifconfig

Dmitriy, here you go:

Drews-Air-2:logs drewmac$ ifconfig | grep "inet "
inet netmask 0xff000000
inet netmask 0xffffff00 broadcast
inet netmask 0xffff0000 broadcast

The IP I’m using is which is attached to the WiFi interface. Once I registered with the local Blynk server all seems to be working well.