Local Blynk server runinng o VPS (Ubuntu) stops running after few hours

Hi There, I am really sorry. I do not understand why. But the process of blynk server stops several times per day. I tried to run it in screen, also in PM2 (did not work) and I have also added line to /etc/rc.local (server started after reboot but, than it stopped.
Can you help me please?

if you can provide more details maybe somebody can help , DevOps Issues Mostly.

one thing if you are using a free or trial Service most of the providers are shutdown or hibernate the server
after and certain number of minutes.

i hope this help

1 Like

Hi, I am using comunity local edition server ? free for download - it did not ask me for any credentials.
is this what are you asking me?

sorry i may not explained it properly , i mean more details about your VPS provider .

no vps is active all the time.

Assuming you meant VPS open ALL the time :wink:

Double check that… Blynk requires a constant, every few seconds, communication link between the Server, App and MCU… even if you are not “doing anything” with it… the heartbeat is still processing.

So is it possible to change the frequency of the hearthbeat ? :slight_smile: or what would be the solution if we need it keep running and we want MCUs to wake up only once per hour for two seconds?

To a small degree for a few more seconds with #define BLYNK_HEARTBEAT 20 in my sketch, and using Local Server only… I have one of my heavier process projects set to 20 seconds (as in the shown command)… but can’t honestly say I see the difference.

If you want to work with sleep mode, then that is a totally different thing. Search this forum for more info about that

Thank you very much. I will search for sleep mode. So Local server cannot serve as blynk cloud?

A server is a server, whether “cloud” based or “local”… you can even setup a Local Server acting as a Cloud Server for others outside of your network, etc.

Point is, advanced users can setup and have full control over a Local Server of their own, whereas the official Blynk Cloud servers are not under your control for such tweaking of heartbeat, and other settings.

Anyhow, back to your original issue… did you figure out if it is your VPS or Local Server that is causing the disconnections?

Aha, ok. But Local server cannot produce the app, can’t it?

yes the provider said that VPS is still alive, never sleeps and the connection remains constant. So it should be the Server, If they are saying truth.

Not sure you understand… Blynk consist of three “parts” the App, the Server and the Device(s)

The App runs on the Phone/Tablet/Emulator as the primary GUI and it ‘talks’ to the Server…

The Server (Local, Cloud, etc. - each one being totally independent of all others) generates and authorizes the User accounts/logins and stores their individual projects & energy, along with generating and controlling the Auth codes. It also acts as the communications hub between the App and the Devices…

The Devices (AKA MCU) are the workhorses that run the Blynk Library, the users scripts (AKA programs, firmware, etc), and handle the I/O with all the sensors and feedback.

So anyhow… If you setup a “LOCAL” server, then you create an account on it and direct your App and Devices to it’s IP (Local and or Public - depending on your setup)… Thus keeping the Server running 24/7/365 is well, important :stuck_out_tongue:

Normally this is just a matter if installing it on some Java capable device with full-time network/internet, sufficient CPU and bandwidth (not much needed there really) and internal memory for logging and projects, etc.

I am not entirely understanding what you have setup or why… I just have my Local Server running on an old Netbook loaded with Mint and port forwarded via my router for both LAN and WAN access… Been running for a year with minimal downtime for updates, etc.

Reading the thread, not really sure if the problem is server or app based, but rc.local (depending on your configuration) doesn’t restart processes that exits automatically. You might want to look at systemd on later Ubuntu systems. I’ve wrote a small how-to:

I have tried this but it looks the server did not start. how can I chceck if it is running? or why it is behaving like this?

Try looking in the docs for Blynk server… It’s all there! :face_with_monocle:


Did you mean you tried systemd? If so, read the how-to I linked to.

Question, do you mean VPN (Virtual Private Network) or VPS (Virtual Private Server)?

  • Which version of Ubuntu do you use?

  • How does your start-up script looks like?

  • Have you looked in Ubuntus log files?

Yes, I have tried systemd. I went trough how to, did not skip any step.

Tried status?

Yes Virtual Private Server, (VPS) As I have been asked for. we have no need for vpn.

4.4.0-104-generic #127-Ubuntu SMP Mon Dec 11 12:16:42 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Description=Starts and stops the Blynk server daemon

ExecStart=/usr/bin/java -jar /home/Blynk/server-0.29.2.jar -dataFolder /home/Blynk

#-serverConfig /home/Blynk/server.properties


When you run ~# service blynk status (or what you named the service) it doesn’t complain? Try
~# journalctl -u blynk.service -b

Paths are case sensitive!

1 Like