1

I have been developing projects with Raspberry Pi 4. For the current project I am running a NextCloudPi server on it. I am able to access the server using my Internal IP. I want to access it using a public domain name or in other words through open Internet. My ISP does not allow port forwarding and static IP.

I tried Zerotier, which creates a VPN and I can access the CloudServer through the static IP assigned under VPN but the transfer speeds are really slow. Another issue is that I need to install it on all the devices through which I am going to access the CloudServer and ofcourse on the RPi4 itself.

Is there any other option that you guys probably have to access RPi4(Basically IOT devices) through Internet? Any suggestion would be greatly appreciated.

ip addr output

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether dc:a6:32:6a:82:e4 brd ff:ff:ff:ff:ff:ff inet 192.168.1.35/24 brd 192.168.1.255 scope global dynamic noprefixroute eth0 valid_lft 85963sec preferred_lft 75163sec inet6 fe80::f6e0:36ba:532f:10e9/64 scope link valid_lft forever preferred_lft forever

3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether dc:a6:32:6a:82:e5 brd ff:ff:ff:ff:ff:ff

14
  • have you tried port forwarding on your internet router? Not sure how an ISP can stop you from port forwarding ... I guess your ISP could stop incoming connections of course - but they can't stop port forwarding Jan 17 at 3:26
  • Maybe Dataplicity? The Pi connects to the server, not the other way around so it works behind firewalls. Jan 17 at 3:42
  • @JaromandaX , I tried port forwarding on my router but could not find any setting like that. The router is DBC XPON and has really bad web interface and it has a fiber connection. Really not sure how to port forward my router so was searching for other way around. Jan 17 at 12:03
  • @Unsigned_Arduino I tried Dataplicity using the instructions provided oon their website. I am able to acces the default Dataplicity server nginx but not able to access NextCloudPi's apache server. Not sure why, any inputs? Jan 17 at 13:21
  • Is it running in port 80, and nothing else is using it? Jan 17 at 14:42
1

I have finally resolved the issue. I have used ngork to create virtual tunnel. I tried to use ngork earlier but was unable as I was running the service on port 80. When I ran the nrogk http service on port 443, I was able to access the NextCloud server using the domain name shown on the ssh terminal. NextCloud uses port 80 for http and 443 for https. I am really not sure why I was not able to access the NextCloud on port 80. This may help if someone is stuck in the similar problem. The problem with ngork is, once the raspberry pi is restarted you will have to restart the ngork service as well and of course the domain address will also be changed. Though my use case don't have any problem with it.

1

Full disclosure: I am the founder of SocketXP.

If you want to remotely access your Raspberry Pi, you can use SocketXP IoT Remote Access solution. SocketXP provides a public web-url to remotely access the web service running in your private Raspberry Pi device (behind NAT router or firewall). You can even remote SSH into Raspberry Pi over the internet using SocketXP. It is free to use.

Follow the instructions below to setup a public web URL for your private web service.

Step#1: Download and Install:SocketXP IoT Agent

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

Step#2: Login

Sign up here to get your AuthToken. SocketXP has a free plan to try without any strings attached.

Get your authtoken and register your device using the following command:

$ socketxp login <your-authtoken-goes-here>

Step#3: Connect and Access

Next connect your Raspberry Pi or IoT Device to SocketXP Cloud Gateway. SocketXP will generate a unique and secure public URL to remote access your web service running in your Raspberry Pi.

$ socketxp connect http://127.0.0.1:8080

conntected.
Public URL: https://john-adxywfd327342.socketxp.com

SocketXP will generate a unique random public web URL for you. Use the public web url to remote access your web service from anywhere around the world as long as you have internet access.

You can find more instructions on how to setup remote access to your web service running in your Raspberry Pi behind NAT router or Firewal over the internet using SocketXP here.

1
  • Looks interesting. Will give it a try. Sep 28 at 11:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.