Confused over local server ports

Oh boy, is my brain scrambled!

Last year I set up a local server running on a Raspberry Pi and created a couple of apps that ran on my Android phone.

Recently one app stopped working properly so I looked into what might be the problem - and that’s when I got completely confused and the more I look into how I might fix things, the more confused I become.

Originally I’d log in to my local server from my phone using the Pi IP address and port 9443 (I think). I seem to remember (although time and repeated changes to my Arduino sketch that runs on a NodeMCU) that I had to set the port in the Blynk.begin line in the code to port 9442 (perhaps my memory fails me).

Looking at the Blynk help pages there was great rejoicing that the server port was now 8080, so I changed one or other or both ports on the phone and the sketch to 8080 and, as you might image if you understand these things, nothing worked.

It seems that some help pages for setting up a local server say use 8080 (although not where I should use it in a human understandable way) and some say use 9443 and or 9442. But none of these pages have dates, so I can’t decide whether they are old help files that should have been deleted or whether they are current and are simply confusing me,

And the lovely Anna on YouTube doesn’t seem to have updated the instructions following the port change (unless she doesn’t need to as the 8080 is only if you use the cloud server).

Sorry to appear a gibbering idiot, but in Pavel’s original YouTube pitch he was keen to make the point that Blynk does all the hard work, protecting you from having to understand the workings of communication protocols to get the benefits of IOT.

Can anyone point me to an up to date, idiot’s guide to setting the local server up properly, that also explains in words of one syllable what else has to be updated (I’m thinking here of the Libraries and Tools in the Arduino sketch folders on my Windows machine, where I create the sketches in the first place). The app on the phone is up to date and I have downloaded the latest .jar file and got the Raspberry Pi to run the Blynk server using it.

I guess answering a few questions would get my head above water again, like:

  • What port should I be using on the phone’s custom server settings?
  • What port should I be setting in the Blynk.begin line in the sketches?
  • Should that be done using the ‘#define BLYNK_DEFAULT_PORT 8080’ or actually in the Blynk.begin line or both?

Thanks for any help.


This is true if all you ever do is use the very basics of Blynk and the Cloud Server… but like anything else with options, the more complex the things you what to make the more knowledge required to do so.

The App always uses port 9443 in the custom settings (unless you actually make custom changes to your router and port forwarding… unless you understand, don’t fiddle with it)

The hardware device sketch can use 8080 for either Cloud (which may also use 80 and is usually handled automatically in the library anyhow) or Local server… unless specifically using SSL libraries, in which case it will need to use 9443

That is basically it for ports

Local Server is NOT a simple process… so there is NOT a simple answer… you are not boiling water here :stuck_out_tongue:

Much depends on HOW you connect to the server, WHICH client hardware and programming LANGUAGE you use… Thus again, no dirt simple answer as Local Server and custom clients are… well… custom.

1 Like

Gunner, thanks for the lightening fast response.

I understand it’s not ‘boiling water’ but I set the local server up relatively easily to start with by following the instructions, so I figured there might be equally simple instructions for what I needed to change following the ‘8080’ update, I’m sure all the answers are out there, I just can’t see the wood for the trees.

if I don’t crack it in the next day or so, I think I might delete everything and start again from scratch.

Thanks again.


That update was a long time ago, so things have settled down somewhat with most current libraries… basically use 8080 or 9443 depending on basic TCP or SSL accordingly.

Updates to documentation is always a chore as the developers seem very busy on the commercial side… but pointing out what and where as you confirm it, will help them over time.

And on that note…

@Pavel Lots of old info througout this document -


1 Like

@Dmitriy please correct to the latest info. Thanks

1 Like