Posts: 4
Joined: Wed Feb 14, 2018 3:17 pm

How to connect my website to inter net.

Mon Feb 19, 2018 11:30 am

Hi friends.

I did a project called Home automation using lighttpd server based on this tutorial ... -Internet/.

This works on my local network. How i can put it on internet. I want control my GPIO pins from anywhere in the world .Please help me..

User avatar
Posts: 5256
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: How to connect my website to inter net.

Mon Feb 19, 2018 1:47 pm

A: You need to add a portforwarding rule in your router.

B: And you need to know your public IP address. ( something google will tell you if you google "what is my ip" )

Optional C: Since your public IP address can change and be difficult to remember many people register with a Dynamic DNS sevice so that a chosen domain name always points back to their address. ( Many routers also have support for such account )

Posts: 781
Joined: Mon Dec 16, 2013 10:23 am

Re: How to connect my website to inter net.

Mon Feb 19, 2018 1:53 pm

Edit - topguy already said all this!

Consider the security implications.
There are plenty of people who would love to control not just your GPIO pins, but every computer, light bulb and smart toaster on your network.

Firstly your router has to have port forwarding set up to allow HTTP (Port 80?) or HTTPS connections through to the Pi.

As your ISP probably doesn't give you a static IP address, you need a way to connect to your router when it's exterrnal IP changes. One way to do that is to use a dynamic DNS service such as And your PI or another computer on your network has to keep track of IP address changes and update duckdns. With this in place, you should be able to connect to (for example) rather than the IP address.

Return to “Beginners”