Installing Blynk Server on Digital Ocean Ubuntu

I am trying to install the blynk server on a new droplet that is running ubuntu 18.04. Here are the commands I use on a fresh droplet.

sudo apt update
java -version
apt install default-jre
apt install openjdk-11-jre-headless
apt install openjdk-8-jre-headless

java -version returns

openjdk version "10.0.2" 2018-07-17
OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4)
OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4, mixed mode)

I then grab the latest jar file

wget https://github.com/blynkkk/blynk-server/releases/download/v0.41.4/server-0.41.4.jar

I then run the file like this

java -jar server-0.41.4.jar -dataFolder blynkData

Here is the error I get

Error: LinkageError occurred while loading main class cc.blynk.server.launcher.ServerLauncher
	java.lang.UnsupportedClassVersionError: cc/blynk/server/launcher/ServerLauncher has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 54.0

Is this because the digital ocean instructions are putting both 11 and 8 or should I just do 8

cool, I have Ubuntu 18.04 on my old pc. why are you making the the server in the first place.

Java 10 is not Java 11.

1 Like

The app does not have any real widget limits when using your own server vs the one supplied by Blynk.

also I was able to get this to fire up by reverting back to

https://github.com/blynkkk/blynk-server/releases/download/v0.40.2/server-0.40.2.jar

Actually there are some minor limitations in the Local Server (no Twitter or App Preview for example). But speed and security (due to local networking vs internet - if hosted on your own hardware) and full control of energy are primary reasons for a Local Server.

PS, they are both “supplied” by Blynk, but only one is “hosted” by blynk.

Personally I do not see the benefits of hosting a Local Server on another rented cloud service. Why pay more than the free Blynk Cloud Server when you could easily run a Blynk Local Server in your own network off a cheap RPi, low end PC, etc. and still have full world wide access if desired.

2 Likes

For sure. I have a large class this summer that will be using Blynk with their projects and I didn’t want them limited on their UI and I didn’t trust them all hanging on a Pi so for $5 during that month I can have them hosted in a reliable way. Call me paranoid. :slight_smile:

1 Like

They wouldn’t need individual RPi’s. Even a single ZeroW would probably handle hundreds of accounts. And a simple SD card backup can keep all the data safe.

But for a summer class, your solution makes perfect sense as well :slight_smile:

2 Likes