bibek
Posts: 1
Joined: Fri Nov 15, 2019 9:41 am

How can I host web server in raspberry pi?

Fri Nov 15, 2019 9:54 am

I am doing a project on IoT based video surveillance. For this I have to make my website running on pi accessible through internet. Usually for this we need static public IP Address but ISP do not provide it. I found about tunneling services. But can I do with cellular dongles. What would be the most suitable method.

deepo
Posts: 547
Joined: Sun Dec 30, 2018 8:36 pm
Location: Denmark

Re: How can I host web server in raspberry pi?

Fri Nov 15, 2019 10:18 am

Maybe you should look into dynamic DNS.
But some ISP's make even that impossible to implement, because they sell a static IP address as an extra service.

/Mogens

User avatar
B.Goode
Posts: 9838
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: How can I host web server in raspberry pi?

Fri Nov 15, 2019 10:21 am

bibek wrote:
Fri Nov 15, 2019 9:54 am
I am doing a project on IoT based video surveillance. For this I have to make my website running on pi accessible through internet. Usually for this we need static public IP Address but ISP do not provide it. I found about tunneling services. But can I do with cellular dongles. What would be the most suitable method.

No Raspberry Pi specific content here. Everything would be generically the same no matter what hardware/operating system platform you use for your website.

The most suitable solution would be to move your business to an ISP who can provide the services you need. A cellular service is unlikely to meet your needs - check what you are being offered because it is widely thought that most mobile network providers do not permit inbound connections.

If you want to try to work around the issues you could -
Subscribe to a Dynamic DNS service that keeps track of your current non-static IP address;
Use a 'reverse connection' service such as Dataplicity.

Heater
Posts: 15428
Joined: Tue Jul 17, 2012 3:02 pm

Re: How can I host web server in raspberry pi?

Fri Nov 15, 2019 11:46 am

Get yourself a server instance in the cloud. You can get a server instance with a public IP address from Google, Amazon, MS Azure, Digital Ocean and many others.

Have your Pi connect from inside your local network to your server in the cloud using a VPN. I suggest wireguard.

Have your cloud server route web requests to your webserver on the Pi though the VPN.

Better yet, run the nginx web server on the cloud server. Have nginx forward web requests to the web server on the Pi though the VPN.

The advantage of the above is that you will be able to secure your web access using HTTPS and certificates obtained from letsencrypt.org.

With solutions like the above you no longer have any problems with your ISP, connecting though mobile network dongles, configuring you local router, etc, etc.
Last edited by Heater on Fri Nov 15, 2019 12:00 pm, edited 1 time in total.
Memory in C++ is a leaky abstraction .

User avatar
rpdom
Posts: 16741
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: How can I host web server in raspberry pi?

Fri Nov 15, 2019 11:54 am

Heater wrote:
Fri Nov 15, 2019 11:46 am
Have your Pi connect from inside your local network to your server in the cloud using a VPN. I suggest wireshark.
Does Wireshark have a VPN function? I thought it was a network packet analyser.
Unreadable squiggle

Heater
Posts: 15428
Joined: Tue Jul 17, 2012 3:02 pm

Re: How can I host web server in raspberry pi?

Fri Nov 15, 2019 12:01 pm

rpdom,

Well spotted. I meant to think wireguard: https://www.wireguard.com/

Above post corrected.
Memory in C++ is a leaky abstraction .

Lewis-H
Posts: 26
Joined: Thu Oct 31, 2019 12:45 pm

Re: How can I host web server in raspberry pi?

Fri Nov 15, 2019 1:53 pm

Host Your Website on Raspberry Pi
Step 1: Connect Via SSH. Now connect your raspberry pi to the home router using an Ethernet cable.
Step 2: Setting Up You Rasberry Pi.
Step 3: Installing Your Server.
Step 4: Setup Up PORT Triggers.
Step 5: Have Your Domain Name.
Step 6: Visit Your Website.
I have tried to explain it in the easiest way possible. Hope you find it helpful!
Regards,
Lewis

Return to “General discussion”