Local Blynk server unreachable

My first post heare and I’m just getting started with Blynk.

I’ve just installed the Blynk Server on my Mac mini, by following this, and all went fine.

I accessed the admin paged OK, connected using the Blynk app on my iPhone and created a project. All good.

However, after restarting my Mac the server is no longer reachable either from the app or via Chrome.

I just get a refused to connect message.

Is there a terminal command to restart the server?

I used…

java -jar server-0.41.4.jar -dataFolder server_data &;

…to install it, believing the ‘&’ at the end would have it automatically restart. Is that not correct?

All help much appreciated.


Hi @ashscott I recently set up my first local server too!

Have a look here:

I believe the & at the end just creates a separate process for the Blynk server, not enable auto restart. The github says how to.

Thank you for taking the time to reply. Now you have me confused.

Those docs seem to indicate the reverse:

To enable server auto restart find /etc/rc.local file and add:

java -jar /home/pi/server-0.41.3-java8.jar -dataFolder /home/pi/Blynk &

How do I restart the server (as it seems not to be running)?

Don’t worry about the ‘&’ , just include it in the command i.e.:

java -jar /home/pi/server-0.41.3-java8.jar -dataFolder /home/pi/Blynk &

Now you need to get this command to run each time the mac starts. So you need to edit a configuration file which is read each time the machine boots, in this case the file is named rc.local and is in the /etc folder (my server runs on a raspberry pi so it might be different for you).

Alternately there is the crontab -e command which will also open up a file you can edit, same as the rc.local file.

Hope that makes more sense!

The Documentation is correct… as is @877’s description. It is just down to the methods used to run the command.

Upon entering the command in the Terminal window (CLI) the ending & allows a “separate process” that keeps the Server running in the background, instead of stopping when the CLI window is closed… but it will not automatically run upon boot.

But by putting that same command (with the &) into the rc.local file or using crontab, etc. then it automatically runs that same command each and every time the RPi boots, so you don’t have to type it.

1 Like

Thank you, Gunner.

I don’t seem to have an rc.local file on Mac Mojave OS and I don’t yet know how to use crontab but it sounds like what I need.

I’d appreciate some pointers if you have the time.

I don’t use Apple… so you may need to Google how to auto run scripts on boot.