How to Enable Blynk Server Ports on Ubuntu with UFW
If you’re self-hosting a Blynk Server, you might encounter issues where your hardware (like ESP8266 or ESP32) or mobile app cannot connect to the server. This is often caused by the server’s firewall (UFW) blocking the necessary ports.
In this guide, we’ll walk through identifying the Blynk ports and how to expose them safely.
Step 1: Identify Your Blynk Ports
First, verify that your Blynk server is actually running and see which ports it is listening on. Run the following command on your server:
sudo ss -tlnp | grep -i java
Typically, Blynk uses these three default ports:
- 8080: HTTP port for web dashboard and non-secure app connections.
- 9443: HTTPS port for secure App connections.
- 8440: Hardware port for ESP8266/ESP32/Arduino devices.
Step 2: Check Your Firewall Status
Check if your firewall (UFW) is active and which rules are currently in place:
sudo ufw status verbose
If you don’t see 8080, 9443, or 8440 in the ALLOW list, the firewall is blocking them.
Step 3: Enable the Ports
Run the following commands to allow incoming traffic for Blynk:
# Allow Blynk App (Secure)
sudo ufw allow 9443/tcp
# Allow Blynk App (HTTP)
sudo ufw allow 8080/tcp
# Allow Hardware Connections
sudo ufw allow 8440/tcp
Step 4: Verify the Configuration
Confirm that the rules have been added successfully:
sudo ufw status
You should now see the rules listed as ALLOW from Anywhere.
🚀 Conclusion
Your Blynk server is now ready to receive connections!
- App URL:
https://your-server-ip:9443 - Hardware Port:
8440
💡 Pro Tip: If you’re using a cloud provider like AWS, Google Cloud, or Azure, remember to also open these ports in your provider’s Security Group or Network Firewall settings!