Static public IP is basically an address to a server which doesn’t change.
So instead of going through the process of port forwarding there is a service known as ZeroTier which creates a psuedo (that’s what I call it) local network via VPN, which is more secure than port forwarding because you can authorize each device you need in the network and have access to your devices.
ZeroTier has a free service where it limits the number of nodes connected to the network to 50 (kind of enough for most of the IOT projects)
Go to ZeroTier and create an account
Click on the Networks option on the top bar
You’ll find Create A Network option there.
Click on the network you created and you’ll see Network ID.
This is important as you’ll be using this ID to sign up all your devices to the network
Keep the access control as it is (PRIVATE) to authorize every device trying to access the network.
Now you can start setting up your devices,
In Downloads page you’ll find the details, but you can run
curl -s https://install.zerotier.com | sudo bash
to install the ZeroTier client on RaspberryPi
- After Installation, signup the Pi for the network by running
zerotier-cli join ################
################ with 16digit Network ID
You should see members added in the Members section and ipv4 address will be auto assigned and be displayed along with the device
Name the device as ‘Blynk’ or ‘Rpi’ in order to avoid confusion
Install the ZeroTier app in Android/IOS devices and go through the steps
All you need to do is input the Network ID and put the RaspberryPi’s auto-assigned IP address in the Blynk app (port won’t change anyways)
The ZeroTIer sets up the VPN and you can use your device normally while accessing the Blynk local server from anywhere in the world
Note: Due to battery optimisations the app might be stopped by the OS, please start the app/ remove optimisations for better experience
Thank You @PeteKnight for suggesting the alternative