# Home is where the hosting is - I heart localhost



## drmike (Nov 12, 2014)

Like most folks around here, I've been piled up with VPS accounts all over for years.   VPS services are swell, but for me more than a few is a time sewer.   Even the near instant provisioning of Digital Ocean gets a bit tiring and scripting things for a public exposed full server is just meh, stressful and moderate waste of my valuable time.

I've long been a self hosted advocate.  Over the years I've had good bandwidth to home and office and tended to host stuff in-house.  Recent years I haven't, but indeed still good enough for many things I need to do.

Even now I have piles of servers sitting here with tons of resources on the LAN.  Sending stuff out to a datacenter is just, well, PITA.   Colo sucks, renting dedis is blah blah potluck, VPS is glorified toy.  Time + money, better things to burn it on.

So I am headed back to localhost.   You lads can keep your clouds in Cloudlandia, giving your data to random vendors of doom, transmitting everything up to mission control.

But, there is always a but.  Localhost is a lonely place.   There are times when I may need to or want to public expose something there.  Think for most of you, demo'ing some new code for client, sharing that meme, or a design for client or other development stuff.

Historically self-hosting has involved beating a hole in your internet connection which probably lives on DHCP behind NAT or some other convoluted hell abstraction.   So folks slap together with one of the random DNS meets DHCP mapping services.  Some paid, some freemium.  It's multiple pieces of garbage, bubblegum, and bailing wire slapped together.   Border drug cartel have less obstacles to contend with to tunnel dope in.

*INTRODUCING PAGEKITE!*



"the fast, reliable localhost tunneling solution"

"The fast, reliable way to make *localhost* part of the Web.

_PageKite_ makes local websites or SSH servers publicly accessible in mere seconds, and works with any computer and any Internet connection.

It's also 100% Open Source.

*Source: *

https://pagekite.net/

In Linux land:


curl -s https://pagekite.net/pk/ |sudo bash 


pagekite.py 80 _yourname_.pagekite.me

At that point if you have server running on localhost on port 80, the world can reach it at:

http://yourname.pagekite.me

This supports other protocols too.  For instance, you can expose SSH real simply too... And you can in one line expose multiple ports.

They have pre-made packages for Debian available, see:

https://pagekite.net/wiki/Howto/GNULinux/DebianPackage/

Simple eh?

Now I am a recovering VPS time waster recovering with localhost therapy.   VPS for me now is more well defined need where I need the bandwidth capacity or some strategic resource.  General purpose computing,  I'll run that in my own LAN cloud.   We have clouds here, or a pile of servers like most of those sky dreamers selling me snakeoil prior.

This also makes IPv4 quite a bit less important in the big picture.   

Yes, the domain *.pagekite.me is limiting.  You can sign up for your own custom domain or since it's open debug how to run your instance entirely on say one of those VPS instances out in the wild of the internet aka Cloudlandia.

Have fun with PageKite, it's my favorite new find.  Hopefully, other folks here enjoy it and do some interesting things with it.


----------



## drmike (Nov 12, 2014)

and...

I haven't tried it, yet, but they have an Android app:

https://play.google.com/store/apps/details?id=net.pagekite.app

Unsure if it only support their hosted service - suspect it does.


----------



## Munzy (Nov 12, 2014)

So if I understand this right, it is a tunnel from you LAN to a server on the WAN?

Correct?


----------



## raj (Nov 12, 2014)

For http traffic I used to domain.tld CNAME record to dynamic DNS service (used to use dyndns).  At my home router, give my home server static IP.  Port forward wanted ports at the router to said static IP.  

SMTP was an issue.  pagekite seems to fix that though.

There's certainly merit in the project.


----------



## drmike (Nov 12, 2014)

Munzy said:


> So if I understand this right, it is a tunnel from you LAN to a server on the WAN?
> 
> Correct?


That sounds right.  I haven't read the specification to say otherwise.

It's a tunnel that exposes anything, anywhere, on demand to the internet.  You define what you want exposed.

Your front side facing the world as-is is Pagekite.me domain and their servers.  Where your service is running and all isn't disclosed or leaking to public unless you leak it.  So in that regard, just like Cloudflare per se.

I've only tested it with SSH and HTTP traffic.  Both work easy no effort.

Other cool thing is it support SSL for web.  SSL terminates at their end to user for web traffic.

Supposedly some aspect of Minecraft works with this (some discussions out there about such).  Someone else was talking about Shoutcast behind such.

Me, I am using it for sharing files that are  PITA to share otherwise (large files) and which I refuse to put in cloud services, email, etc.

Also using it for testing development with others.

Like @raj said, old school version / solution was hole punching + a DNS service.  Tedious.  Many home routers folks run barely support exposing things.  Like one I have now just opens since IP to public and no port controls, so it's all or nothing. Plus people open that router hole and tend to never close it, resulting in some hack / security issue in the future too often.

With PageKite, in theory, you could have a device and it could be mobile on 3G/4G data connection.  That connection could be used to access the device, serve info, etc. as your roam, as your IP changes, etc.  Something that prior wasn't pedestrian thing to achieve.

Similarly could the same wifi hopping around in your day.  Like server that travels with you - on road via 3G/4G, at office on their connection and when at home on your own connection.

Not a question of why per se, as surely lots of legit and interesting uses (though not for most folks).

I'd like to get a self hosting version of the server running and cobble some additional reverse proxy caching up front perhaps (for non SSH data).  Merge best of the datacenter / VPS with the PageKite remote backend doing some of the serving.


----------



## raindog308 (Nov 12, 2014)

Hmmm...for hosting services on the Internet, I use... a VPS  :lol:


----------



## MannDude (Nov 12, 2014)

raindog308 said:


> Hmmm...for hosting services on the Internet, I use... a VPS  :lol:


You're in the right place!

Actually though, this does seem sort of neat. I mean, I'd never use it for anything mission critical but I don't see the issue of using to for some random dev stuff, tinkering and other projects. If you could use your own domain, it'd be even better as I've got a handful of randomly useless/idle domains just collecting dust.


----------



## willie (Nov 13, 2014)

Relying on someone else's cloud server doesn't seem in the vpsboard spirit.

I've done stuff like that with hack-ass reverse proxied made of ssh port forwarding to a cheap VPS and it actually kind of works, even through godawful mobile wireless networks.  The public address is the VPS's and the relevant port gets forwarded back to the home PC through ssh hackery.  The bottleneck in almost all cases is the "last mile" WAN port, a mere 1 megabit or so for my home DSL and a fraction of that for the mobile stuff.  Fortunately for the latter thing, all that was desired was some low speed remote access to twiddle with tbe box.

Im pretty happy with the cheap dedis that I've been using for almost all my computation and storage these days (first OVH Beauharnois and now Hetzner Falkenstein).  Powerful boxes, affordable, network not the greatest by first tier data center standards but beats the crap out of any local home or business ISP, fairly easy to add another server if requirements expand, and tons of compute power with no noisy fans in my living space.  The only computer I really use at home any more is a compact laptop.


----------



## wlanboy (Nov 13, 2014)

My response: Nope.

I am using a OpenWRT Router to establish a vpn connection to a vps and connected my machines to the router.

Added some iptables forward rules and wooosh my local machines do have a public ip address.


----------



## drmike (Nov 13, 2014)

When thinking about this further.

Hosting in datacenter gets mass abused.  People use it for everything perhaps erroneously at times.  Newbs will know, no better and experienced folks will host outside just because that's what they do every day with everything else.  There is a place and will be for DC hosting always.

When I want to adjust one of the many things in my growing home / office collection of services,  the datacenter isn't much help without 15 step dance moves, usually.

If I am doing a live event or anything live-like on location, historically, most people use yet another hosted service even when such is intended for themselves and doesn't require heavy bandwidth lifting.

Accessing on board systems on mobile anything - required satellite or perhaps 3G/4G, all of which have nasty use, but don't serve set ups.   This runs right through them and I can get what I need done.

Best of all PageKite, it's fairly idiot proof.  I can have a normal person run two lines and presto, we are available.  Great for helpdesk / support / other remote situations on demand.  Just kill the process and things are offline.

Other up sides,  no getting banged by Acceptable Use Policies, Terms of Service, etc. that prohibit you from at times (depending on provider) from even using your hosting services.

Since data can be shoved in crypto tunnel and data inside your private space, random data center theft from the ABC agencies is somewhat harder.  If they want to wholesale seize your data,  they are going to need a proper warrant to enter your home / business in most civilized countries.   So in theory, usually, you'll be more aware of shit sliding your way due to problematic content.

Plus PageKite when running your own front ends can be buried in places that might actually try to care about said matters, legal and private.   And when you run your own front ends, easy enough to go mobile in ways with those instead of having parked targets.. and you can certainly move and rotate the actual back ends that are self hosted.

Unhosting and self hosting is re-emerging.  Out of necessity really.

We need more of these solutions.


----------



## trewq (Nov 13, 2014)

I just have tinc setup between my home server and a couple of VPSs. When I'm outside my network I just tunnel into one of the VPSs and presto I have access to my home server.


I hate the idea of having my home stuff accessible publicly. That's the reason it's at home.


----------



## wlanboy (Nov 13, 2014)

trewq said:


> I hate the idea of having my home stuff accessible publicly. That's the reason it's at home.


Good point!

One of the reasons my Synology NAS is *not *accessable through the internet.


----------



## drmike (Nov 13, 2014)

wlanboy said:


> Good point!
> 
> One of the reasons my Synology NAS is *not *accessable through the internet.


I'll note, I am not advocating free-for-all exposing everything.  Just one off things.  Strategically.

Like right now, I'll throw web server public for the next few hours to exchange some documents with someone. Then it comes on down.


----------



## drmike (Nov 13, 2014)

trewq said:


> I just have tinc setup between my home server and a couple of VPSs. When I'm outside my network I just tunnel into one of the VPSs and presto I have access to my home server.


Any chance you can share / point to howto for TINC and accomplishing what you are?  Good to have more options.


----------



## zed (Nov 13, 2014)

its a neat find, more ways to do stuff is cool.


----------

