Page 1 of 1
How can I host web server in raspberry pi?
Posted: Fri Nov 15, 2019 9:54 am
by bibek
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.
Re: How can I host web server in raspberry pi?
Posted: Fri Nov 15, 2019 10:18 am
by deepo
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
Re: How can I host web server in raspberry pi?
Posted: Fri Nov 15, 2019 10:21 am
by B.Goode
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.
Re: How can I host web server in raspberry pi?
Posted: Fri Nov 15, 2019 11:46 am
by Heater
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.
Re: How can I host web server in raspberry pi?
Posted: Fri Nov 15, 2019 11:54 am
by rpdom
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.
Re: How can I host web server in raspberry pi?
Posted: Fri Nov 15, 2019 12:01 pm
by Heater
rpdom,
Well spotted. I meant to think wireguard:
https://www.wireguard.com/
Above post corrected.
Re: How can I host web server in raspberry pi?
Posted: Fri Nov 15, 2019 1:53 pm
by Lewis-H
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