
via Docker for Raspberry Pi
The Self-Hosted Blynk Server Application
Blynk is a full suite of software required to prototype, deploy, and remotely manage connected electronic devices at any scale: from personal IoT projects to millions of commercial connected products.
Blynk Server is an Open-Source Netty based Java server, responsible for forwarding messages between Blynk mobile application and various microcontroller boards and SBCs (i.e. Arduino, Raspberry Pi. etc).
Run your IoT projects locally
If you have no internet connectivity, but would still like to run your IoT devices locally, then configuring the Blynk server as a self-hosted environment is a great option.
In the instructions below I will try to guide you with your installation of the server. It is assumed that you understand Linux basics and already have Docker installed and running on your Pi. These instructions may not work on your platform, but it is what worked for me on my Raspberry-Pi 3B+ running latest Docker on DietPi.

Gather up the files needed to host your Blynk server locally.
Use this version of the server if you are on Java version 11
Use this version of the server if you are on Java version 8
The Blynk (Legacy) Mobile App for Android
by apkpure.com.apk
So, this is the way I got everything running.
FYI: I use a combination of Putty and WinSCP to manage my server, as my main working computer is windows based. You can use whatever method you prefer to manage yours and to create the file structure below (nano, vim, etc.)
You will need to create a directory structure where blynk-server.yml and .dockerfiles/blynk-server.df will be stored (note the hidden directory .dockerfiles).
I like organizing my container's files into a working directory with a descriptive name, such as the app's name, and located within the home directory of my server (i.e. /home/containers/blynk-server). This will be where I run the build/updates from and maintain data persistence for this container, as you'll see later in the code.
So, head on over to your home directory where you want to have the files located, and create your file structure.
Now you are ready to create the blynk-server.df file, either through the console, using a tool such as nano or vim, or via WinSCP.
The file contents are as follows:
Copy these contents to a file named blynk-server.df and place it in the /home/containers/blynk-server/.dockerfiles directory.
The Easy Part...
For this next part you will need to create one more file. This will be the docker compose file that will be run to build or update the server.
Start by changing back to the blynk-server directory (cd ..) and creating the blynk-server.yml file from the code below.
Finally, you will need to run the build command.
You can see the install process on screen as it completes each task. When successfully completed it will look something similar to this:
You should now be able to access your container via its IP address.
https://172.71.0.9:9443/admin
If you do not know what your server IP is, check the logs within the container. It should have printed your IP and login credentials there. Normally this would look something like this:
The Blynk Login Page
Hurray, we're done! Nearly...
Login to the server and change your admin credentials. You may also want to change some settings in the configuration area, namely the server.properties and mail.properties sections.
The Blynk Admin Page
After all this, now you will need to download the mobile app from your app vendor. The android app is provided above in case it disappears from the Play Store, but basically, do a search for Blynk and you should be able to install the Legacy version of the app.
Portainer: Containers running along side the Blynk-Server app.
Final thoughts
Please let me know what you thought of this tutorial and where you think it can be improved upon.
Happy Blynking!






Copyright © 2023 - Lazo Consumer Products, LLC. All Rights Reserved.
