I’m playing with Blynk and NodeMCU dev board for a while.
As I own a Synology DS215J, I wanted to deploy a Blynk server on it.
Thanks to several posts by the community, I succeed to deploy and test it.
But I don’t really find a clear “How To”, so I decided provide a simple step-by-step guide.
I’m not a specialist but I hope this guide will help!
Don’t hesitate to add your comments or improve it.
Note : I’m facing a issue at the final step, for the one I don’t know how to fix it (see last point - 6)
1°) Setup and prepare your Synology
- Login to DSM as admin and activate SSH / Telnet (Control Panel --> Terminal & SNMP --> Terminal tab --> Activate Telnet & SSH)
- Install “Java8” package (Package Center --> Search “Java8” --> Install)
- Create a new directory “Home/Blynk” via “File Station”
2°) Prepare your files
- Via FTP, copy the 'server-x-x-x.jar" file into the new “Blynk” folder
- Copy “server.properties” and “mail.properties” into the same folder (optional)
3°) Starts the server
- On your local PC/MAC, connect to your Synology via SSH (For MAC : Terminal --> “ssh [useradmin]@[server_ip]” + input your password)
- Once connected, check if the Java version is correct (“java -version” should give you “1.8.xxx”)
- Start the Blynk server via the following command : “sudo java -jar server-0.16.4.jar” (more parameters available)
4°) Stops the server
- You can stop your Blynk server by closing the terminal window (or CTRL+C on MAC Terminal)
- If the process has been launch in a different way you can search the process ID of the Blynk server by using the following command when connected via SSH : “ps -ef | grep java” (ID = 2nd column)
- When you’ve identified the process ID, kill it via the following command : “sudo kill -9 [ID]”
5°) [Optional] : Access your Blynk server over internet
- If you need to access to your server outside your local network, you should activate and setup the “External access” (Control Panel)
- Then, you have to re-direct the ports used by Blynk server on your router
6°) [QUESTION] Launch the Blynk Server at Synology startup
Does anyone has an idea on how to schedule and launch automatically Blynk server at Synology startup ?
Since I launch the Bylnk server via SSH, when I close the terminal the Blynk server is shutting down, which is a bit painfull
- Update from @Lichtsignaal: If you start the blynk server followed by an “&” sign, it will continue to run in the background, not the best solution, but at least you can close your terminal
Thanks in advance for your inputs.