Change “pi” to your username
#Install Java Development Kit
sudo apt-get install default-jre
sudo apt-get install default-jdk
sudo apt-get install software-properties-common
sudo add-apt-repository "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main"
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo apt install oracle-java8-set-default
#Create a directory for the server called Blynk
mkdir /home/pi/Blynk
#Move into the working directory
cd Blynk
#Download the server
wget "https://github.com/blynkkk/blynk-server/releases/download/v0.23.1/server-0.23.1.jar"
#Generate self-signed certificates
openssl req -x509 -nodes -days 1825 -newkey rsa:2048 -keyout server.key -out server.crt
#Convert key to pem
openssl pkcs8 -topk8 -inform PEM -outform PEM -in server.key -out server.pem
#Copy the contents from the site given below
https://raw.githubusercontent.com/blynkkk/blynk-server/master/server/core/src/main/resources/server.properties
#and paste it in
sudo nano server.properties
#Change the following lines
server.ssl.cert=./server.crt
server.ssl.key=./server.pem
server.ssl.key.pass=PASSWORD_USED_IN_ABOVE_STEP
#Copy the contents from the site
https://raw.githubusercontent.com/blynkkk/blynk-server/master/server/notifications/email/src/main/resources/mail.properties
#and paste it in
sudo nano mail.properties
#Set Gmail id and password. If you are using two step verification, generate app specific password from google account.
cd ..
#For Autostart on reboot
sudo nano /etc/rc.local
Add the following command mentioned before “exit”
java -jar /home/pi/Blynk/server-0.23.1.jar -dataFolder /home/pi/Blynk -serverConfig /home/pi/Blynk/server.properties -mailConfig /home/pi/Blynk/mail.properties &
#Now You can start the server
java -jar /home/pi/Blynk/server-0.23.1.jar -dataFolder /home/pi/Blynk -serverConfig /home/pi/Blynk/server.properties -mailConfig /home/pi/Blynk/mail.properties