This script does the following:
- Update and Upgrade
- Installs OpenJDK 8
- Downloads and initializes the Blynk Server
- Installs the server as a systemd service if you so choose
- Clone this repo
git clone https://github.com/librarysteve/installblynkpi.git- Run the installer script
cd ./installblynkpisudo chmod +x ./install.shsudo ./install.sh- Answer "Yes" if you would like it to start on boot
- Update, upgrade, and install openjdk 8
sudo apt-get update && sudo apt-get -y upgradesudo apt-get install -y openjdk-8-jdk- Download a copy of the latest blynk server from The Blynk Server Repo or via wget
wget https://github.com/blynkkk/blynk-server/releases/download/v0.41.10/server-0.41.10-java8.jar- Create a folder for everything Blynk Server related
mkdir blynk_server- Make a folder for server data
mkdir ./blynk_server/server_data- Create a shell script to start the server something like:
#!/bin/bash
$(java -jar /home/pi/blynk_server/server-0.41.10-java8.jar -dataFolder /home/pi/blynk_server/data_folder)- Create a service "Unit File" so the server will start on boot using systemd
sudo nano /etc/systemd/system/blynk.serviceExample Unit File:
[Unit]
Description=Blynk IoT Server
After=network.target
[Service]
ExecStart=/home/pi/blynk_server/start_blynk_server.sh
WorkingDirectory=/home/pi/blynk_server
StandardOutput=inherit
StandardError=inherit
Restart=Always
User=pi
[Install]
WantedBy=multi-user.target
- Enable the service with systemctl First start the service
sudo systemctl start blynk.serviceThen enable
sudo systemctl enable blynk.serviceThen check to see if it is running
sudo systemctl status blynkif you see an "active" message (usually in green) you're good to go
-
Browse to https://(RPi IP ADDRESS):9443
-
Login with default credentials User/Email:admin@blynk.cc Password:admin NOTE: Unless you have an email server running, there will be no email sent. That means no password reset
- Make the uninstall script executable
chmod +x ./uninstall.sh- Run the uninstaller and follow the prompt