Home > IoT > How to Remote Access a Web App in IoT from Internet

How to Remote Access a Web App in IoT from Internet

Author: Ganesh Velrajan

Last Updated: Jul 25, 2025

Internet of Things(IoT) has gained immense popularity among technology enthusiasts and hobbyists alike.

Establishing secure remote access to an IoT device is important for end-users who need to remotely access and control an IoT device using an app or web browser.

IoT web app remote access is crucial for service partners who must have access to devices that have been installed in the corresponding remote location; and product support teams who need the ability to log onto installed devices located on customer sites

In this blog article, we will explore how to remotely access the following types of web applications running in an IoT, behind NAT router and firewall, from the internet using SocketXP IoT Remote Access Solution.

  1. NodeJS Web App Remote Access
  2. Python Flask Web App Remote Access
  3. Golang Web Server App Remote Access
  4. Websocket Server Remote Access
  5. File Server Web App Remote Access
  6. NGINX Web Server Remote Access
  7. Java Web Server App Remote Access
  8. API Gateway Server Remote Access
  9. Node-RED server dashboard Remote Access

Whether you are a coding enthusiast, a DIY enthusiast, or just curious about writing web applications for IoT and remotely accessing it, this article will provide you with a step-by-step instructions on how to remotely connect to a web app running in your IoT over the internet.

So, let’s dive in.

Remotely Connect to a NodeJS Web Application in IoT

[Note: We will be using a nodeJS web app as an example for illustration purposes. But our solution should work for any web app written in any language: python, go, java, or .Net]

Let’s assume you have a nodejs webserver application(as shown below), running in your IoT device. Let’s say, the nodejs webserver app listens on localhost port 3000.

$ cat myapp.js
var http = require('http');
//create a server object:
http.createServer(function (req, res) {
 res.writeHead(200, {'Content-Type': 'text/html'});
 res.write("<h2>Hello World!</h2>"); //write a response to the client
 res.end(); //end the response
}).listen(3000); //the server object listens on port 3000
$

We’ll use the above web app to explain how to remote access IoT webserver from the internet.

Now run the myapp.js on your IoT, as shown below.

$ node myapp.js

Open up a browser in your IoT and point to http://localhost:3000 to connect to the local web application.

remote access iot web application from internet

Right now the web application can be accessed only from a local network because it runs on your IoT behind a NAT router or Firewall.

Now to remote access your nodejs webserver application from the internet, follow the instructions below to create a SocketXP HTTPS tunnel and a SocketXP Public Web URL for your nodejs webserver app.

Step 1: Download and Install

Download and install SocketXP IoT agent on your IoT or IoT device.

Step 2: Get your Authentication Token

Sign up at SocketXP Web Portal and get your authentication token.

remote access JS web app in IoT over the Internet

Click the copy button to copy the command string and paste in the terminal window in your laptop or server.

$ socketxp login "eyJhbGciOiJIUzI1NiIsInR5cCI..."

After registering the SocketXP Client with the SocketXP Cloud Service, use the following command to create a secure HTTP proxy tunnel between the nodejs webserver application and the SocketXP Cloud Gateway.

$socketxp connect http://localhost:3000
Public URL -> https://test-user-59129dd68b58.socketxp.com

Let’s access the nodejs webserver application from the internet using the SocketXP Public URL provided in the above output.

remote access nodejs web app in IoT from outside network

The above SocketXP public URL is a permanent link just assigned to your webserver app and it doesn’t change until you manually delete it from the SocketXP web portal.

Remotely access Python Flask Web App in IoT from Internet

Let’s use the following simple Python flask web application for the demo.

$ cat myapp.py
from flask import Flask
app = Flask(__name__)

@app.route('/')
def hello_world():
    return '<h2>Hello, World!</h2>'

if __name__ == '__main__':
    app.run(host='127.0.0.1', port=3000, debug=True)

Run the myapp.py on a local server or laptop.

$ python myapp.py
Using a browser, let’s point to http://localhost:3000 to connect to the flask web application.

remote-access-flask-app-from-internet

Right now the flask application can be accessed only from a local network because it runs on your IoT behind a NAT router or Firewall.

Now to make the python flask application accessible from the internet, let’s download and run the SocketXP Client from the download page.

Next authenticate and register the SocketXP Client with the SocketXP Cloud Gateway, using the auth-token from the Portal Page

remote-access-flask-app-from-internet

Click the copy button to copy the command string and paste it in the terminal window in your laptop or server.

$ socketxp login "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

After registering the SocketXP Client with the SocketXP Cloud Service, you could create HTTP proxy tunnel between the application running in your laptop and the SocketXP Cloud Service, via the SocketXP Client.

As our flask app is a web application(HTTP server), let’s create a HTTP proxy tunnel.

Make Python Flask app accessible from Internet

Use the following command to create a HTTP proxy tunnel between the flask web application and the SocketXP Cloud Gateway. This will generate a public web URL. Use the SocketXP public web URL to expose your flask app to the internet.

$socketxp connect http://localhost:3000
Public URL -> https://679aa48b-1162-44f7-b6c6-59129dd68b58.socketxp.com

Let’s access the flask web application from the internet using the SocketXP Public URL provided in the above output.

remote-access-flask-app-from-internet

You could use this public URL to integrate with your IoT controller or dashboard or with your mobile app.

Remotely Access File Server Web App

Here is a sample Python Flask web app to remotely access and dowload any file from your IoT

$ cat get_files.py
from flask import Flask, send_from_directory

app = Flask(__name__)

@app.route('/<path:path>')
def send_report(path):
    return send_from_directory('/', path)

if __name__ == '__main__':
    app.run(host='127.0.0.1', port=3000, debug=True)

Use a browser or the curl utility to access any file as long as you know the correct file path:

curl https://679aa48b-1162-44f7-b6c6-59129dd68b58.socketxp.com/var/log/syslog

You can access any static files in your IoT such as logs, images or videos from an on-board camera, configuration files etc.

Remote Access Websocket Server

If you have a websocket server running in your private network or in your IoT device and you want to connect to it remotely using a websocket client app, you could follow this article: How to Remote Access Websocket Server

Conclusion:

Developing web applications for IoT is made easy by using Python and NodeJS.

With SocketXP IoT Remote Access Solution – part of IoT Device Management and Remote Access Platform, it is easy to securely access any web application running in your IoT from any browser on any OS, be it Windows or Mac or Linux.

By following the steps outlined in this article, you can quickly set up remote access to web app running in your IoT and access it from anywhere, anytime.

Whether you’re managing a IoT project remotely or accessing your IoT for troubleshooting or maintenance purposes, web application remote access is a powerful tool that enables you to stay connected to your IoT with ease.

Frequently Asked Questions(FAQs):

General FAQs About IoT Remote Access

What is IoT remote access and why is it important?

IoT remote access allows you to securely connect to and manage devices (like Raspberry Pi, ESP32, BeagleBone, or industrial gateways) over the internet. It’s essential for developers and enterprises to update firmware, debug issues, monitor logs, or control devices deployed in remote locations without physically being there.

Why is remote access to microcontroller boards or embedded Linux devices challenging?

Most IoT devices sit behind NAT routers or firewalls, making them unreachable directly over the internet. Setting up port forwarding or static IPs can be complex and insecure. Solutions like SocketXP remove these hurdles by providing secure tunneling without reconfiguring networks.

How does SocketXP make remote IoT access easier compared to VPNs or port forwarding?

Unlike VPNs, SocketXP doesn’t require complex setup, static IPs, or exposing open ports. It creates a secure, lightweight tunnel between your device and your laptop/browser, so you can access it instantly without worrying about firewall restrictions.

Security & Networking FAQs

Is remote access to IoT devices safe?

It can be unsafe if done via insecure methods like port forwarding. SocketXP ensures safety by using TLS-encrypted tunnels, access tokens, and role-based access control, protecting devices against unauthorized access.

What are the risks of using port forwarding for IoT devices?

Port forwarding exposes your device to the public internet, making it vulnerable to brute force attacks, malware, and unauthorized logins. SocketXP eliminates this risk by not exposing any public IP or open port.

How does SocketXP ensure secure remote connections?

SocketXP uses end-to-end encrypted tunnels (TLS 1.2/1.3), token-based authentication, and allows fine-grained access control. It ensures that only authorized users can connect, keeping devices safe from cyberattacks.

How does SocketXP compare to VPNs for IoT remote access security?

VPNs create a broad network tunnel that can expose all connected devices if compromised. SocketXP provides device-specific, application-layer tunnels — limiting exposure and improving security with less complexity.

Device & Platform-Specific FAQs

Can I use SocketXP to access a Raspberry Pi remotely?

Yes. SocketXP supports Raspberry Pi out of the box. You can securely SSH, VNC, or open the Pi’s web applications from anywhere without port forwarding.

Does SocketXP work with ESP32 or Arduino boards?

For microcontrollers like ESP32 or Arduino, SocketXP can act as a cloud tunnel to send telemetry data, enable secure OTA (over-the-air) firmware updates, or provide remote monitoring via APIs.

Is SocketXP compatible with BeagleBone, Jetson Nano, or other SBCs?

Absolutely. Any device running Linux (Debian, Ubuntu, Yocto, OpenWrt, etc.) can install the SocketXP agent to enable secure remote access.

Can I use SocketXP for industrial IoT devices or PLCs?

Yes. SocketXP is lightweight and suitable for edge gateways, PLCs, and industrial controllers that need secure, managed remote connectivity.

Usage & Features FAQs

Do I need static IP or port forwarding to use SocketXP?

No. SocketXP eliminates the need for static IPs, dynamic DNS, or port forwarding. It works even if your device is behind NAT or a firewall.

Can I use SocketXP to SSH into devices behind NAT or firewalls?

Yes. That’s one of SocketXP’s core features. You can instantly open a secure SSH session without touching your router settings.

Does SocketXP support web-based SSH access through a browser?

Yes. SocketXP offers a web console, so you can open a terminal directly in your browser without installing an SSH client.

Can I transfer files remotely using SocketXP?

Yes. SocketXP supports secure file transfer and remote log monitoring, making it easier to update configurations or retrieve logs.

Does SocketXP support remote firmware updates for IoT devices?

Yes. You can securely push OTA firmware updates through the SocketXP tunnel without exposing your devices.

Can I access my IoT device dashboard or web UI using SocketXP?

Absolutely. You can expose web-based dashboards, admin panels, or APIs securely via SocketXP tunnels with HTTPS.

Performance & Scalability FAQs

Does SocketXP introduce latency in IoT device connections?

SocketXP is optimized for low latency. It uses lightweight tunnels, so the performance impact is negligible compared to traditional VPNs.

Can SocketXP handle thousands of IoT devices at scale?

Yes. SocketXP supports multi-device fleet management, making it suitable for both small hobby projects and enterprise deployments.

Is SocketXP suitable for low-power or constrained networks?

Yes. The client agent is lightweight and works efficiently even on devices with limited CPU, RAM, and bandwidth.

Comparison & Alternatives FAQs

What is the difference between SocketXP and VPN solutions?

VPNs require network-wide setup, static IPs, and can expose multiple devices at once. SocketXP is device-centric, faster to deploy, and more secure for IoT use cases.

Why should I choose SocketXP over TeamViewer, ngrok, or OpenVPN?

TeamViewer is GUI-focused, ngrok is session-based, and OpenVPN is complex. SocketXP combines the simplicity of tunnels with enterprise-grade IoT features (SSH, HTTPS, APIs, OTA).

Can I replace my VPN setup with SocketXP for IoT remote access?

Yes. SocketXP is a simpler and more secure alternative to VPNs for managing distributed IoT devices.

Setup & Integration FAQs

How do I install SocketXP on my IoT device?

Installation is simple. Download the SocketXP agent binary, register it with your account, and start the service. Within minutes, you’ll have a secure remote tunnel.

What operating systems does SocketXP support?

SocketXP works with most Linux distributions (Debian, Ubuntu, Raspbian, OpenWrt, Yocto) and embedded Linux environments.

Can I run SocketXP on Docker or Kubernetes?

Yes. SocketXP can be deployed as a Docker container or sidecar within Kubernetes clusters for secure application tunneling.

Does SocketXP provide SDKs or APIs for developers?

Yes. Developers can integrate SocketXP tunnels into their applications using APIs, making it possible to build remote monitoring dashboards or CI/CD pipelines.

Pricing & Business FAQs

Is SocketXP free to use?

SocketXP offers a free tier for developers and hobbyists with limited devices. Paid plans unlock more devices, features, and enterprise support.

Does SocketXP offer a free trial for IoT developers?

Yes. You can try SocketXP for free and later upgrade to paid plans as your deployment grows.

Can I use SocketXP for commercial IoT products?

Yes. SocketXP supports enterprise deployments, OEM integrations, and white-label options for commercial products.

SocketXP IoT Remote Access and Device Management Platform

Effortlessly access, monitor, and manage your IoT devices remotely with SocketXP's secure and scalable platform.

Start Your Free Trial Now!

Join thousands of satisfied users who trust SocketXP for a secure, reliable, and scalable IoT device management solution. Start your free trial now.